home / about / submit a resource / contact us

Teaching with the Applets

My recommendations for using the applets in teaching are:

  • Demonstrate one or more scenarios of the algorithm, using a screen projector if you have one.
  • During a lab, require the students to create one or more scenarios that correctly follow the algorithm from start to finish. This is a non-trivial task and will help the student develop a full understanding of the algorithm!
  • For further lab work or homework, pose questions that can be solved by creating and analyzing scenarios.

Example

The following example (adapted from an examination question written by Yifat Ben-David Kolikant) shows how scenario-based questions can be posed.

In the algorithm for the Byzantine Generals, suppose that there is exactly one traitor and that the applet for Zoe displays the following information:

   General Zoe . Plan is A. Decision is to XX.


   John  sent A, Leo  relayed A, Basil relayed R.   Vote XX.

   Leo   sent R, John relayed R, Basil relayed R.   Vote XX.

   Basil sent R, John relayed A, Leo   relayed R.   Vote XX.

 Questions

  • Can you tell who the traitor is?
  • Fill in the values marked XX.
  • Create a scenario leading to this display for Zoe.
    Use the minimum number of steps to obtain this display.
  • What is displayed for the other generals?

 Answers

  • You cannot tell who the traitor is, but you can tell that it isn't Leo. Since there is only one traitor, John and Basil must both be loyal. But then they can't disagree on what John thinks: John sent A while Basil relayed R.
  • The preliminary votes are A, R, R (from top to bottom). Together with Zoe's plan of A, the final vote is 2-2, and ties are resolved in favor of R.
  • Let John be the traitor. Leo and Basil who are loyal both choose Retreat and relay their plan truthfully. John sends Retreat to Leo, and Attack to both Zoe and Basil.
  • Here are the applet displays after a minimal scenario with John as the traitor.

 

   General Zoe . Plan is A. Decision is to R

                          Relay plan to John Leo Basil

   John  sent A, Leo  relayed A, Basil relayed R.   Vote A

                          Relay plan to Leo Basil

   Leo   sent R, John relayed R, Basil relayed R.   Vote R

                          Relay plan to John Basil

   Basil sent R, John relayed A, Leo   relayed R.   Vote R

                          Relay plan to John Leo 



   General John . Plan is A. Decision is to ?.

   Zoe   sent ?, Leo  relayed ?, Basil relayed ?.   Vote ?.

   Leo   sent R, Zoe  relayed ?, Basil relayed ?.   Vote ?.

                          Relay plan to Basil

   Basil sent R, Zoe  relayed ?, Leo   relayed ?.   Vote ?.

                          Relay plan to Leo



   General Leo  . Plan is R. Decision is to ?.

   John  sent A, Leo  relayed ?, Basil relayed ?.   Vote ?.

                          Relay plan to Basil

   Zoe   sent ?, John relayed ?, Basil relayed ?.   Vote ?.
     
   Basil sent R, John relayed ?, Zoe   relayed ?.   Vote ?.

                          Relay plan to John

 

   General Basil. Plan is R. Decision is to ?.

   John  sent R, Leo  relayed ?, Basil relayed ?.   Vote ?.

                          Relay plan to Leo

   Zoe   sent ?, Zoe  relayed ?, Basil relayed ?.   Vote ?.
            
   Leo   sent R, Zoe  relayed ?, Leo   relayed ?.   Vote ?.

                          Relay plan to John