diff options
-rw-r--r-- | HW3_greedy.pdf | bin | 0 -> 79430 bytes | |||
-rw-r--r-- | answer_sheet/main.tex | 33 | ||||
-rw-r--r-- | answer_sheet/mylib.bib | 2 | ||||
-rw-r--r-- | answer_sheet/structure.tex | 259 |
4 files changed, 294 insertions, 0 deletions
diff --git a/HW3_greedy.pdf b/HW3_greedy.pdf new file mode 100644 index 0000000..bcf73ba --- /dev/null +++ b/HW3_greedy.pdf | |||
Binary files differ | |||
diff --git a/answer_sheet/main.tex b/answer_sheet/main.tex new file mode 100644 index 0000000..4e2b3a3 --- /dev/null +++ b/answer_sheet/main.tex | |||
@@ -0,0 +1,33 @@ | |||
1 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | ||
2 | % Lachaise Assignment | ||
3 | % LaTeX Template | ||
4 | % Version 1.0 (26/6/2018) | ||
5 | % | ||
6 | % This template originates from: | ||
7 | % http://www.LaTeXTemplates.com | ||
8 | % | ||
9 | % Authors: | ||
10 | % Marion Lachaise & François Févotte | ||
11 | % Vel (vel@LaTeXTemplates.com) | ||
12 | % | ||
13 | % License: | ||
14 | % CC BY-NC-SA 3.0 (http://creativecommons.org/licenses/by-nc-sa/3.0/) | ||
15 | % | ||
16 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | ||
17 | |||
18 | \documentclass{article} | ||
19 | \input{structure.tex} | ||
20 | |||
21 | \title{CENG567: Homework \#3} | ||
22 | \author{Yiğit Sever} | ||
23 | \date{\today} | ||
24 | |||
25 | \addbibresource{mylib.bib} | ||
26 | |||
27 | %---------------------------------------------------------------------------------------- | ||
28 | |||
29 | \begin{document} | ||
30 | |||
31 | \maketitle | ||
32 | |||
33 | \end{document} | ||
diff --git a/answer_sheet/mylib.bib b/answer_sheet/mylib.bib new file mode 100644 index 0000000..139597f --- /dev/null +++ b/answer_sheet/mylib.bib | |||
@@ -0,0 +1,2 @@ | |||
1 | |||
2 | |||
diff --git a/answer_sheet/structure.tex b/answer_sheet/structure.tex new file mode 100644 index 0000000..1c33680 --- /dev/null +++ b/answer_sheet/structure.tex | |||
@@ -0,0 +1,259 @@ | |||
1 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | ||
2 | % Lachaise Assignment | ||
3 | % Structure Specification File | ||
4 | % Version 1.0 (26/6/2018) | ||
5 | % | ||
6 | % This template originates from: | ||
7 | % http://www.LaTeXTemplates.com | ||
8 | % | ||
9 | % Authors: | ||
10 | % Marion Lachaise & François Févotte | ||
11 | % Vel (vel@LaTeXTemplates.com) | ||
12 | % | ||
13 | % License: | ||
14 | % CC BY-NC-SA 3.0 (http://creativecommons.org/licenses/by-nc-sa/3.0/) | ||
15 | % | ||
16 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | ||
17 | |||
18 | %---------------------------------------------------------------------------------------- | ||
19 | % PACKAGES AND OTHER DOCUMENT CONFIGURATIONS | ||
20 | %---------------------------------------------------------------------------------------- | ||
21 | |||
22 | \usepackage[utf8]{inputenc} % Required for inputting international characters | ||
23 | \usepackage[T1]{fontenc} % Output font encoding for international characters | ||
24 | \usepackage{csquotes} | ||
25 | \usepackage{amsmath,amsfonts} % Math packages | ||
26 | \usepackage{url} | ||
27 | \usepackage{hyperref} | ||
28 | \usepackage{enumerate} % Custom item numbers for enumerations | ||
29 | \usepackage[ruled]{algorithm2e} % Algorithms | ||
30 | \usepackage[makeroom]{cancel} | ||
31 | % \usepackage{algorithm} | ||
32 | % \usepackage[noend]{algpseudocode} | ||
33 | \usepackage[framemethod=tikz]{mdframed} % Allows defining custom boxed/framed environments | ||
34 | \usepackage{listings} % File listings, with syntax highlighting | ||
35 | \usepackage[super]{nth} | ||
36 | \usepackage{caption} | ||
37 | \usepackage{tikz} | ||
38 | \usetikzlibrary{arrows,fit,positioning} | ||
39 | \usepackage[style=authoryear]{biblatex} | ||
40 | |||
41 | \lstset{ | ||
42 | basicstyle=\ttfamily, % Typeset listings in monospace font | ||
43 | } | ||
44 | |||
45 | %---------------------------------------------------------------------------------------- | ||
46 | % DOCUMENT MARGINS | ||
47 | %---------------------------------------------------------------------------------------- | ||
48 | |||
49 | \usepackage{geometry} % Required for adjusting page dimensions and margins | ||
50 | |||
51 | \geometry{ | ||
52 | paper=a4paper, % Paper size, change to letterpaper for US letter size | ||
53 | top=2.5cm, % Top margin | ||
54 | bottom=3cm, % Bottom margin | ||
55 | left=2.5cm, % Left margin | ||
56 | right=2.5cm, % Right margin | ||
57 | headheight=14pt, % Header height | ||
58 | footskip=1.5cm, % Space from the bottom margin to the baseline of the footer | ||
59 | headsep=1.2cm, % Space from the top margin to the baseline of the header | ||
60 | % showframe, % Uncomment to show how the type block is set on the page | ||
61 | } | ||
62 | |||
63 | %---------------------------------------------------------------------------------------- | ||
64 | % COMMAND LINE ENVIRONMENT | ||
65 | %---------------------------------------------------------------------------------------- | ||
66 | |||
67 | % Usage: | ||
68 | % \begin{commandline} | ||
69 | % \begin{verbatim} | ||
70 | % $ ls | ||
71 | % | ||
72 | % Applications Desktop ... | ||
73 | % \end{verbatim} | ||
74 | % \end{commandline} | ||
75 | |||
76 | \mdfdefinestyle{commandline}{ | ||
77 | leftmargin=10pt, | ||
78 | rightmargin=10pt, | ||
79 | innerleftmargin=15pt, | ||
80 | middlelinecolor=black!50!white, | ||
81 | middlelinewidth=2pt, | ||
82 | frametitlerule=false, | ||
83 | backgroundcolor=black!5!white, | ||
84 | frametitle={\ttfamily\cmdname}, | ||
85 | frametitlefont={\normalfont\sffamily\color{white}\hspace{-1em}}, | ||
86 | frametitlebackgroundcolor=black!50!white, | ||
87 | nobreak, | ||
88 | } | ||
89 | |||
90 | % Define a custom environment for command-line snapshots | ||
91 | \newenvironment{commandline}[1][Cmd]{ | ||
92 | \medskip | ||
93 | \newcommand{\cmdname}{#1} | ||
94 | \begin{mdframed}[style=commandline] | ||
95 | }{ | ||
96 | \end{mdframed} | ||
97 | \medskip | ||
98 | } | ||
99 | |||
100 | %---------------------------------------------------------------------------------------- | ||
101 | % FILE CONTENTS ENVIRONMENT | ||
102 | %---------------------------------------------------------------------------------------- | ||
103 | |||
104 | % Usage: | ||
105 | % \begin{file}[optional filename, defaults to "File"] | ||
106 | % File contents, for example, with a listings environment | ||
107 | % \end{file} | ||
108 | |||
109 | \mdfdefinestyle{file}{ | ||
110 | innertopmargin=1.6\baselineskip, | ||
111 | innerbottommargin=0.8\baselineskip, | ||
112 | topline=false, bottomline=false, | ||
113 | leftline=false, rightline=false, | ||
114 | leftmargin=2cm, | ||
115 | rightmargin=2cm, | ||
116 | singleextra={% | ||
117 | \draw[fill=black!10!white](P)++(0,-1.2em)rectangle(P-|O); | ||
118 | \node[anchor=north west] | ||
119 | at(P-|O){\ttfamily\mdfilename}; | ||
120 | % | ||
121 | \def\l{3em} | ||
122 | \draw(O-|P)++(-\l,0)--++(\l,\l)--(P)--(P-|O)--(O)--cycle; | ||
123 | \draw(O-|P)++(-\l,0)--++(0,\l)--++(\l,0); | ||
124 | }, | ||
125 | nobreak, | ||
126 | } | ||
127 | |||
128 | % Define a custom environment for file contents | ||
129 | \newenvironment{file}[1][File]{ % Set the default filename to "File" | ||
130 | \medskip | ||
131 | \newcommand{\mdfilename}{#1} | ||
132 | \begin{mdframed}[style=file] | ||
133 | }{ | ||
134 | \end{mdframed} | ||
135 | \medskip | ||
136 | } | ||
137 | |||
138 | %---------------------------------------------------------------------------------------- | ||
139 | % NUMBERED QUESTIONS ENVIRONMENT | ||
140 | %---------------------------------------------------------------------------------------- | ||
141 | |||
142 | % Usage: | ||
143 | % \begin{question}[optional title] | ||
144 | % Question contents | ||
145 | % \end{question} | ||
146 | |||
147 | \mdfdefinestyle{question}{ | ||
148 | innertopmargin=1.2\baselineskip, | ||
149 | innerbottommargin=0.8\baselineskip, | ||
150 | roundcorner=5pt, | ||
151 | nobreak, | ||
152 | singleextra={% | ||
153 | \draw(P-|O)node[xshift=1em,anchor=west,fill=white,draw,rounded corners=5pt]{% | ||
154 | Question (\alph{Question})\questionTitle}; | ||
155 | }, | ||
156 | } | ||
157 | |||
158 | \newcounter{Question}[section] % Stores the current question number that gets iterated with each new question TODO reset after each section | ||
159 | |||
160 | % Define a custom environment for numbered questions | ||
161 | \newenvironment{question}[1][\unskip]{ | ||
162 | \bigskip | ||
163 | \stepcounter{Question} | ||
164 | \newcommand{\questionTitle}{~#1} | ||
165 | \begin{mdframed}[style=question] | ||
166 | }{ | ||
167 | \end{mdframed} | ||
168 | \medskip | ||
169 | } | ||
170 | |||
171 | %---------------------------------------------------------------------------------------- | ||
172 | % WARNING TEXT ENVIRONMENT | ||
173 | %---------------------------------------------------------------------------------------- | ||
174 | |||
175 | % Usage: | ||
176 | % \begin{warn}[optional title, defaults to "Warning:"] | ||
177 | % Contents | ||
178 | % \end{warn} | ||
179 | |||
180 | \mdfdefinestyle{warning}{ | ||
181 | topline=false, bottomline=false, | ||
182 | leftline=false, rightline=false, | ||
183 | nobreak, | ||
184 | singleextra={% | ||
185 | \draw(P-|O)++(-0.5em,0)node(tmp1){}; | ||
186 | \draw(P-|O)++(0.5em,0)node(tmp2){}; | ||
187 | \fill[black,rotate around={45:(P-|O)}](tmp1)rectangle(tmp2); | ||
188 | \node at(P-|O){\color{white}\scriptsize\bf !}; | ||
189 | \draw[very thick](P-|O)++(0,-1em)--(O);%--(O-|P); | ||
190 | } | ||
191 | } | ||
192 | |||
193 | % Define a custom environment for warning text | ||
194 | \newenvironment{warn}[1][Warning:]{ % Set the default warning to "Warning:" | ||
195 | \medskip | ||
196 | \begin{mdframed}[style=warning] | ||
197 | \noindent{\textbf{#1}} | ||
198 | }{ | ||
199 | \end{mdframed} | ||
200 | } | ||
201 | |||
202 | %---------------------------------------------------------------------------------------- | ||
203 | % INFORMATION ENVIRONMENT | ||
204 | %---------------------------------------------------------------------------------------- | ||
205 | |||
206 | % Usage: | ||
207 | % \begin{info}[optional title, defaults to "Info:"] | ||
208 | % contents | ||
209 | % \end{info} | ||
210 | |||
211 | \mdfdefinestyle{info}{% | ||
212 | topline=false, bottomline=false, | ||
213 | leftline=false, rightline=false, | ||
214 | nobreak, | ||
215 | singleextra={% | ||
216 | \fill[black](P-|O)circle[radius=0.6em]; | ||
217 | \node at(P-|O){\color{white}\scriptsize\bf Q}; | ||
218 | \draw[very thick](P-|O)++(0,-0.8em)--(O);%--(O-|P); | ||
219 | } | ||
220 | } | ||
221 | |||
222 | % Define a custom environment for information | ||
223 | \newenvironment{info}[1][Info:]{ % Set the default title to "Info:" | ||
224 | \medskip | ||
225 | \begin{mdframed}[style=info] | ||
226 | \noindent{\textbf{#1}} | ||
227 | }{ | ||
228 | \end{mdframed} | ||
229 | } | ||
230 | |||
231 | %---------------------------------------------------------------------------------------- | ||
232 | % NOT FUCKED UP INFORMATION ENVIRONMENT | ||
233 | %---------------------------------------------------------------------------------------- | ||
234 | |||
235 | |||
236 | % Usage: | ||
237 | % \begin{info}[optional title, defaults to "Info:"] | ||
238 | % contents | ||
239 | % \end{info} | ||
240 | |||
241 | \mdfdefinestyle{infor}{% | ||
242 | topline=false, bottomline=false, | ||
243 | leftline=false, rightline=false, | ||
244 | nobreak, | ||
245 | singleextra={% | ||
246 | \fill[black](P-|O)circle[radius=0.4em]; | ||
247 | \node at(P-|O){\color{white}\scriptsize\bf i}; | ||
248 | \draw[very thick](P-|O)++(0,-0.8em)--(O);%--(O-|P); | ||
249 | } | ||
250 | } | ||
251 | |||
252 | % Define a custom environment for information | ||
253 | \newenvironment{infor}[1][Disclaimer:]{ % | ||
254 | \medskip | ||
255 | \begin{mdframed}[style=infor] | ||
256 | \noindent{\textbf{#1}} | ||
257 | }{ | ||
258 | \end{mdframed} | ||
259 | } | ||