Lynbrook computer science
Download
1 / 8

Lynbrook Computer Science - PowerPoint PPT Presentation


  • 74 Views
  • Uploaded on

Lynbrook Computer Science. Member Meeting: October 27 th , 2008. American Computer Science League. Two Divisions: Intermediate Senior First Competition: December 19 th , 2008 Short Problem (like CAML) + Programming problem Topics: Boolean Logic Graph Theory Recursion

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about ' Lynbrook Computer Science' - qamra


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.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
Lynbrook computer science

Lynbrook Computer Science

Member Meeting: October 27th, 2008


American computer science league
American Computer Science League

  • Two Divisions:

    • Intermediate

    • Senior

  • First Competition: December 19th, 2008

  • Short Problem (like CAML) + Programming problem

  • Topics:

    • Boolean Logic

    • Graph Theory

    • Recursion

    • Converting between Number Systems (dec, oct, hex, bin)

    • Data Structures


Senior div sample problems taken from acsl website
Senior Div. Sample Problems (taken from ACSL website)

BASIC Program:

If the following program prints 15, what was the input?

1 input N

2 if N > 5 then N = N + 8

3 if N > 12 then N = N - 6

4 if N >= 8 then N = N + 1

5 print N

6 end


Basic i o solution
BASIC I/O Solution

Work Backwards:

  • Line 4: N = 14

  • Line 3: N = 20

  • Line 2: N = 12

    Answer: 12


Here are some more
Here are some more…

Computer Number Systems

  • What is the base 16 value of FEDCBA16 – ABCDEF16?

    Recursive Functions

  • Find f(10, 5) given the following:

    • If x > y then f(x, y) = f(x-2, y+1) + 3

    • If x < y then f(x, y) = f(x+1, y-3) + 2

    • Otherwise, f(x, y) = 5


Computer number systems solution
Computer Number Systems Solution

  • Work from right to left, and borrow as needed:

    1A – F = B

    1B – E – 1 = C

    1C – D – 1 = E

    D – C – 1 = 0

    E – B = 3

    F – A = 5

    Answer: 530ECB16


Recursive function solution
Recursive Function Solution

Work through the recursion

  • f(10, 5) = f(8, 6) + 3

  • f(8, 6) = f(6, 7) + 3

  • f(6, 7) = f(7, 4) + 2

  • f(7, 4) = f(5, 5) + 3

  • F(5, 5) = 5

    Going backwards and summing up everything,

    Answer = 16


Miscellaneous
Miscellaneous

  • More sample problems available at ACSL.org

  • TopCoder competitions:

    • Single Round Match (SRM): 10/28 @ 6PM

    • TopCoder High School SRM: 10/28 @ 6PM

      • Register before 3PM!

    • Marathon Match : 10/29-11/5

  • Remember to sign in!

  • Turn in your checks ($15, payable to Lynbrook ASB) into Stephen Li if you haven’t already!

  • Check for updates at LynbrookCS.com


ad