Problem Solving

CHANGES SECTION

Being able to solve problems and come up with a number of solutions is an important skill in computer programming. In this unit we will take a look at how this can apply. We want to focus on the process, many problems have a number of solutions, and know that failure will likely be part of the process.

Collecting Data

- What are 5 ways you give off data? How is it collected?

- When we collect this data from lots of people, what does it tell us? What good might be done? What service could be improved?

- How can data be linked back to you? Implications (good or bad)?

- We'll read over and discuss the following two articles on data privacy

- A face exposed article

.. Is there a social responsibility to use search info or should it stay private?

- Privacy article

- Use Lucidcharts (Google Drive to "mindmap" the main ideas)

Community Issue Article

- How would you approach this problem?

- What kind of data would you need to collect?

- How would you collect and analyze the data?

How would you collect data differently in the following situations:

Making a case (advocacy)—Use data to document situations that contribute to make a positive or negative case for something. (e.g., let the Metro know about timing of trains and buses; tell the principal about something that needs to be done at the school; tell someone about something you’d like to see continued).

VS

Discovery—Collect data to document situations and then use the data to learn something. (e.g., could your food choices be improved; do I always take an efficient route to activities).

Learning Goal:

- Know and apply problem solving process

- Know what algorithm means

Candy Bar Activity

- How many break to get the bar in 12 equal pieces? One break will give you two pieces.

- What is your hypothesis? What process will you use? Write down your plan for solving this problem before you act.

- Put your plan into action.

- Did you guess right? What process did you use? How many breaks did it take? Did your plan work?

Answer = 11

Problem Solving Process

1. Understand the problem - read or listen to the problem statement

2. Make a plan - use pictures, charts, graphs, lists, objects, or act out a plan to solve

- This is called an algorithm in Computer Science

3. Carry out the plan - follow the plan

4. Review and reflect - reflect on the process

Algorithm or destiny??

We'll talk about how we could apply this to other problems. We'll fill out the chart together in class.

Number of Pieces Number of Breaks

1

2

3

4

5

6

7

8

9

10

N

Is there a pattern? Once we see a pattern, we can generalize a solution.

Why would this be an important problem for a carpenter or a chef?

Do you solve problems the same way in real life?

Binary Number System

In class we will make these number cards.

How would we show 5 using binary numbers? How would we show 20? How about 48?

Practice the problems from the image below.

binary practice

Why is knowing how binary works important?

What do you notice about the binary system and memory size?

ASCII Characters/Code - The Dec number is what you would use for binary, 7 bits

Binary Numbers & Characters - 8 bits

Think you've mastered binary? Find out here.

Linear Vs Binary Searching

In class we will do the following activities and use resources from a Muddx computer science course.

Linear Searching Activity

Binary Searching Activity

Sorting Algorithms

We've seen how we might search for info differently with sorted and unsorted lists. In class we'll cover these four different sorting methods using resources from a Muddx computer science course:

- Selection Sort

- Bubble Sort

- Insertion Sort

- Merge Sort

- Quick Sort Video

.. Quick Sort vs Bubble Sort

Minimal Spanning Trees

Sometimes we use computers to find the best solution to a problem. There are many situations where a network will connect together different pieces. In computer science we may call these networks 'graphs'.

The Mud City Problem - You will try to solve this problem in class

How does it apply? - How this applies to the real world

Scribble Maps - Use this tool to apply what you learned to a real life situation. Use the same conditions as the Mud City problem for Kensal, ND.

University Without Sidewalks

The Travelling Salesman Game

Custom Travelling Salesman Game