More results...

Generic selectors
Exact matches only
Search in title
Search in content
Post Type Selectors
post
page
◑ Python IDE Dashboard

A* Search Algorithm

The A* Search algorithm (pronounced “A star”) is an alternative to the Dijkstra’s Shortest Path algorithm. It is used to find the shortest path between two nodes of a weighted graph. The A* Search algorithm performs better than the Dijkstra’s algorithm because of its use of heuristics.

Before investigating this algorithm make sure you are familiar with the terminology used when describing Graphs in Computer Science.

Let’s decompose the A* Search algorithm step by step using the example provided below. (Use the tabs below to progress step by step).

Note that, in this graph, the heuristic we will use is the straight line distance (“as the crow flies”) between a node and the end node (Z). This distance will always be the shortest distance between two points, a distance that cannot be reduced whatever path you follow to reach node Z.

GraphStep 1234567
A-Star-Search-Algorithm
A-Star-Search-Algorithm-Step-1Start by setting the starting node (A) as the current node.
A-Star-Search-Algorithm-Step-2Check all the nodes connected to A and update their “Shortest Distance from A” and set their “previous node” to “A”.
Update their total distance by adding the shortest distance from A and the heuristic distance to Z.
A-Star-Search-Algorithm-Step-3Set the current node (A) to “visited” and use the unvisited node with the smallest total distance as the current node (e.g. in this case: Node C).
Check all unvisited nodes connected to the current node and add the distance from A to C to all distances from the connected nodes. Replace their values only if the new distance is lower than the previous one.

C -> D: 3 + 7 = 10 < ∞ – Change Node D
C -> E: 3 + 10 = 13 < ∞ – Change Node E

The next current node (unvisited node with the shortest total distance) could be either node B or node D. Let’s use node B.

A-Star-Search-Algorithm-Step-4
Check all unvisited nodes connected to the current node (B) and add the distance from A to B to all distances from the connected nodes. Replace their values only if the new distance is lower than the previous one.

B -> E: 4 + 12 = 16 > 13 – Do not change Node E
B -> F: 4 + 5 = 9 < ∞ – Change Node F

The next current node (unvisited node with the shortest total distance) is D.

A-Star-Search-Algorithm-Step-5
Check all unvisited nodes connected to the current node (D) and add the distance from A to D to all distances from the connected nodes. Replace their values only if the new distance is lower than the previous one.

D -> E: 10 + 2 = 12 < 13 – Change Node E

The next current node (unvisited node with the shortest total distance) is E.

A-Star-Search-Algorithm-Step-6Check all unvisited nodes connected to the current node (E) and add the distance from A to E to all distances from the connected nodes. Replace their values only if the new distance is lower than the previous one.

E -> Z: 12 + 5 = 17 < ∞ – Change Node Z

A-Star-Search-Algorithm-Step-7We found a path from A to Z, but is it the shortest one?

Check all unvisited nodes. In this example, there is only one unvisited node (F). However its total distance (20) is already greater than the distance we have from A to Z (17) so there is no need to visit node F as it will not lead to a shorter path.

We found the shortest path from A to Z.
Read the path from Z to A using the previous node column:
Z > E > D > C > A
So the Shortest Path is:
A – C – D – E – Z with a length of 17

Your Task



Graph #1Graph #2
Apply the steps of the A* Search algorithm to find the shortest path from A to Z using the following graph:
A-Star-Search-Algorithm-Graph

Node Status Shortest Distance from A Heurisitic Distance to Z Total Distance Previous Node
A 21
B 14
C 18
D 18
E 5
F 8
Z 0

Shortest Path?

Length?

Apply the steps of the A* Search algorithm to find the shortest path from A to Z using the following graph:
Graph-A-Star-Algorithm

Node Status Shortest Distance from A Heurisitic Distance to Z Total Distance Previous Node
A 11
B 8
C 8
D 4
E 2
Z 0

Shortest Path?

Length?

unlock-access

Solution...

The solution for this challenge is available to full members!
Find out how to become a member:
➤ Members' Area
Tagged with: ,

Dijkstra’s Shortest Path Algorithm

Dijkstra’s Shortest Path Algorithm is an algorithm used to find the shortest path between two nodes of a weighted graph.

Before investigating this algorithm make sure you are familiar with the terminology used when describing Graphs in Computer Science.

Let’s decompose the Dijkstra’s Shortest Path Algorithm step by step using the following example: (Use the tabs below to progress step by step).

GraphStep 123456789
Dijkstra-Algorithm
Dijkstra-Algorithm-Step-1Start by setting the starting node (A) as the current node.
Dijkstra-Algorithm-Step-2Check all the nodes connected to A and update their “Distance from A” and set their “previous node” to “A”.
Dijkstra-Algorithm-Step-3Set the current node (A) to “visited” and use the closest unvisited node to A as the current node (e.g. in this case: Node C).
Dijkstra-Algorithm-Step-4Check all unvisited nodes connected to the current node and add the distance from A to C to all distances from the connected nodes. Replace their values only if the new distance is lower than the previous one.

C -> B: 2 + 1 = 3 < 4 – Change Node B
C -> D: 2 + 8 = 10 < ∞ – Change Node D
C -> E: 2 + 10 = 12 < ∞ – Change Node E

Dijkstra-Algorithm-Step-5Set the current node C status to Visited.
We then repeat the same process always picking the closest unvisited node to A as the current node.
In this case node B becomes the current node.
Dijkstra-Algorithm-Step-6B -> D 3+5 = 8 < 10 – Change Node D

Next “Current Node” will be D as it has the shortest distance from A amongst all unvisited nodes.

Dijkstra-Algorithm-Step-7D -> E 8+2 = 10 < 12 – Change Node E
D -> Z 8+6 = 14 < ∞ – Change Node Z

We found a path from A to Z but it may not be the shortest one yet. So we need to carry on the process.

Next “Current Node”: E

Dijkstra-Algorithm-Step-8E -> Z 10+5 = 15 > 14 – We do not change node Z.
Dijkstra-Algorithm-Step-9We found the shortest path from A to Z.
Read the path from Z to A using the previous node column:
Z > D > B > C > A
So the Shortest Path is:
A – C – B – D – Z with a length of 14

Your Task



Graph #1Graph #2
Apply the steps of the Dijkstra’s Algorithm to find the shortest path from A to Z using the following graph:
Dijkstra-Algorithm-Graph

Node Status Shortest Distance from A Previous Node
A
B
C
D
E
F
Z

Shortest Path?

Length?

Apply the steps of the Dijkstra’s Algorithm to find the shortest path from A to Z using the following graph:
Graph-Dijkstra-Algorithm

Node Status Shortest Distance from A Previous Node
A
B
C
D
E
F
Z

Shortest Path?

Length?

unlock-access

Solution...

The solution for this challenge is available to full members!
Find out how to become a member:
➤ Members' Area
Tagged with: ,

Boolean Algebra


In this blog post we are investigating different formulas than can be used to simplify a Boolean expression.

Double Negation

¬ ¬A = A

Complement Laws

A ∧ ¬A = 0
A ∨ ¬A = 1

Idempotent Laws

A ∧ A = A
A ∨ A = A

Identity Laws

A ∧ 1 = A
A ∧ 0 = 0
A ∨ 1 = 1
A ∨ 0 = A

Associative Laws

(A ∧ B) ∧ C = A ∧ (B ∧ C)
(A ∨ B) ∨ C = A ∨ (B ∨ C)

Commutative Laws

A ∧ B = B ∧ A
A ∨ B = B ∨ A

Distributive Laws

A ∧ (B ∨ C) = (A ∧ B) ∨ (A ∧ C)
A ∨ (B ∧ C) = (A ∨ B) ∧ (A ∨ C)

Absorptive Laws

A ∧ (A ∨ B) = A
A ∨ (A ∧ B) = A

De Morgan’s Rules

¬(A ∨ B) = ¬A ∧ ¬B
¬(A ∧ B) = ¬A ∨ ¬B

Boolean Algebra Practice


Use the formulas listed above to simplify the following Boolean expressions:

#1#2#3#4#5#6
Boolean Expression
A ∨ ¬(A ∧ B)

Simplified Boolean Expresssion:



Boolean Expression
(A ∧ B) ∨ (A ∧ C)

Simplified Boolean Expresssion:



Boolean Expression
(A ∧ B) ∨ A ∧ (B ∨ C)

Simplified Boolean Expresssion:



Boolean Expression
¬A ∨ C ∨ (A ∧ B)

Simplified Boolean Expresssion:



Boolean Expression
¬(¬A ∧ (B ∧ C))

Simplified Boolean Expresssion:



Boolean Expression
¬(A ∧ ¬B) ∨ (¬A ∧ B)

Simplified Boolean Expresssion:



Big O Notation

The question we will try to answer in this blog post is as follows: How can we measure the effectiveness/performance of an algorithm?

First let’s consider this quote from Bill Gates (Founder of Microsoft):

“Measuring programming progress by lines of code is like measuring aircraft building progress by weight.”

So, according to Bill Gates the length of a program (in lines of code) is not a criteria to consider when evaluating its effectiveness to solve a problem or its performance.

  • A long program does not necessarly mean that the program has been coded the most effectively.
  • And vice-versa, a shorter program does not necessarly perform better than a longer piece of code.

Big O Notation

The Big O notation is used in Computer Science to describe the performance (e.g. execution time or space used) of an algorithm.

The Big O notation can be used to compare the performance of different search algorithms (e.g. linear search vs. binary search), sorting algorithms (insertion sort, bubble sort, merge sort etc.), backtracking and heuristic algorithms, etc. It is especially useful to compare algorithms which will require a large number of steps and/or manipulate a large volume of data (e.g. Big Data algorithms).

Best Case, Average Case or Worst Case Scenario?

The Big O notation can be used to describe either the best case, average case or worst-case scenario of an algorithm. For instance, let’s consider a linear search (e.g. finding a user by its username in a list of 100 users). In the best case scenario, the username being searched would be the first username of the list. In this case the algorithm would complete the search very effectively, in just one iteration. However, the worst case scenario would be that the username being searched is the last of the list. In this case the algorithm would require 100 iterations to find it.

Considering that the average or worst case scenario, we can deduct that a linear search amongst N records could take up to N iterations. There is a linear correlation between the number of records in the data set being searched and the number of iterations of the average case and worst case scenarios.

In this case a linear search would have the following time complexity big O notation:

  • Best Case Scenario:Constant Notation: O(1)
  • Average Case Scenario: Linear Notation: O(N)
  • Worst Case Scenario: Linear Notation: O(N)

So let’s review the different types of algorithm that can be classified using the Big O Notation:

O(1)O(N)O(N2)O(2N)O(log(N))
Big-O-Notation-Constant-Algorithm
Constant Notation: O(1)

The constant notation describes an algorithm that will always execute in the same execution time regardless of the size of the data set.

For instance, an algorithm to retrieve the first value of a data set, will always be completed in one step, regardless of the number of values in the data set.

FUNCTION getFirstElemnt(list)
    RETURN list[0]
END FUNCTION

A hashing algorithm is an O(1) algorithm that can be used to very effectively locate/search a value/key when the data is stored using a hash table. It’s a more effective way than using a linear search O(N) or binary search O(Log(N)) algorithm. (See example blog post on hashing algorithm for memory addressing)

Big-O-Notation-Linear-Algorithm
Linear Notation: O(N)

A linear algorithm is used when the execution time of an algorithm grows in direct proportion to the size of the data set it is processing.

Algorithms, such as the linear search, which are based on a single loop to iterate through each value of the data set are more likely to have a linear notation O(N) though this is not always the case (e.g. binary search).

FUNCTION linearSearch(list, value)
    FOR EACH element IN list
        IF (element == value) 
			RETURN true
		END IF	
	NEXT
    RETURN false
END FUNCTION
Big-O-Notation-Polynomial-Algorithm
Polynomial Notation: O(N2), O(N3), etc.

Polynomial algorithms include quadratic algorithms O(N2), cubic algorithms O(N3) and so on:

  • O(N2) represents an algorithm whose performance is directly proportional to the square of the size of the data set.
  • O(N3) represents an algorithm whose performance is directly proportional to the cube of the size of the data set.
  • etc.

Algorithms which are based on nested loops are more likely to have a polynomial O(N2), or O(N3), etc. depending on the level of nesting.

PROCEDURE displayTimesTable()
	FOR i FROM 1 TO 10
		FOR j FROM 1 TO 10
			product = i*j 
			OUTPUT i + " times " + j + " equals " + product
		NEXT j
	NEXT i
END PROCEDURE

Typically, O(N2) algorithms can be found when manipulating 2-dimensional arrays, O(N3) algorithms can be found when manipulating 3-dimensional arrays and so on.

PROCEDURE emptyChessboardGrid()
	FOR row FROM 0 to 7
		FOR col FROM 0 to 7
			grid[row][col] = 0
		NEXT col
	NEXT row
END PROCEDURE

Most sorting algorithms such as Bubble Sort, Insertion Sort, Quick Sort algorithms are O(N2) algorithms.

Big-O-Notation-Exponential-Algorithm
Exponential Notation: O(2N)

The exponential notation O(2N) describes an algorithm whose growth doubles with each addition to the data set.

Backtracking algorithms which test every possible “pathway” to solve a problem can be based on this notation. Such algorithms become very slow as the data set increases.

Example of exponential algorithm: An algorithm to list all the possible binary permutations depending on the number of digits (bits).

Big-O-Notation-Logarithmic-Algorithm
Logarithmic Notation: O(log(N))

A logarithmic algorithm O(log(N)) is an algorithm whose growth decreases when the data set increase following a logarithmic curve. Logarithmic algorithms are hence quite efficient especially when processing large sets of data.

A binary search is a typical example of logarithmic algorithm. In a binary search, half of the data set is discarded after each iteration. Which means that an algorithm which searches through 2,000,000 values will just need one more iteration than if the data set only contained 1,000,000 values.

binary-search-algorithm
Use a logarithmic algorithm (based on a binary search) to play the game Guess the Number.

Graph Terminology

Graphs are a data structure that can be used in computer science in a variety of context.

You can check the following Python challenges which are all being solved using a graph and a short path algorithm, one of the most useful algorithms used when manipulating graphs.


Using a graph to represent a food web.

Using a graph to represent a food web.

Using a graph to store London tube map.

Using a graph to store London tube map.

Using a graph to represent friendship relationships in a social network.

Using a graph to represent friendship relationships in a social network.

Using a graph to plan a flight route between airports.

Using a graph to plan a flight route between airports.


Graph Terminology


A graph is a collection of nodes also called vertices which are connected between one another. Each connection between two vertices is called an edge (sometimes called a branch).

When designing a graph we can make decisions as to:

  • Use a directed graph or an undirected graph,
  • Use a weighted graph or an unweighted graph.
An undirected graph is when edges have no direction.

An undirected graph is when edges have no direction.

A directed graph is when vertices have a direction.

A directed graph is when edges have a direction.

A weighted graph is when edges have a numerical value.

A weighted graph is when edges have a numerical value.

A weighted and directed graph is where edges have a direction and a numerical value!

A weighted and directed graph is where edges have a direction and a numerical value!

The weight of an edge can have different meanings:

  • It could represent the distance (e.g. in miles) between two vertices,
  • It could represent the time needed to travel (e.g. in minutes) between two vertices,
  • etc…

The direction of an edge is not always needed.

For instance, in a social network like Facebook, there is no need to have directed edges to represent friendship, as if A if a friend of B, then B is also a friend of A. So all edges are both ways, hence an undirected graph is suitable to represent friendship relationships in Facebook.

Twitter however would use a directed graph, as if A follows B, it is not necessary the case that B is following A. With Twitter the edges represent the “Follow” relationship and are directed edges.

Adjacency Matrix

An adjacency matrix is sometimes used to represent a graph. It is based on a 2D-array to represent all the vertices and edges of a graph.

Graph #1Graph #2Graph #3Graph #4Graph #5Graph #6
Graph #1

graph_4_2
Adjacency Matrix #1

A B C D E
A ✔ ✔
B ✔
C ✔
D ✔
E ✔
Graph #2

graph_1_3
Adjacency Matrix #2

A B C D E
A 4 5
B 4 7
C 7 3 6
D
E
Graph #3

graph_3_2
Adjacency Matrix #3

Complete the following adjacency matrix:

A B C D E F
A
B
C
D
E
F
Graph #4

graph_3_3
Adjacency Matrix #4

Complete the following adjacency matrix.

A B C D E F
A
B
C
D
E
F
Graph #5

graph_4_1
Adjacency Matrix #5

Complete the following adjacency matrix.

A B C D E
A
B
C
D
E
Graph #6

graph_2_3
Adjacency Matrix #6

Complete the following adjacency matrix.

A B C D E
A
B
C
D
E

Extension Task:


European-Airports-Graph

Adjacency Matrix

Complete the following adjacency matrix:

  Amsterdam Athens Berlin Bucharest Budapest Dublin Geneva Lisbon London Madrid Oslo Paris Reykjavik Rome
Amsterdam
Athens
Berlin
Bucharest
Budapest
Dublin
Geneva
Lisbon
London
Madrid
Oslo
Paris
Reykjavik
Rome
Tagged with:

Network Security – Terminology

Click on the picture below to check your knowledge of key Network Security concepts: Forms of attacks, threats and approaches to secure a network.

network-security-dominoes

Network Security TerminologyOpen Domino Activity
 
Tagged with:

Random Access Memory using Logic Gates

RAMIn our previous blog post, “Binary Additions using Logic Gates”, we investigated how logic gates can be used together to create a circuit used in the ALU (Arithmetic & Logic Unit of the CPU) to add two binary numbers together.

In this blog post we will investigate how logic gates are used to create the RAM (primary memory), in other words how logic gates can be used to store volatile information.

Random Access Memory


Random Access Memory (RAM) is volatile memory that sits next to the CPU. (Volatile means that it is wiped out when the computer is switched off). It is used to store instructions and data currently used by the CPU.

RAM consists of billions of Data Cells, each data cell being able to store one bit of information. For instance a 2GB RAM can store 2,000,000,000 Bytes of information = 16,000,000,000 bits of information and hence consists of 16,000,000,000 data cells.

D-Type Flip-Flop Circuits


Each data cell consists of a D-Type Flip-Flop circuit that is built using four NAND logic gates connected as follows:
D-Type-Flip-Flop-Logic-Gates

We represent a D-Type Flip-Flop Circuit as follows. You can change the input values D and E by clicking on the corresponding buttons below to see the impact on the outputs Q and Q.




D-Type-Flip-Flop-Circuit




You can also test the behaviour of a D-Type flip-flop circuit using our online simulator:
Click on the above circuit to open in a new window.

A D-Type Flip-Flop Circuit is used to store 1 bit of information. It has two input pins (Called D (Data) and E (Enabler) and two output pins (Q and Q = NOT Q).

The truth table of a D-Type Flip-Flop circuit is as follows:
D-Type-Flip-Flop-Truth-Table

When the enabler input E is set to 1, the output Q can be set to the Data input D.
When the enabler input E is set to 0, the output Q cannot be changed. It remains as its previous value. In other word it retains its value. This is why this circuit is used to create memory cells (e.g in the RAM).

Random Access Memory (RAM) consists of billions of data cells, each data-cell uses a D-Type flip-flop circuit.

Random Access Memory (RAM) consists of billions of data cells, each data-cell uses a D-Type flip-flop circuit.

Clock Signal and Delaying Effect


The enabler input E is often connected to another circuit called the clock (e.g. CPU clock). The clock signal constantly and regularly alternate between two states: 0 and 1, similar to a heart beat. Inside the CPU the clock signal controls the execution of the FDE cycle.

The Clock Signal is similar to a heart beat

The Clock Signal is similar to a heart beat.

When the clock signal is applied to the Enabler input (in this case also called the clock input), the flip-flop output Q can only change values when triggered by the clock signal. The value of the flip-flop is held or delayed until the next clock signal. This delaying effect is also called a latch. This is why we call this circuit a D-Type flip flop where D stands for Delay.

In other words, the change of input (D) is not applied immediately (to the output Q) but is applied at the next “tick of the clock”. There are many applications to this delay such as the ability to create a frequency divider. (divide the clock frequency by a multiple of 2).

Delaying effect when using a D-Type Flip-Flop circuit

Delaying effect when using a D-Type Flip-Flop circuit.

Tagged with: ,

Binary Additions using Logic Gates

In our previous blog post “from transistors to processors” we found out that the CPU consists of logic gates, which are made using transistors.

In this blog post we are looking at how these logic gates can be combined to create an integrated circuit used by the ALU (Arithmetic and Logic Unit of the CPU) to add two 8-bits binary numbers together.

First let’s recap on how a binary addition works:

Half-Adder Circuit


A half-adder circuit is used to add two bits of data together and is based on the following Truth Table.
half-adder-truth-table

A half-adder circuit consists of two logic gates as follows:
Half-Adder

You can test this circuit by clicking on the picture below:

Full-Adder Circuit


A full-adder circuit is used to add three bits of data together and is based on the following Truth Table.
full-adder-truth-table

A full-adder circuit consists of two half-adder circuits and an OR gate connected as follows:
Full-Adder

You can test this circuit by clicking on the picture below:

Full Binary Addition


By connecting an half-adder circuit with 7 full-adder circuits we can create a circuit to implement a full binary addition of two 8-bits binary numbers:
Binary-addition-truth-table

Full circuit:
Binary-addition-using-binary-adder-circuits

Tagged with: ,

From transistors to micro-processors

Vacuum Tubes are the precursors of transistors

Vacuum Tubes are the precursors of transistors

Vacuum Tubes and Transistors:

Many consider the transistor to be one of the most important inventions of all time.

Though the precursors of the transistor were invented in 1907 (at the time they were not transistors yet, they were vacuum tubes called valves), these were soon replaced by smaller components called transistors. These are still the key components of modern computers nowadays.

So what is a transistor?
A transistor is an electronic component with three pins. Basically, a transistor is a switch (between two of the pins: the collector and the emitter) that is operated by having a small current in the third pin called the base.

Use the checkboxes below this transistor to understand how applying a voltage to the base of a transistor is equivalent to turning on a switch.

transistor-00

Apply voltage to: Base   –    Collector

A transistor acts as a switch, operated by applying a current to the base.

A transistor acts like a switch, operated by applying a small current to the base.

Transistors come in many shapes and sizes

Transistors come in many shapes and sizes

Transistors are made by layering three types of materials: conductors, insulators and semiconductors.

Logic Gates?


Logic Gates are made by combining transistors. They enable to apply logic to small currents which are either turned on or off and represent binary information inside a computer. Computers are made by combining logic gates together.

Use the tabs below to see how some of the key logic gates are built using transistors:

AND GateOR GATENOT GATENAND GATE
transistor-AND-Gate
transistor-OR-Gate
transistor-NOT-Gate
transistor-NAND-Gate

Integrated Circuits?


An integrated circuit (also referred to as a chip, or a microchip) is a set of electronic circuits on one small flat piece (or “chip”) of semiconductor material, normally silicon. The integration of large numbers of tiny transistors into a small chip results in circuits that are smaller, cheaper, and faster than those constructed of discrete electronic components.

Integrated Circuit 7408: Quad 2-input AND gate

Integrated Circuit 7408: Quad 2-input AND gate

More complex integrated circuits include binary adders (half-adder, full adder used to perform binary additions) and flip-flop circuits used to implement volatile memory.

List of 7400 series integrated circuits:
https://en.wikipedia.org/wiki/List_of_7400_series_integrated_circuits

Mirco-Processors?


A microprocessor is a computer processor which incorporates the functions of a computer’s central processing unit (CPU) on a single integrated circuit (or at most a few integrated circuits). The microprocessor is a multipurpose, clock driven, register based, digital-integrated circuit which accepts binary data as input, processes it according to instructions stored in its memory, and provides results as output.
A microprocessor is a computer processor which incorporates the functions of a computer's central processing unit (CPU) on a single integrated circuit

A microprocessor is a computer processor which incorporates the functions of a computer’s central processing unit (CPU) on a single integrated circuit



5 Generations of Computers

1st Generation computers used Vacuum Tubes

1st Generation computers used Vacuum Tubes

1st Generation Computers: Vacuum Tubes

Back in the 1950s, computers consisted of vacuum tubes called valves (the precursors of transistors). These valves were quite bulky, like electric bulbs, and produced a lot of heat. The installations used to fuse frequently.

Punch cards, paper tape, and magnetic tape were used as input and output devices. 1st Generation Computers were programmed using machine code.

1st Generation Computers were very expensive and only large organisations were able to afford them.


2nd Generation computers used Transistors

2nd Generation computers used Transistors

2nd Generation Computers: Transistors

In the early 1960s, 2nd Generation computers used transistors to replace the vacuum tubes of 1st generation computers. Therefore 2nd Generation computers were cheaper, consumed less power and were more compact in size. They were also more reliable and faster. More transistors could be used to create more complex computers.

Magnetic tape and magnetic disks were used as secondary storage devices as well as punched tapes which were still used.

2nd Generation Computers were programmed using assembly language and high-level programming languages such as FORTRAN or COBOL. 


3rd Generation computers used integrated circuits.

3rd Generation computers used integrated circuits.

3rd Generation Computers: Integrated Circuits

In the second half of the 1960s, integrated circuits were used by 3rd Generation Computers. An integrated circuit has many transistors, resistors, and capacitors along with the associated circuitry. This development made computers smaller in size, more reliable and efficient.

3rd Generation Computers were programmed using High-level languages (FORTRAN, COBOL, PASCAL, BASIC, ALGOL-68 etc.).

Atari 7800 - Motherboard

Atari 7800 – Motherboard


4th and 5th Generation computers use micro-processor chips.

4th and 5th Generation computers use micro-processor chips.

4th Generation Computers: Micro-Processors

In the 1970s, Computers of 4th generation used Very Large Scale Integrated (VLSI) circuits. VLSI circuits having about 5,000 transistors on a single chip called a micro-processor.

Fourth generation computers became more powerful, compact, reliable, and affordable. They started the Personal Computer (PC) revolution.


5th Generation Computers: Nowadays

The period of fifth generation is 1980-to date. In the fifth generation, VLSI technology became ULSI (Ultra Large Scale Integration) technology, resulting in the production of microprocessor chips having ten million electronic components.


Moore’s Law


The rate at which transistor counts have increased generally follows Moore’s law, which observed that the transistor count doubles approximately every two years. As of 2016, the largest transistor count in a commercially available single-chip processor was over 7.2 billion.

Tagged with: ,

Air Flight Route Planner

plane-globeFor this challenge you will use a graph data structure to create an Air Fligh Route Planner for a fictitious airline company offering flights across Europe.

Here is a map showing all the direct flights offered by this airline company:
European-Airports-Graph

Your task consists of implementing a graph data structure to store all the airports and connections for the above map using Python.

You will then use a range of algorithms to let the user choose an origin and a destination (e.g. From Dublin to Athens) and your program will:

  • Inform the user if there is a direct fight to match the user requirements,
  • If not, inform the user of the shortest route between the two airports, indicating all the stops between both airports.

Tip: To complete this challenge, we recommend you to be familiar with graph data structures (and how to implement them in Python) and key algorithms used with graphs (including shortest path algorithm) by reading our blog post: London Underground Journey Planner.

Complete the code using Python


unlock-access

Solution...

The solution for this challenge is available to full members!
Find out how to become a member:
➤ Members' Area
Tagged with: ,
Privacy Overview

This website will store some information about your preferences on your own computer inside a tiny file called a cookie. A cookie is a small piece of data that a website asks your browser to store on your computer or mobile device. The cookie allows the website to remember your actions or preferences over time.

You can delete all cookies that are already on your computer, and you can set most browsers to prevent them from being placed. However, if you do this, you may have to manually adjust some preferences every time you visit a site, and some services and functionalities may not work.

Most browsers support cookies, but you can set your browser to decline them and can delete them whenever you like. You can find instructions here for how you can do that on various browsers.

This website uses cookies to:

  1. Identify you as a returning user and to count your visits in traffic statistics analysis
  2. Remember your custom display preferences (such as light/dark theme option)
  3. Provide other usability features, including tracking whether you have already given your consent to cookies

Enabling cookies is not strictly necessary for the website to work but it will provide you with a better browsing experience.

The cookie-related information is not used to identify you personally and is not used for any purpose other than those described here.

There may also be other types of cookies created after you have visited this website. This site uses Google Analytics, a popular web analytics service that uses cookies to help to analyse how users use the site. The information generated by the cookie about your use of this website (including your IP address) will be transmitted to and stored by Google on servers in the United States. Google will use this information for the purpose of evaluating your use of other website, compiling reports on website activity, and providing other services relating to website activity and internet usage. Google may also transfer this information to third parties where required to do so by law, or where such third parties process the information on Google’s behalf. Google undertakes not to associate your IP address with any other data held by Google.