# Homework tasks

## 1 Homework

### Homework 1 - Logical Thinking

- You may have played quite a few logic puzzle games.
- One of the classic games of this kind is Tetris.
- Cut Block Puzzle is similar in that it requires you to think logically when place a number in a grid.
- First step in
`Problem Solving`

is to understand the problem, which means, you need to know the rules(`process`

), the`input`

you can have and the expected outcomes(`output`

). - There are two rules that must hold of a completed cut block puzzle.
- Each area marked out by darker lines must contain the numbers from 1 up to the number of squares in the area. For example, the top most area in the first puzzle below consists of 5 squares so those squares must be filled with the numbers: 1, 2, 3, 4 and 5 with no repeated numbers. If the area has two squares, like the one bottom left below, then it must be filled with the numbers 1 and 2.
- No number can be next to the same number in any direction, whether horizontally, vertically or diagonally. So in the grid below, the fact that there is a 4 on the side means there cannot be a 4 in any of the 5 squares surrounding it.

- Here is an example with its solution and then a larger cut block puzzle to try.

Your task:

- Solve the following Cut Block Puzzle.
- Using a sheet of paper or a word document for your work
- Describe briefly on how you approach the problem
- Once finished, upload to www.bournetolearn.com or hand in to your teacher your solution along with your note.

### Homework 2 - Look for the something?

- Search for data or information happens everyday.
- Examples of search may include small task of find an item you just paid for from a receipt with all the items you just purchased to big task of police force searches for suspects from possibly millions of persons.
- To search an item from a receipt is easy for a human but search for a suspect from millions of others is much much harder for a human.
- There are many algorithms exist for
`search`

, some are better than others. - Suppose you are given a list of items as below:

Egg Milk Bread Chocolate Orange juice Oil Chips Tomato Sparkling water Apple Lime

- If a list is short, we can quickly scan the list, either find or not find the item.
- But if the list if very long, what you do? we may need to scan the list one item after another from the beginning.

### Your tasks:

- Use pen and paper, word or this website to create a flowchart of your algorithm on how to search for any item from a list of any length.
- Look at the list given above, try to suggest a way to improve the efficiency of your search algorithm.