Algorthims Equations Flashcards

1
Q

Algorithm for catching a bus…?

A
1 Go to the bus-stop
2 Wait for the bus
3 When the bus arrives, get in the bus
4 Pay for your trip
5 Sit in an empty seat
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Organize a friend to pick you up from the airport…?

A

(TO DO)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Pay for a shirt at the checkout of a department store…?

A

(TO DO)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Given the ex-GST price of an item, calculate its GST inclusive price…?

A

(TO DO)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Describe at least one algorithm that would be used by each of the following computer systems…?

  • ETFPOS Terminal
  • traffic lights
  • supermarket checkout
  • speech recognition system.
A

(TO DO)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Algorithms on page 10….?

A

(TO DO)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Structure diagrams …?

A

do in book.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Supply an efficient algorithm for sharpening a new pencil (using a mechanical sharpener)…?

A

1 Insert noneraser end of pencil into hole inside of sharpener.
2 Hold pencil firmly in place with one hand.
3 Turn crank of sharpener with the other hand.
4 Remove pencil for sharpener to check point of pencil.
5 If point is sharp enough, then stop,
6 Else repeat steps 1-4 until pencil point is sharp.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Write an algorithm to add two integers…?

A

1 Write the integers one below the other, aligning their rightmost digits.
2 If one number has more digits than the other, then
a Insert zeros at the beginning of the smaller number until the integers are of the same length.
3 Draw a line under the lower number.
4 Start with the right most column, called the current column.
5 Add the digit in the current column.
a If the sum is less than ten, then
1. record the sum in the current column, below the line.
b Else
1. Subtract 10 from the sum value.
2. Record the difference below the line
3. Record the value 1 in position above the upper number in the column to the left of the current column.
6 Designate the column immediately to the left of the current column as the new current column
7 If the current column is empty, then
a Stop
b The result is below the line.
8 Else
a Go to step 5

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Use natural language to write down each step you’d take to change a tire…?

A
1 Set emergency break
2 Open trunk
3 Check condition of spare tire
4 Remove spare from trunk
5 Remove jack from trunk
6 Block wheels
7 Remove hub cap
8 Loosen lug nuts slightly
9 Jack up car
10 Remove lug nuts
11 Remove flat tire
12 Install spare tire
13 Tightly replace lug nuts
14 Lower car and remove jack
15 Put all remaining paraphernalia in trunk
16 Head for service station.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

SEE ALGORITHMS ON PAGE 22

A

—– (ANSWERS ON THE NEXT PAGE)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly