Bob
BOB - A SAT-based solver for linear layouts of graphs
Install / Use
/learn @spupyrev/BobREADME
Overview
BOB is a SAT-based tool for constructing optimal linear layouts of graphs. With a modern SAT solver, it is capable to compute optimal stack, queue, or track layouts of graphs with hundreds of vertices within several minutes.
Visit https://spupyrev.github.io/linearlayouts.html for a survey of existing results regarding upper and lower bounds on stack number, queue number and track number of various classes of graphs. If you use BOB in your research, please cite it as follows:
@misc{bob,
author = {Pupyrev, Sergey},
title = {A {SAT}-based solver for constructing optimal linear layouts of graphs},
howpublished = {\url{https://github.com/spupyrev/bob}},
year = {2017},
note = {Accessed: today's date}
}
Basic Setup
-
Compile the library by running:
make -
Run the tool:
bob -i=graphs/graph.dot -o=graph.dimacs -stacks=3The tool accepts graphs in the DOT and GML formats. The output is the DIMACS format. For the list of supported options use:
bob -help -
Download and setup a SAT solver such as Lingeling or Glucose
-
Use the SAT solver to test embeddability of the graph:
treengeling graph.dimacs > result.dimacs -
Print the resulting layout:
bob -i=graphs/graph.dot -result=result.dimacs -stacks=3
Examples
Test whether an input graph can be embedded in 2 stacks
bob -i=graphs/graph.dot -o=graph.dimacs -stacks=2
Test whether an input graph can be embedded in 2 queues
bob -i=graphs/graph.dot -o=graph.dimacs -queues=2
Test whether an input graph admits a 6-track layout and print resulting layout
bob -i=graphs/weakly_6tracks.gml -o=graph.dimacs -tracks=6
treengeling graph.dimacs > result.dimacs
bob -i=graphs/weakly_6tracks.gml -result=result.dimacs -tracks=6
License
Code is released under the MIT License.
Related Skills
node-connect
349.0kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
109.4kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
349.0kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
349.0kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
