Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- documentclass[12pt,oneside,a4paper,brazil]{report}
- usepackage{algorithm}
- usepackage{float}
- usepackage{babel}
- usepackage[utf8]{inputenc}
- usepackage[T1]{fontenc}
- usepackage{amsmath}
- usepackage[noend]{algpseudocode}
- newcommandBB{BB}
- begin{document}
- begin{algorithm}
- caption{The BB algorithm}
- begin{algorithmic}
- State BB(G, Q, K)
- State $text{C} gets text{Q}$
- If {$text{K} neq emptyset$ }
- State $text{v} gets text{a vertex in K}$
- State ${C_1 gets BB(G, Q cup {v}, U cap Gamma_G(v))$
- If {$|C_1| > |C|$}
- State $C gets C_1$
- EndIf
- State $C_2 gets BB(G, Q, K - v)$
- If {$|C_2| > |C|$}
- State $C gets C_2$
- EndIf
- EndIf
- Return $C$
- end{algorithmic}
- end{algorithm}
- end{document}
- documentclass[12pt,oneside,a4paper,brazil]{report}
- usepackage{algorithm}
- usepackage{float}
- usepackage{babel}
- usepackage[utf8]{inputenc}
- usepackage[T1]{fontenc}
- usepackage{amsmath}
- usepackage[noend]{algpseudocode}
- newcommandBB{BB}
- begin{document}
- begin{algorithm}
- caption{The BB algorithm}
- begin{algorithmic}
- State BB(G, Q, K)
- State $text{C} gets text{Q}$
- If {$text{K} neq emptyset$ }
- State $text{v} gets text{a vertex in K}$
- State ${C_1 gets BB(G, Q cup {v}, U cap Gamma_G(v))}$
- % ^ } added!
- If {$|C_1| > |C|$}
- State $C gets C_1$
- EndIf
- State $C_2 gets BB(G, Q, K - v)$
- If {$|C_2| > |C|$}
- State $C gets C_2$
- EndIf
- EndIf
- Return $C$
- end{algorithmic}
- end{algorithm}
- end{document}
Add Comment
Please, Sign In to add comment