Browse Source

notes on fix.

master
Charles Reid 8 years ago
parent
commit
31c0c8425b
  1. 14
      018/Path.java

14
018/Path.java

@ -4,6 +4,20 @@ import java.io.FileReader; @@ -4,6 +4,20 @@ import java.io.FileReader;
import java.io.BufferedReader;
import java.io.FileNotFoundException;
/*
*
To fix:
don't use the sum of the subtree,
use the EXPECTATION:
E(subtree) = E(level1)+E(level2)+...
E(level1) = one possibility
E(level2) = (1/2)(outcome1) + (1/2)(outcome2)
E(level3) = (1/4)(outcome1) + (1/4)(outcome2) + (1/4)(outcome3) + (1/4)(outcome4)
*/
public class Path {
public static final String FILE = "tri_test2.txt";

Loading…
Cancel
Save