Difference between revisions of "Finite State Machine"

From Progzoo
Jump to: navigation, search
(Even Binary Numbers - Absracted)
(Even Binary Numbers - Absracted)
Line 53: Line 53:
  
  
==Even Binary Numbers - Absracted==
+
==Even Binary Numbers - Abtsracted==
  
 
<question className='EvenBinary'>
 
<question className='EvenBinary'>
 
<prog><![CDATA[
 
<prog><![CDATA[
import java.util.TreeMap;
+
import java.util.HashMap;
 
public class EvenBinary{
 
public class EvenBinary{
  
Line 69: Line 69:
 
   public static boolean sm(String s)
 
   public static boolean sm(String s)
 
   {
 
   {
     TreeMap<States,TreeMap<String,States>> d =  
+
     HashMap<States,HashMap<String,States>> d =  
       new TreeMap<States,TreeMap<String,States>>();
+
       new HashMap<States,HashMap<String,States>>();
     d.put(States.S,new TreeMap<String,States>());
+
     d.put(States.S,new HashMap<String,States>());
     d.put(States.A,new TreeMap<String,States>());
+
     d.put(States.A,new HashMap<String,States>());
     d.put(States.B,new TreeMap<String,States>());
+
     d.put(States.B,new HashMap<String,States>());
 
     d.get(States.S).put("1",States.B);
 
     d.get(States.S).put("1",States.B);
 
     d.get(States.A).put("0",States.A);
 
     d.get(States.A).put("0",States.A);

Revision as of 20:57, 16 February 2012

Finite State Machines

Even Binary Numbers


[Font] [Default] [Show] [Resize] [History] [Profile]


Even Binary Numbers - Abtsracted


[Font] [Default] [Show] [Resize] [History] [Profile]

What is the function


[Font] [Default] [Show] [Resize] [History] [Profile]


What is the function


[Font] [Default] [Show] [Resize] [History] [Profile]

What is the function


[Font] [Default] [Show] [Resize] [History] [Profile]