Permalink
Browse files

Add the witex layout

  • Loading branch information...
1 parent 31feb44 commit 12a673c479566204ddad9e0e255365c5c97d0e9b @mixu committed Feb 12, 2015
View
@@ -0,0 +1,3 @@
+output/
+screenshots/
+
View
@@ -1,45 +1,47 @@
-GitHub Flavored Markdown
-================================
+# Strongly connected graph
-*View the [source of this content](http://github.github.com/github-flavored-markdown/sample_content.html).*
+In the mathematical theory of [directed graphs](http://en.wikipedia.org/wiki/Directed_graph), a graph is said to be **strongly connected** if every vertex is [reachable](http://en.wikipedia.org/wiki/Reachable) from every other vertex. The **strongly connected components** of an arbitrary directed graph form a [partition](http://en.wikipedia.org/wiki/Partition) into subgraphs that are themselves strongly connected. It is possible to test the strong connectivity of a graph, or to find its strongly connected components, in [linear time](http://en.wikipedia.org/wiki/Linear_time).
-Let's get the whole "linebreak" thing out of the way. The next paragraph contains two phrases separated by a single newline character:
+## Definitions
-Roses are red
-Violets are blue
+A [directed graph](http://en.wikipedia.org/wiki/Directed_graph) is called **strongly connected** if there is a [path](http://en.wikipedia.org/wiki/Path) in each direction between each pair of vertices of the graph. In a directed graph *G* that may not itself be strongly connected, a pair of vertices *u* and *v* are said to be strongly connected to each other if there is a path in each direction between them.
-The next paragraph has the same phrases, but now they are separated by two spaces and a newline character:
+The [binary relation](http://en.wikipedia.org/wiki/Binary_relation) of being strongly connected is an [equivalence relation](http://en.wikipedia.org/wiki/Equivalence_relation), and the [induced subgraphs](http://en.wikipedia.org/wiki/Induced_subgraph) of its [equivalence classes](http://en.wikipedia.org/wiki/Induced_subgraph) are called **strongly connected components**. Equivalently, a **strongly connected component** of a directed graph *G* is a subgraph that is strongly connected, and is [maximal](http://en.wikipedia.org/wiki/Maximal) with this property: no additional edges or vertices from *G* can be included in the subgraph without breaking its property of being strongly connected. The collection of strongly connected components forms a [partition][1] of the set of vertices of *G*.
-Roses are red
-Violets are blue
+If each strongly connected component is [contracted](http://en.wikipedia.org/wiki/Contracted) to a single vertex, the resulting graph is a [directed acyclic graph](http://en.wikipedia.org/wiki/DAG), the **condensation** of *G*. A directed graph is acyclic if and only if it has no strongly connected subgraphs with more than one vertex, because a directed cycle is strongly connected and every nontrivial strongly connected component contains at least one directed cycle.
-Oh, and one thing I cannot stand is the mangling of words with multiple underscores in them like perform_complicated_task or do_this_and_do_that_and_another_thing.
+## Algorithms
-A bit of the GitHub spice
--------------------------
+Several algorithms can compute strongly connected components in [linear
+time](http://en.wikipedia.org/wiki/Linear_time).
-In addition to the changes in the previous section, certain references are auto-linked:
+- [Kosaraju's algorithm](http://en.wikipedia.org/wiki/DAG) uses two passes of [depth first search](http://en.wikipedia.org/wiki/DAG). The first, in the original graph, is used to choose the order in which the outer loop of the second depth first search tests vertices for having been visited already and recursively explores them if not. The second depth first search is on the [transpose graph](http://en.wikipedia.org/wiki/DAG) of the original graph, and each recursive exploration finds a single new strongly connected component. It is named after [S. Rao Kosaraju](http://en.wikipedia.org/wiki/DAG), who described it (but did not publish his results) in 1978; [Micha Sharir](http://en.wikipedia.org/wiki/DAG) later published it in 1981.
+- [Tarjan's strongly connected components algorithm](http://en.wikipedia.org/wiki/DAG), published by [Robert Tarjan](http://en.wikipedia.org/wiki/DAG) in 1972, performs a single pass of depth first search. It maintains a [stack](http://en.wikipedia.org/wiki/DAG) of vertices that have been explored by the search but not yet assigned to a component, and calculates “low numbers” of each vertex (an index number of the highest ancestor reachable in one step from a descendant of the vertex) which it uses to determine when a set of vertices should be popped off the stack into a new component.
+- The [path-based strong component algorithm](http://en.wikipedia.org/wiki/DAG) uses a depth first search, like Tarjan's algorithm, but with two stacks. One of the stacks is used to keep track of the vertices not yet assigned to components, while the other keeps track of the current path in the depth first search tree. The first linear time version of this algorithm was published by [Edsger W. Dijkstra](http://en.wikipedia.org/wiki/DAG) in 1976.
-* SHA: be6a8cc1c1ecfe9489fb51e4869af15a13fc2cd2
-* User@SHA ref: mojombo@be6a8cc1c1ecfe9489fb51e4869af15a13fc2cd2
-* User/Project@SHA: mojombo/god@be6a8cc1c1ecfe9489fb51e4869af15a13fc2cd2
-* \#Num: #1
-* User/#Num: mojombo#1
-* User/Project#Num: mojombo/god#1
+Although Kosaraju's algorithm is conceptually simple, Tarjan's and the
+path-based algorithm are favoured in practice since they require only
+one [depth-first search](http://en.wikipedia.org/wiki/DAG) rather than two.
-These are dangerous goodies though, and we need to make sure email addresses don't get mangled:
+## Applications
-My email addy is tom@github.com.
+Algorithms for finding strongly connected components may be used to
+solve [2-satisfiability](http://en.wikipedia.org/wiki/DAG) problems (systems of Boolean variables with constraints on the values of pairs of variables): as showed, a [2-satisfiability](http://en.wikipedia.org/wiki/DAG) instance is unsatisfiable if and only if there is a variable *v* such that *v* and its complement are both contained in the same strongly connected component of the [implication graph](http://en.wikipedia.org/wiki/DAG) of the instance.
-Math is hard, let's go shopping
--------------------------------
+Strongly connected components are also used to compute the [Dulmage–Mendelsohn decomposition](http://en.wikipedia.org/wiki/DAG), a classification of the edges of a [bipartite graph](http://en.wikipedia.org/wiki/DAG), according to whether or not they can be part of a [perfect matching](http://en.wikipedia.org/wiki/DAG) in the graph.
-In first grade I learned that 5 > 3 and 2 < 7. Maybe some arrows. 1 -> 2 -> 3. 9 <- 8 <- 7.
+## Related results
-Triangles man! a^2 + b^2 = c^2
+A directed graph is strongly connected if and only if it has an [ear decomposition](http://en.wikipedia.org/wiki/DAG), a partition of the edges into a sequence of directed paths and cycles such that the first subgraph in the sequence is a cycle, and each subsequent subgraph is either a cycle sharing one vertex with previous subgraphs, or a path sharing its two endpoints with previous subgraphs.
-We all like making lists
-------------------------
+According to [Robbins' theorem](http://en.wikipedia.org/wiki/DAG), an undirected graph may be [oriented](http://en.wikipedia.org/wiki/Linear_time) in such a way that it becomes strongly connected, if and only if it is [2-edge-connected](http://en.wikipedia.org/wiki/DAG). One way to prove this result is to find an ear decomposition of the underlying undirected graph and then orient each ear consistently.
+
+## See also
+
+- [Connected component](http://en.wikipedia.org/wiki/DAG)
+- [Modular decomposition](http://en.wikipedia.org/wiki/DAG)
+
+## We all like making lists
The above header should be an H2 tag. Now, for a list of fruits:
@@ -82,8 +84,7 @@ Some people seem to like definition lists
<dd>We've changed the product so that it's much easier to use!</dd>
</dl>
-I am a robot
-------------
+## I am a robot
Maybe you want to print `robot` to the console 1000 times. Why not?
@@ -111,8 +112,7 @@ Year,Make,Model,Length
1/2/06,Mercury,Cougar,2.38
```
-Set in stone
-------------
+## Set in stone
Preformatted blocks are useful for ASCII art:
@@ -130,8 +130,8 @@ Preformatted blocks are useful for ASCII art:
___|_____________
</pre>
-Playing the blame game
-----------------------
+## Playing the blame game
+
If you need to blame someone, the best way to do so is by quoting them:
@@ -149,8 +149,8 @@ Or perhaps someone a little less eloquent:
> just put me under the spot here, and maybe I'm not as quick on my feet
> as I should be in coming up with one.
-Table for two
--------------
+## Table for two
+
<table>
<tr>
@@ -164,8 +164,7 @@ Table for two
</tr>
</table>
-Crazy linking action
---------------------
+## Crazy linking action
I get 10 times more traffic from [Google] [1] than from
[Yahoo] [2] or [MSN] [3].
@@ -0,0 +1,124 @@
+/*
+
+github.com style (c) Vasily Polovnyov <vast@whiteants.net>
+
+*/
+
+.hljs {
+ display: block;
+ overflow-x: auto;
+ padding: 0.5em;
+ color: #333;
+ background: #f8f8f8;
+ -webkit-text-size-adjust: none;
+}
+
+.hljs-comment,
+.diff .hljs-header,
+.hljs-javadoc {
+ color: #998;
+ font-style: italic;
+}
+
+.hljs-keyword,
+.css .rule .hljs-keyword,
+.hljs-winutils,
+.nginx .hljs-title,
+.hljs-subst,
+.hljs-request,
+.hljs-status {
+ color: #333;
+ font-weight: bold;
+}
+
+.hljs-number,
+.hljs-hexcolor,
+.ruby .hljs-constant {
+ color: #008080;
+}
+
+.hljs-string,
+.hljs-tag .hljs-value,
+.hljs-phpdoc,
+.hljs-dartdoc,
+.tex .hljs-formula {
+ color: #d14;
+}
+
+.hljs-title,
+.hljs-id,
+.scss .hljs-preprocessor {
+ color: #900;
+ font-weight: bold;
+}
+
+.hljs-list .hljs-keyword,
+.hljs-subst {
+ font-weight: normal;
+}
+
+.hljs-class .hljs-title,
+.hljs-type,
+.vhdl .hljs-literal,
+.tex .hljs-command {
+ color: #458;
+ font-weight: bold;
+}
+
+.hljs-tag,
+.hljs-tag .hljs-title,
+.hljs-rules .hljs-property,
+.django .hljs-tag .hljs-keyword {
+ color: #000080;
+ font-weight: normal;
+}
+
+.hljs-attribute,
+.hljs-variable,
+.lisp .hljs-body {
+ color: #008080;
+}
+
+.hljs-regexp {
+ color: #009926;
+}
+
+.hljs-symbol,
+.ruby .hljs-symbol .hljs-string,
+.lisp .hljs-keyword,
+.clojure .hljs-keyword,
+.scheme .hljs-keyword,
+.tex .hljs-special,
+.hljs-prompt {
+ color: #990073;
+}
+
+.hljs-built_in {
+ color: #0086b3;
+}
+
+.hljs-preprocessor,
+.hljs-pragma,
+.hljs-pi,
+.hljs-doctype,
+.hljs-shebang,
+.hljs-cdata {
+ color: #999;
+ font-weight: bold;
+}
+
+.hljs-deletion {
+ background: #fdd;
+}
+
+.hljs-addition {
+ background: #dfd;
+}
+
+.diff .hljs-change {
+ background: #0086b3;
+}
+
+.hljs-chunk {
+ color: #aaa;
+}
@@ -0,0 +1,97 @@
+/*********************************************************************
+This is free and unencumbered software released into the public domain.
+
+Anyone is free to copy, modify, publish, use, compile, sell, or
+distribute this software, either in source code form or as a compiled
+binary, for any purpose, commercial or non-commercial, and by any
+means.
+
+For more information, please refer to <http://unlicense.org/>
+*********************************************************************/
+
+/*
+WiTeX
+https://github.com/AndrewBelt/WiTeX
+*/
+
+
+/* Latin Modern (LaTeX default) font */
+
+@font-face {
+ font-family: 'Latin Modern Roman';
+ font-weight: normal;
+ font-style: normal;
+ src: url('../fonts/lmroman10-regular.woff') format('woff');
+}
+
+@font-face {
+ font-family: 'Latin Modern Roman';
+ font-weight: bold;
+ font-style: normal;
+ src: url('../fonts/lmroman10-bold.woff') format('woff');
+}
+
+@font-face {
+ font-family: 'Latin Modern Roman';
+ font-weight: normal;
+ font-style: italic;
+ src: url('../fonts/lmroman10-italic.woff') format('woff');
+}
+
+@font-face {
+ font-family: 'Latin Modern Roman';
+ font-weight: bold;
+ font-style: italic;
+ src: url('../fonts/lmroman10-bolditalic.woff') format('woff');
+}
+
+/* Page Layout */
+
+body {
+ background: none;
+ font-size: 13pt;
+}
+
+body {
+ font-family: 'Latin Modern Roman', serif;
+}
+
+h1, h2, h3, h4, h5, h6 {
+ border: none;
+ font-weight: bold;
+}
+
+a, a:visited {
+ color: #a00;
+}
+
+ul {
+ list-style: disc;
+}
+
+/* Content Box */
+
+.content {
+ max-width: 720px;
+ margin: 2em auto;
+}
+
+.content > h1:first-child {
+ text-align: center;
+ display: block;
+}
+
+/* Article Body */
+
+.content {
+ text-align: justify;
+ -moz-hyphens: auto;
+ -webkit-hyphens: auto;
+ hyphens: auto;
+}
+
+dl dd {
+ /* center definitions (most useful for display equations) */
+ text-align: center;
+}
+
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,14 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <title>{{title}}</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ <link href="{{asset 'css/style.css'}}" rel="stylesheet"></link>
+ <link type="text/css" rel="stylesheet" href="{{asset 'css/hljs-github.min.css'}}"/>
+ </head>
+<body>
+<div class="content">
+{{~> content}}
+</div>
+</body>
+</html>
View
@@ -45,6 +45,8 @@
<a href="thomasf-solarizedcssdark/index.html" target="content">thomasf-solarizedcssdark</a>
<a href="bootstrap3/index.html" target="content">bootstrap3</a>
+
+ <a href="witex/index.html" target="content">witex</a>
</p>
</body>

0 comments on commit 12a673c

Please sign in to comment.