Guest User

Untitled

a guest
Oct 18th, 2017
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.39 KB | None | 0 0
  1. documentclass[12pt,oneside,a4paper,brazil]{report}
  2.  
  3.  
  4. usepackage{algorithm}
  5. usepackage{float}
  6. usepackage{babel}
  7. usepackage[utf8]{inputenc}
  8. usepackage[T1]{fontenc}
  9. usepackage{amsmath}
  10. usepackage[noend]{algpseudocode}
  11. newcommandBB{BB}
  12.  
  13. begin{document}
  14. begin{algorithm}
  15. caption{The BB algorithm}
  16. begin{algorithmic}
  17. State BB(G, Q, K)
  18. State $text{C} gets text{Q}$
  19. If {$text{K} neq emptyset$ }
  20. State $text{v} gets text{a vertex in K}$
  21. State ${C_1 gets BB(G, Q cup {v}, U cap Gamma_G(v))$
  22. If {$|C_1| > |C|$}
  23. State $C gets C_1$
  24. EndIf
  25. State $C_2 gets BB(G, Q, K - v)$
  26. If {$|C_2| > |C|$}
  27. State $C gets C_2$
  28. EndIf
  29. EndIf
  30. Return $C$
  31. end{algorithmic}
  32. end{algorithm}
  33.  
  34. end{document}
  35.  
  36. documentclass[12pt,oneside,a4paper,brazil]{report}
  37.  
  38.  
  39. usepackage{algorithm}
  40. usepackage{float}
  41. usepackage{babel}
  42. usepackage[utf8]{inputenc}
  43. usepackage[T1]{fontenc}
  44. usepackage{amsmath}
  45. usepackage[noend]{algpseudocode}
  46. newcommandBB{BB}
  47.  
  48. begin{document}
  49. begin{algorithm}
  50. caption{The BB algorithm}
  51. begin{algorithmic}
  52. State BB(G, Q, K)
  53. State $text{C} gets text{Q}$
  54. If {$text{K} neq emptyset$ }
  55. State $text{v} gets text{a vertex in K}$
  56. State ${C_1 gets BB(G, Q cup {v}, U cap Gamma_G(v))}$
  57. % ^ } added!
  58. If {$|C_1| > |C|$}
  59. State $C gets C_1$
  60. EndIf
  61. State $C_2 gets BB(G, Q, K - v)$
  62. If {$|C_2| > |C|$}
  63. State $C gets C_2$
  64. EndIf
  65. EndIf
  66. Return $C$
  67. end{algorithmic}
  68. end{algorithm}
  69.  
  70. end{document}
Add Comment
Please, Sign In to add comment