- In Algorithm 1.1.2 page 20, the while loop checks if T spans G. Shouldn't it check if T spans C_G(V) -- the component of the graph G, just like in Algorithm 1.1.1?
- E3: Page 23 -- For k = 0,1,2,3, there is exactly one k-regular simple graph with 4 vertices. (There are three 1-regular graphs with 4-vertices, though all of them are isomorphic -- does this need to be clarified?)
- Algorithm 2.1.2 Breadth-First Search (page 61) --
- change if mark[w] = visited then to if mark[w] != visited then
- change distance[w] := distance[v] + 1 (not distance[w] + 1)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
➜ combinatorial-algorithms git:(master) ✗ java RandomSubsetSimulation 4 12800 | |
Frequencies of chosen subsets .... | |
[1, 2, 3] : 1011, -211, 7.90 | |
[1] : 344, 456, 2.69 | |
[1, 2, 4] : 2214, -1414, 17.30 | |
[1, 3] : 2178, -1378, 17.02 | |
[1, 2] : 1568, -768, 12.25 | |
[1, 4] : 2064, -1264, 16.13 | |
[1, 2, 3, 4] : 2531, -1731, 19.77 | |
[1, 3, 4] : 890, -90, 6.95 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Frequencies of chosen subsets .... | |
[3] : 792085, 7915, 6.19 | |
[4] : 781218, 18782, 6.10 | |
[] : 899949, -99949, 7.03 | |
[1] : 879742, -79742, 6.87 | |
[2] : 775863, 24137, 6.06 | |
[3, 4] : 681955, 118045, 5.33 | |
[2, 3] : 706396, 93604, 5.52 | |
[2, 4] : 723973, 76027, 5.66 | |
[1, 2, 3] : 851952, -51952, 6.66 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
➜ combinatorial-algorithms git:(master) ✗ java RandomSubsetSimulation 4 128000 | |
Frequencies of chosen subsets .... | |
[1, 2, 3] : 12834, -4834, 10.03 | |
[1] : 17179, -9179, 13.42 | |
[1, 2, 4] : 15348, -7348, 11.99 | |
[1, 3] : 22262, -14262, 17.39 | |
[1, 2] : 13894, -5894, 10.85 | |
[1, 4] : 20546, -12546, 16.05 | |
[1, 2, 3, 4] : 16307, -8307, 12.74 | |
[1, 3, 4] : 9630, -1630, 7.52 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
➜ combinatorial-algorithms git:(master) ✗ java RandomSubsetSimulation 4 128000000 | |
Frequencies of chosen subsets .... | |
[3] : 8917285, -917285, 6.97 | |
[] : 10765317, -2765317, 8.41 | |
[4] : 9015332, -1015332, 7.04 | |
[1] : 8605043, -605043, 6.72 | |
[2] : 9261979, -1261979, 7.24 | |
[3, 4] : 8277852, -277852, 6.47 | |
[2, 3] : 8270102, -270102, 6.46 | |
[2, 4] : 7998797, 1203, 6.25 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Stringy.java | |
------------- | |
class Stringy { | |
public static void main(String[] args) { | |
String s = new StringBuilder().append("a").append("b").append("c").toString(); | |
} | |
} | |
javap -c -all Stringy: | |
---------------------- |
Here's the list of items that I think need update:
- Ubuntu Unity Desktop -- based on Waylan or Wayland? Consider providing a link to that project.
- Print version information of installed APT utilities with this command: (it's not apt-config -V, but apt-config -v)
- Sometimes while doing sudo apt-get install, I get:
- /var/lib/dpkg/info/bzflag-server.postinst: 6: /var/lib/dpkg/info/bzflag-server.postinst: update-rc.d: not found dpkg: error processing package bzflag-server (--configure): subprocess installed post-installation script returned error exit status 127
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
Compile and run as java KnightsTour a1 | |
*/ | |
import java.util.*; | |
class KnightsTour { | |
public static void main(String[] args) { | |
String start = args[0]; | |
Board.setStart(start); | |
if(solve(start)) | |
Board.draw(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.io.InputStream; | |
import java.io.OutputStream; | |
import java.io.PrintWriter; | |
import java.util.*; | |
/** | |
* A class to implement http://www.quora.com/challenges#nearby | |
* @author Kedar Mhaswade | |
*/ | |
public class Nearby { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.io.PrintStream; | |
import java.io.PrintWriter; | |
import java.util.Random; | |
/** A class to generate somewhat larger test dataset for http://www.quora.com/challenges#nearby | |
* @author Kedar Mhaswade | |
*/ | |
public class NearbyDataset { | |
static final Random r = new Random(); | |
public static void main(String[] args) { |