Jump to main content
FSR:IF - Student representative council of Computer Science
Self test

Preliminary note

This simple self-test has been made in 2001 and contains 7 questions, which are collected to give prospective coumpter science students a feeling for the topics they will deal with during their studies. The questions were formulated in such a way that no skills which have to be learned during the studies are required. It rather depicts basic skills you should have as a computer scientist to complete your studies successfully.

You should take approximately one hour to solve these tasks. If your answers differ very much from the suggested solutions or you have difficulties to find an answer on a question, we recommend you to take a detailed study consultation and maybe reconsider your choice of study. Maybe the self-assessment-test [de] provided on the website of the Faculty of Computer Science can also help you.

Please also be aware that most basic study programmes (Bachelor's programmes) are mainly in German, so please also consider taking the german version of this test. Please be aware too that this test is translated from German to English, so there might be some mistakes in the translation.


There are three types of components given.

if there's current at exactly both inputs, the output produces current.
one is enough"one is enough":
as soon as there's current at one input, the output produces current.
if there's current at the input, the output doesn't produce current; if there's no current at the input, the output produces current.

1a) Is the light bulb illuminated in the following circuit?

circuit 1

1b) Which components are needed in the following circuit to ensure the light bulb is illuminated only under the following conditions:

  • switch C (as emergency switch) must always be set to Off and
  • either switch A and switch B are set to On at the same time
  • and/or switches D and E are set to On at the same time.
circuit 2
Solution for 1a

Solution for 1b

There is a group of people. Some know each other well and tell each other every secret, others do not like each other and do not talk to each other. The following persons are known: Guido, Gudula, Wolf, Petr, Peter, Werner, Winfried, Dieter, Wolfgang, Uwe, Hanno, Andreas.

Is it possible that a secret which Guido knows can be told to Hanno, when the following relationships apply?

  • Guido only talks with Petr and Gudula
  • Gudula only talks with Wolf and Guido
  • Wolf only talks to Peter and Gudula
  • Petr only talks with Guido, Wolfgang and Peter
  • Peter only talks with Wolf, Petr, Wolfgang, Werner, Winfried and Dieter
  • Werner only talks with Peter and Winfried
  • Winfried only talks with Peter and Werner
  • Dieter only talks with Wolfgang, Hanno and Peter
  • Wolfgang only talks with Petr, Peter, Uwe and Dieter
  • Uwe only talks with Wolfgang and Andreas
  • Hanno only talks with Andreas and Dieter
  • Andreas only talks with Hanno and Uwe

Also, which is the shortest way (way including the fewest persons) from Werner to Andreas?

Solution for Task 2

For a roof truss, wooden beams must be sawn to size. Beams of 10 m length are supplied. The following cuttings are required:

  • 1 x 5 metres
  • 2 x 2 metres
  • 3 x 6 metres
  • 4 x 3 metres
  • 6 x 1 metre

3a) How many beams of 10 m need to be bought?
3b) Where are the cuts placed?

Where to place the cuts?
Solution for Task 3

While surfing the internet, you notice that the web pages are not displayed fast enough. You are currently using an Athlon processor with 2.1 GHz, 512 MB RAM and a 56k modem on an analogue telephone connection. How could you achieve that the web pages are displayed faster?

  • build in a faster Pentium IV CPU
  • build in more RAM
  • use a internet modem
  • change the provider
  • disable loading pictures
Solution for Task 4

In a house there are three light bulbs hanging in the attic (although it can be assumed that they are working and switched off). The corresponding switches are in the basement due to a design flaw. Unfortunately it is also not known which switch belongs to which light bulb. The house owner - a very lazy computer scientist ;-) - wants to find out with as little effort as possible which switch operates which light bulb.

He is in the basement and wants to climb the long stairs up to the attic only once. How can he still find out the correlation between the switches and light bulbs? No other person helps him, no technical aids are allowed, the cellar has no windows and must not be entered again after leaving.

Solution for Task 5

The function of the Fibonacci numbers is defined as following:

f ( n ) = 1 n = 1 or  n = 2 f ( n - 1) + f ( n - 2) otherwise

Determine the value of f(7).

Solution for Task 6

A programming system consists of the following commands:

OUTPUT  x       prints x onto the screen
IF  x  DO  y       in case that x contains a true statement, y is executed
Go TO  x       continues the execution at line x
(x and y can be either simple variables, statements or other commands)

A program consists of numbered lines. These lines contain the above mentioned commands or mathematical expressions of the form variable := expression. A mathematical expression can be, for example: a simple number, a mathematical operation (1+2, 3*x, ...) or a comparison (1<2, 2=x, ...).

How can you realize a program which outputs "Hello Uni" 5 times in a row without simply writing the command OUTPUT "Hello Uni" 5 times.

Solution for Task 7