1 / 58

E-Genting Programming Competition 2006

E-Genting Programming Competition 2006. Public Lecture by Jonathan Searcy 3 February 2007. Competition Questions. Loan Evaluator. Language Selection. Dataflow Diagram. Constructing the Data Entry Screen. Decoding and Validating the Fields. Calculating the Effective Interest Rate.

pcourtney
Télécharger la présentation

E-Genting Programming Competition 2006

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. E-Genting Programming Competition 2006 Public Lecture by Jonathan Searcy 3 February 2007

  2. Competition Questions

  3. Loan Evaluator

  4. Language Selection

  5. Dataflow Diagram

  6. Constructing the Data Entry Screen

  7. Decoding and Validating the Fields

  8. Calculating the Effective Interest Rate

  9. Sequential Search

  10. Binary Search

  11. Newton’s Method

  12. Summary • Defining a data entry screen. • Extracting data entered into the fields of a data entry screen. • Decoding and validating data extracted from the fields of a data entry screen. • Searching for the solution to an equation.

  13. Microprocessor Emulator

  14. Control Panel

  15. Dataflow Diagram

  16. Update Indicators

  17. Button Listener

  18. Register Set

  19. Virtual Machine

  20. Call and Return

  21. Summary • Identifying processes by dataflow analysis. • Displaying graphical objects. • Receiving and processing button event messages • Loading the contents of a file into a byte array. • Initiating and terminating a thread. • Communicating between threads. • Understanding a microprocessor instruction set.

  22. Team Selection

  23. Team Rating Formula

  24. Characteristics of the Rating Formula

  25. Programmer Rating Formula

  26. Project Contention

  27. Database Schema

  28. Entity Relationship Diagram

  29. The Underlying Problems • choose the projects to be included in each programmer rating; • choose the programmers to be included in the team; • resolve the project contention.

  30. Munkres’ Assignment Algorithm

  31. Brute Force • The database contains 75 programmers, 324 projects and 339 assignments. • At most 339 – 324 or 15 projects had more than one programmer. • Roughly 215 or 32,768 different contention alternatives might need to be tested. • 1 hour / 32,768 or around 100ms to test each alternative.

  32. The Effect of Brute Force

  33. Getting the Best Programmer Ratings

  34. Selecting the Best Team #1

  35. Selecting the Best Team #2

  36. Selecting the Best Team #3

  37. Dataflow Diagram

  38. Brute Force Expansion Function

  39. Summary • Database accessing using SQL. • Using entity relationship diagrams to analyse and define data structures. • Identifying core issues in a compound problem. • Determining the feasibility of using brute force to solve investigative problems. • Proving a solution is correct using mathematical theory. • Using library sort functions. • Using a linear search to find a peak value. • Dataflow analysis and design. • Expanding combinations using recursion. • Report layout interpretation and report formatting.

  40. Angina Marketing • Angina Marketing operates several chains of fast food outlets. Their products include fried chicken, hamburgers, French fries and pizzas. • According to Wikipedia: • Angina pectoris is chest pain due to ischemia (a lack of blood and hence oxygen supply) of the heart muscle, generally due to obstruction or spasm of the coronary arteries (the heart's blood vessels). Coronary artery disease, the main cause of angina, is due to atherosclerosis of the cardiac arteries.http://en.wikipedia.org/wiki/Angina • Caused at least in part by the consumption of foods high in saturated fat and salt (e.g. hamburgers, French fries, fried chicken and pizzas).

  41. Background • Angina has a huge database table (over 200 million rows) that contains one row for each transaction processed at the fast food outlets. • Angina needs a report to summarise the information in the transactions table. • The transactions table has limited indexing. • The reporting program should generate the report for a single day in less than 10s. • The program must do date validation and conversion. • The opening and closing balance totals are not a simple total of the opening and closing balances of the individual shifts.

  42. Database Schema

  43. Transaction Type Codes

  44. Example Database Table

  45. Data Dictionary • date and time the report was printed; • reporting period (from-date and to-date); • for each cashier shift in the reporting period: • cashier location code, • trading day date, • shift number, • opening balance, • total fills in the shift, • total credits in the shift, • total sales in the shift, • closing balance; • totals for all shifts.

  46. Balance Calculation

  47. Report Layout

  48. Prototype Report

  49. Dataflow Diagram

  50. Date Conversion

More Related