Common student exercises in computer science: Difference between revisions

From Citizendium
Jump to navigation Jump to search
imported>Petréa Mitchell
m (Looks live to me)
imported>Paul Wormer
mNo edit summary
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
{{subpages}}
[[Computer science]], being a rather abstract science, likes to teach some of its principles using more or less concrete problems. These '''Scholary problems''' used for teaching '''in computer science''' are often not only intended as  examples but also serve to lighten the mood and improve the recollection of the students. Often these problem appeared in a text book or article before becoming famous. Some of them (e.g. the [[Byzantine generals problem]]) even coined new terms (here: [[Byzantine error]]). Some of these problems are:  
[[Computer science]], being a rather abstract science, likes to teach some of its principles using more or less concrete problems. These '''Scholary problems''' used for teaching '''in computer science''' are often not only intended as  examples but also serve to lighten the mood and improve the recollection of the students. Often these problem appeared in a text book or article before becoming famous. Some of them (e.g. the [[Byzantine generals problem]]) even coined new terms (here: [[Byzantine error]]). Some of these problems are:  


Line 10: Line 12:
; [[Is a square a rectangle?]] : Most [[object-oriented programming language]]s just say "No"! Example used to explain why combining [[inheritance]] and [[specialization]] relationships into the [[subclass]] relationship might not have been such a good idea after all.
; [[Is a square a rectangle?]] : Most [[object-oriented programming language]]s just say "No"! Example used to explain why combining [[inheritance]] and [[specialization]] relationships into the [[subclass]] relationship might not have been such a good idea after all.


; [[Bus paradox]] : Does a bus (with wheels) with [[poisson distribution|poisson-distributed]] [[markov process|inter-arrival times]] arrive every λ or every two λ? Shows the fallacies of not seeing the trap in the professor's logic in [[probability|probability theory]].
; [[Bus paradox]] : Does a bus (with wheels) with [[Poisson distribution|poisson-distributed]] [[markov process|inter-arrival times]] arrive every λ or every two λ? Shows the fallacies of not seeing the trap in the professor's logic in [[probability|probability theory]].
 
[[Category:CZ Live]]
[[Category:Computers Workgroup]]

Latest revision as of 12:04, 23 April 2009

This article is developing and not approved.
Main Article
Discussion
Definition [?]
Related Articles  [?]
Bibliography  [?]
External Links  [?]
Citable Version  [?]
 
This editable Main Article is under development and subject to a disclaimer.

Computer science, being a rather abstract science, likes to teach some of its principles using more or less concrete problems. These Scholary problems used for teaching in computer science are often not only intended as examples but also serve to lighten the mood and improve the recollection of the students. Often these problem appeared in a text book or article before becoming famous. Some of them (e.g. the Byzantine generals problem) even coined new terms (here: Byzantine error). Some of these problems are:

Hello World
Write one of the smallest possible programs printing "Hello World" on the screen. Simple problem to show syntax.
Eight queens problem
Arrange eight queens on a chess board so that none can capture the others. The implementation of this problem uses recursion and backtracking.
Dining philosophers problem
Five philosophers want to eat spaghetti with five forks but each one needs two of them. Shows the concepts of deadlock and starvation(!).
Byzantine generals problems
A number of locally distributed byzantine generals try to reach a consensus on when to attack a superior enemy. But there are traitors amongst them. Demonstrates failure scenarios where fault tolerance becomes difficult.
Is a square a rectangle?
Most object-oriented programming languages just say "No"! Example used to explain why combining inheritance and specialization relationships into the subclass relationship might not have been such a good idea after all.
Bus paradox
Does a bus (with wheels) with poisson-distributed inter-arrival times arrive every λ or every two λ? Shows the fallacies of not seeing the trap in the professor's logic in probability theory.