Friday, December 5, 2014

Minimal Spanning Trees

Our society is linked to networks such as instagram, telephones, television, roads, bodies of water and even schools. If each of these connections weren't efficient, our world wouldn't be as simple as it is today. Time will be lost and a lot of things will be a lot more time consuming. The way our society is linked allows to save time and energy, making our world easier by making us use less of what we need to and saving us time and effort. Things like electricity, money and water are hings that we save by having these networks.

It took me at least 9 connections to connect the 10 computers.
If there were n number of computers, I have to use n-1 wires.\


The strategy I used to solve this problem was to connect the shortest routes. That way I can use the minimal amount of spanned trees.


Sorting Algorithms

The places/things that are sorting out or organized are like libraries, deck a cards, malls, kitchen, supermarket and etc. If these weren't in order everything will be all over the place and not organized.

Sorting Eight shades of gray
The way I sorting this out is that I mixed them all up and line them up. After that I flipped two cards at a time and see which one was lighter than the other and put them in order. The minimum I made to sort them out was 8 comparisons because I kept having to compare each one which took time and having to put them in order.

Discussion 
The least times it took me to sort was 16 to compare it.

Sorting research 
 Merge sort- Used for processing large amounts of data.
Insertion sort- Used for worse case over sequence.

Monday, December 1, 2014

Linear and Binary Search Algorithms

It takes 6 digits to represent the number 32 in binary

2^nth

Linear search is different from binary because linear makes you go one by one and binary allows you to be able to save time by going through sections at a time and halving your search, eliminating many parts at once. Linear would be better when something you're looking for isn't in order or when it's int the beginning of the list.