-
Notifications
You must be signed in to change notification settings - Fork 5
/
hw7.tex
561 lines (466 loc) · 20.3 KB
/
hw7.tex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
\documentclass[a4paper,12pt]{article}
\usepackage{mypreamble}
%% Page setup
\geometry{
margin=2cm,
includehead,
% includefoot,
headsep=\baselineskip,
}
\pagestyle{fancy}
\fancyfoot{}
\MakeDoubleHeader% {<l1>}{<l2>}{<r1>}{<r2>}
{\TextHomeworkEng~\#7}
{Combinatorics}
{\TextDiscreteMathEng}
{\IconSpring~Spring 2024}
%% Add custom setup below
\tikzset{
position/.style args={#1:#2 from #3}{
at=(#3.#1), anchor=#1+180, shift=(#1:#2)
},
}
\usepackage{stringstrings}
\DeclareRobustCommand{\stirling}{\genfrac\{\}{0pt}{}}
\declaretheoremstyle[
spaceabove=6pt,
spacebelow=6pt,
postheadspace=0.5em,
notefont=\normalfont\scshape,
]{mystyle}
\declaretheorem[style=mystyle]{theorem}
\declaretheorem[style=mystyle,numbered=no]{theorem*}
\begin{document}
\selectlanguage{english}
\epigraph{\textpzc{Do whatever you want, but always explain what you are doing.}}{--- \textsc{Konstantin}, 2020}
\begin{tasks}[align=right,left=0pt]
\begingroup
\tikzstyle{myboxstyle}=[
scale=0.95, transform shape,
baseline,
% baseline=(box-label.base),
myoutline/.style={
thick,
line join=bevel,
},
myback/.style={
myoutline,
fill=black!50,
},
myfront/.style={
myoutline,
fill=black!20,
fill opacity=0.75,
},
myball/.style={
ball color=white,
},
]
\def\boxWidth{0.9}
\def\boxHeight{0.4}
\def\boxDepth{0.4}
\def\boxLeftX{0.16}
\def\boxLeftY{0.08}
\def\boxRightX{0.2}
\def\boxRightY{0.1}
\def\ballRadius{0.22}
\newcommand{\drawBoxBack}{
%% Back
\draw[myback] (0,0)
-- ++(0,\boxHeight)
-- ++(\boxDepth,\boxDepth)
-- ++(\boxWidth,0)
-- ++(0,-\boxHeight)
-- ++(-\boxDepth,-\boxDepth)
-- cycle;
\draw[myoutline] (0,0)
-- ++(\boxDepth,\boxDepth)
-- ++(0,\boxHeight) ++(0,-\boxHeight)
-- ++(\boxWidth,0);
%% Left thing
\draw[myfront,fill opacity=1] (0,\boxHeight)
-- ++(\boxDepth,\boxDepth)
-- ++(-\boxLeftX,\boxLeftY)
-- ++(-\boxDepth,-\boxDepth)
-- cycle;
}
\newcommand{\drawBoxFront}[1]{% {<label>}
%% Front
\draw[myfront] (0,0)
-- ++(\boxWidth,0)
-- ++(\boxDepth,\boxDepth)
-- ++(0,\boxHeight)
-- ++(-\boxDepth,-\boxDepth)
-- ++(-\boxWidth,0)
-- cycle;
\draw[myoutline] (\boxWidth,0)
-- ++(0,\boxHeight);
%% Right thing
\draw[myfront] (\boxWidth,\boxHeight)
-- ++(\boxDepth,\boxDepth)
-- ++(\boxRightX,\boxRightY)
-- ++(-\boxDepth,-\boxDepth)
-- cycle;
%% Label
\node (box-label) at (\boxWidth/2,\boxHeight/2) {\vphantom{12345ABCDE}#1};
}
\newcommand{\drawBall}[3][]{% [<style>]{<pos>}{<label>}
\draw[myball,#1] (#2) circle [radius=\ballRadius] node {#3};}
\newcommand{\drawBallOne}[2][]{% [<style>]{<label>}
\drawBall[#1]{ 0.52, 0.55 }{#2}}
\newcommand{\drawBallTwo}[2][]{% [<style>]{<label>}
\drawBall[#1]{ 0.88, 0.51 }{#2}}
\newcommand{\drawBallThree}[2][]{% [<style>]{<label>}
\drawBall[#1]{ 0.31, 0.33 }{#2}}
\newcommand{\drawBallFour}[2][]{% [<style>]{<label>}
\drawBall[#1]{ 0.71, 0.3 }{#2}}
\newcommand{\drawBallCenter}[2][]{% [<style>]{<label>}
\drawBall[#1]{ 0.62, 0.38 }{#2}}
\newcommand{\drawBallLowCenter}[2][]{% [<style>]{<label>}
\drawBall[#1]{ 0.54, 0.31 }{#2}}
\newcommand{\drawBox}[3][]{% [<style>]{<box-label>}{<body>}
\begin{tikzpicture}[myboxstyle,scale=1.5,transform shape,#1]
\drawBoxBack
#3
\drawBoxFront{#2}
\end{tikzpicture}%
}
\newcounter{balls}
\newcommand{\newBall}{\stepcounter{balls}\theballs}
\newcommand{\resetBalls}{\setcounter{balls}{0}}
\renewcommand{\theballs}{\arabic{balls}} % Use this to redefine counter format
\newcounter{boxes}
\newcommand{\newBox}{\stepcounter{boxes}\theboxes}
\newcommand{\resetBoxes}{\setcounter{boxes}{0}}
\renewcommand{\theboxes}{\Alph{boxes}} % Use this to redefine counter format
\newcommand{\drawBoxWithoutBalls}[1][]{% [<style>]
\drawBox[#1]{\newBox}{}}
\newcommand{\drawBoxWithOneBall}[1][]{% [<style>]
\drawBox[#1]{\newBox}{
\drawBallCenter{\newBall}
}}
\newcommand{\drawBoxWithTwoBalls}[1][]{% [<style>]
\drawBox[#1]{\newBox}{
% \drawBallOne{\newBall}
% \drawBallFour{\newBall}
\drawBallThree{\newBall}
\drawBallTwo{\newBall}
}}
\newcommand{\drawBoxWithThreeBalls}[1][]{% [<style>]
\drawBox[#1]{\newBox}{
\drawBallOne{\newBall}
\drawBallTwo{\newBall}
% \drawBallThree{\newBall}
\drawBallLowCenter{\newBall}
}}
\newcommand{\drawBoxWithFourBalls}[1][]{% [<style>]
\drawBox[#1]{\newBox}{
\drawBallOne{\newBall}
\drawBallTwo{\newBall}
\drawBallThree{\newBall}
\drawBallFour{\newBall}
}}
\item One of the classical combinatorial problems is counting the number of arrangements of $n$ balls into $k$ boxes.
There are at least \href{https://en.wikipedia.org/wiki/Twelvefold_way}{12 variations} of this problem: four cases (a--d) with three different constraints (1--3).
For each problem (case+constraint), derive the corresponding generic formula.
Additionally, pick several representative values for~$n$ and~$k$ and use your derived formulae to find the numbers of arrangements.
Visualize several possible arrangements for the chosen~$n$ and~$k$.
\smallskip
\textit{\uline{Cases with arrangement examples}}:
\begin{enumerate}[label=\alph*., itemsep=4pt]
%% U -> L
\item $\textbf{U} \to \textbf{L}$: Balls are \textbf{U}nlabeled, Boxes are \textbf{L}abeled.
\resetBalls
\resetBoxes
\renewcommand{\theballs}{}
\renewcommand{\theboxes}{\Alph{boxes}}
\drawBoxWithThreeBalls
\drawBoxWithoutBalls
\drawBoxWithFourBalls
\drawBoxWithTwoBalls
\drawBoxWithOneBall
% ($n = \arabic{balls}$, $k = \arabic{boxes}$)
%% L -> U
\item $\textbf{L} \to \textbf{U}$: Balls are \textbf{L}abeled, Boxes are \textbf{U}nlabeled.
\resetBoxes
\resetBalls
\renewcommand{\theballs}{\arabic{balls}}
\renewcommand{\theboxes}{}
\drawBoxWithOneBall
\drawBoxWithTwoBalls
\drawBoxWithoutBalls
\drawBoxWithFourBalls
\drawBoxWithThreeBalls
% ($n = \arabic{balls}$, $k = \arabic{boxes}$)
%% L -> L
\item $\textbf{L} \to \textbf{L}$: Balls are \textbf{L}abeled, Boxes are \textbf{L}abeled.
\resetBoxes
\resetBalls
\renewcommand{\theballs}{\arabic{balls}}
\renewcommand{\theboxes}{\Alph{boxes}}
\drawBoxWithTwoBalls
\drawBoxWithOneBall
\drawBoxWithThreeBalls
\drawBoxWithoutBalls
\drawBoxWithFourBalls
% ($n = \arabic{balls}$, $k = \arabic{boxes}$)
%% U -> U
\item $\textbf{U} \to \textbf{U}$: Balls are \textbf{U}nlabeled, Boxes are \textbf{U}nlabeled.
\resetBoxes
\resetBalls
\renewcommand{\theballs}{}
\renewcommand{\theboxes}{}
\drawBoxWithFourBalls
\drawBoxWithThreeBalls
\drawBoxWithTwoBalls
\drawBoxWithOneBall
\drawBoxWithoutBalls
% ($n = \arabic{balls}$, $k = \arabic{boxes}$)
\end{enumerate}
\smallskip
\textit{\uline{Constraints}}:
\begin{enumerate}[label=\arabic*., noitemsep]
\item $\leq 1$ ball per box \--- \emph{injective} mapping.
\item $\geq 1$ ball per box \--- \emph{surjective} mapping.
\item Arbitrary number of balls per box.
\end{enumerate}
\smallskip
\textit{\uline{Notes}}:
\begin{itemize}[label=$\ast$, noitemsep]
\item \textbf{U}nlabeled means \enquote{indistinguishable}, and \textbf{L}abeled means \enquote{distinguishable}.
\item \href{https://en.wikipedia.org/wiki/Stirling_numbers_of_the_second_kind}{Stirling number of the second kind} $s^{\text{II}}_k(n) = \stirling{n}{k} = S(n, k)$ is the number of ways to partition a set of~$n$ elements into~$k$ non-empty subsets.
Use $s^{\text{II}}_k(n)$ notation (or $\stirling{n}{k}$, or $S(n, k)$, to your preference) directly without expanding the closed formula.
\item \href{https://en.wikipedia.org/wiki/Partition_(number_theory)#Restricted_part_size_or_number_of_parts}{Partition function} $p_k(n)$ is the number of ways to partition the integer $n$ into~$k$ positive parts, \ie the number of solutions to the following equation: $n = a_1 + \dotsb + a_k$, where $a_1 \geq \dotsb \geq a_k \geq 1$.
Use $p_k(n)$ directly, since the closed-form expression is unknown.
\end{itemize}
\endgroup
\item How many different passwords can be formed using the following rules?
\begin{items}
\item The password must be exactly 8 characters long.
\item The password must consist only of Latin letters (a-z, A-Z) and Arabic digits (0-9).
\item The password must contain at least 2 digits (0-9) and at least 1 uppercase letter (A-Z).
\item Each character can be used no more than once in the password.
\end{items}
\smallskip
How long does it take to crack such a password?
\filbreak
\item Find the number of different 5-digit numbers using digits 1--9 under the given constraints.
For each case, provide examples of numbers that comply and do not comply with the constraints, and derive a generic formula that can be applied to other values of~$n$ (total available digits) and~$k$ (number of digits in the number).
Express the formula using standard combinatorial terms, such as $k$-combinations $C_n^k$ and $k$-permutations $P(n, k)$.
\begin{subtasks}
\item Digits \emph{can} be repeated.
\item\label{item:digits-cannot-be-repeated} Digits \emph{cannot} be repeated.
\item Digits \emph{can} be repeated and must be written in \emph{non-increasing}\footnote{A sequence $(x_n)$ is said to be \emph{strictly monotonically increasing} if each term is \emph{strictly greater} than the previous one, \ie $x_{i} < x_{i+1}$. A sequence $(x_n)$ is called \emph{non-increasing} if each term is \emph{less than or equal} to the previous one, \ie $x_{i} \geq x_{i+1}$.} order.
\item Digits \emph{cannot} be repeated and must be written in \emph{strictly increasing} order.
% \item Digits \emph{can} be repeated and the number must be divisible by 3 or 5.
\item Digits \emph{cannot} be repeated and the sum of the digits must be even.
\end{subtasks}
\item Let $n$ be a positive integer.
Prove the following identity using a combinatorial argument:
\[
\sum_{k = 1}^{n} k \cdot C_{n}^{k} = n \cdot 2^{n-1}
\]
\item Let $r, m, n$ be non-negative integers.
Prove the following identity using a combinatorial argument:
\[
\binom{m + n}{r} = \sum_{k = 0}^{r} \binom{m}{k} \binom{n}{r - k}
\]
\item Prove the Generalized Pascal's Formula (for $n \geq 1$ and $k_1,\dotsc,k_r \geq 0$ with $k_1 + \dotsb + k_r = n$):
\[
\binom{n}{k_1,\dotsc,k_r} = \sum_{i=1}^{r} \binom{n-1}{k_1,\dotsc,k_i-1,\dotsc,k_r}
\]
\item Find the coefficient of $x^5 y^7 z^3$ in the expansion of $(x + y + z)^{15}$.
\item Count the number of permutations of the multiset $\Sigma^{*} = \Set{2 \cdot \triangle, 3 \cdot \square, 1 \cdot \Cat}$.
\begingroup
\tikzstyle{myrnastyle}=[
scale=0.8, transform shape,
dot/.style={
draw,
fill=black,
shape=circle,
minimum size=4pt,
inner sep=0pt,
outer sep=0pt,
},
matching/.style={
draw,
% dashed,
red,
ultra thick,
},
basepair/.style={
draw,
dashed,
lightgray,
thick,
},
]
\newcommand{\drawRNA}{%
\def\myRadNode{1.6}
\def\myRadLabel{2.0}
% Outside edges
% \draw (75:\myRadNode) arc (75:-255:\myRadNode);
% Nodes
\foreach [count=\i, evaluate=\x as \a using {105-\i*30}] \x in {A,U,C,G,U,A,A,U,C,G,C,G}
{
\node[dot] (v\i) at (\a:\myRadNode) {};
\node at (\a:\myRadLabel) {\x};
% \node at (\a:1.3) {\i}; % DEBUG index
}
}
\item A \emph{non-crossing perfect matching}\footnote{Credits to \href{https://rosalind.info/about}{Rosalind} for this task.} in a graph is a set of pairwise disjoint edges that cover all vertices and do not intersect with each other.
For example, consider a graph on~$2n$ vertices numbered from~1~to~$2n$ and arranged in a circle.
Additionally, assume that edges are straight lines.
In~this~case, edges $\Set{i,j}$ and $\Set{a,b}$ intersect whenever $i < a < j < b$.
\begin{subtasks}
\item Count the number of all possible non-crossing perfect matchings in a complete graph~$K_{2n}$.
\item Consider a graph on vertices labeled with letters from $\Set{\texttt{A}, \texttt{C}, \texttt{G}, \texttt{U}}$.
Each pair of vertices labeled with \texttt{A} and \texttt{U} is connected with a \emph{basepair edge}.
Similarly, \texttt{C}--\texttt{G} pairs are also connected.
The picture below illustrates some of possible non-crossing perfect matchings in the graph with 12 vertices \texttt{AUCGUAAUCGCG} arranged in a circle.
Basepair edges are drawn dashed gray, matching is red.
% Matching 1
\begin{tikzpicture}[myrnastyle]
\drawRNA
\draw[matching] (v1) -- (v2);
\draw[basepair] (v1) -- (v5);
\draw[basepair] (v1) -- (v8);
\draw[basepair] (v2) -- (v6);
\draw[basepair] (v2) -- (v7);
\draw[matching] (v3) -- (v4);
\draw[basepair] (v3) -- (v10);
\draw[basepair] (v3) -- (v12);
\draw[basepair] (v4) -- (v9);
\draw[basepair] (v4) -- (v11);
\draw[matching] (v5) -- (v6);
\draw[basepair] (v5) -- (v7);
\draw[basepair] (v6) -- (v8);
\draw[matching] (v7) -- (v8);
\draw[basepair] (v9) -- (v10);
\draw[matching] (v9) -- (v12);
\draw[matching] (v10)-- (v11);
\draw[basepair] (v11)-- (v12);
\end{tikzpicture}%
\hfill%
% Matching 2
\begin{tikzpicture}[myrnastyle]
\drawRNA
\draw[basepair] (v1) -- (v2);
\draw[basepair] (v1) -- (v5);
\draw[matching] (v1) -- (v8);
\draw[basepair] (v2) -- (v6);
\draw[matching] (v2) -- (v7);
\draw[matching] (v3) -- (v4);
\draw[basepair] (v3) -- (v10);
\draw[basepair] (v3) -- (v12);
\draw[basepair] (v4) -- (v9);
\draw[basepair] (v4) -- (v11);
\draw[matching] (v5) -- (v6);
\draw[basepair] (v5) -- (v7);
\draw[basepair] (v6) -- (v8);
\draw[basepair] (v7) -- (v8);
\draw[basepair] (v9) -- (v10);
\draw[matching] (v9) -- (v12);
\draw[matching] (v10)-- (v11);
\draw[basepair] (v11)-- (v12);
\end{tikzpicture}%
\hfill%
% Matching 3
\begin{tikzpicture}[myrnastyle]
\drawRNA
\draw[matching] (v1) -- (v2);
\draw[basepair] (v1) -- (v5);
\draw[basepair] (v1) -- (v8);
\draw[basepair] (v2) -- (v6);
\draw[basepair] (v2) -- (v7);
\draw[basepair] (v3) -- (v4);
\draw[basepair] (v3) -- (v10);
\draw[matching] (v3) -- (v12);
\draw[basepair] (v4) -- (v9);
\draw[matching] (v4) -- (v11);
\draw[matching] (v5) -- (v6);
\draw[basepair] (v5) -- (v7);
\draw[basepair] (v6) -- (v8);
\draw[matching] (v7) -- (v8);
\draw[matching] (v9) -- (v10);
\draw[basepair] (v9) -- (v12);
\draw[basepair] (v10)-- (v11);
\draw[basepair] (v11)-- (v12);
\end{tikzpicture}%
\hfill%
% Matching 4
\begin{tikzpicture}[myrnastyle]
\drawRNA
\draw[basepair] (v1) -- (v2);
\draw[basepair] (v1) -- (v5);
\draw[matching] (v1) -- (v8);
\draw[basepair] (v2) -- (v6);
\draw[matching] (v2) -- (v7);
\draw[matching] (v3) -- (v4);
\draw[basepair] (v3) -- (v10);
\draw[basepair] (v3) -- (v12);
\draw[basepair] (v4) -- (v9);
\draw[basepair] (v4) -- (v11);
\draw[matching] (v5) -- (v6);
\draw[basepair] (v5) -- (v7);
\draw[basepair] (v6) -- (v8);
\draw[basepair] (v7) -- (v8);
\draw[matching] (v9) -- (v10);
\draw[basepair] (v9) -- (v12);
\draw[basepair] (v10)-- (v11);
\draw[matching] (v11)-- (v12);
\end{tikzpicture}
\def\myRNA{CGUAAUUACGGCAUUAGCAU}
Count the number of all possible non-crossing perfect matchings in the graph on \stringlength{\myRNA} vertices arranged in a circle and labeled with \texttt{\myRNA}.
\end{subtasks}
\endgroup
\filbreak
\item How many integer solutions are there for each given equation?
\begin{multicols}{2}
\begin{subtasks}
\item $x_1 + x_2 + x_3 = 20$, where $x_i \geq 0$
\item $x_1 + x_2 + x_3 = 20$, where $x_i \geq 1$
\item $x_1 + x_2 + x_3 = 20$, where $x_i \geq 5$
\item $x_1 + x_2 + x_3 \leq 20$, where $x_i \geq 0$
\item $x_1 + x_2 + x_3 = 20$, where $1 \leq x_1 \leq x_2 \leq x_3$
\item $x_1 + x_2 + x_3 = 20$, where $0 \leq x_1 \leq x_2 \leq x_3$
\item $x_1 + x_2 + x_3 = 20$, where $0 \leq x_1 \leq x_2 \leq x_3 \leq 10$
\item $x_1 + x_2 + x_3 = 5$, where $-5 \leq x_i \leq 5$
% \item $3x_1 + 3x_2 + 3x_3 + 7x_4 = 22$, where $x_i \geq 0$
\end{subtasks}
\end{multicols}
\item Consider three dice: one with 4~faces, one with 6~faces, and one with 8~faces.
The faces are numbered 1~to~4, 1~to~6, and 1~to~8, respectively.
Find the probability of rolling a total sum of~12.
\item Let $A = \{ 1, 2, 3, \dots, 12 \}$.
Define an \emph{interesting} subset of~$A$ as a subset in which no two elements have a difference of~3.
Determine the number of interesting subsets of~$A$.
\item Find the number of ways to arrange five people of distinct heights in a line such that no three consecutive individuals form a strictly ascending or descending height sequence.
\begingroup
\item GLaDOS, the mastermind AI, is testing a new batch of first-year students in one of her infamous test chambers.
She assigns each test subject a unique number from 1 to~$n$, and then splits the students into $k$~indistinguishable groups.
Furthermore, one student in each group is assigned as the group leader.
GLaDOS wants to know how many different ways she can arrange the students into groups and select group leaders, so that the students can navigate through the test chambers without getting lost.
She calls this arrangement a \enquote{GLaDOS Partition}.
\newcommand*{\leader}[1]{\uline{#1}}
\newcommand*{\sep}{\,|\,}
\smallskip
For example, consider $n = 7$ students and $k = 3$ groups.
Here are three (out of many!) different partitions, with the group leaders underlined:
$(\leader{1} \sep 2\leader{5}67 \sep 3\leader{4})$,
$(\leader{1} \sep 25\leader{6}7 \sep \leader{3}4)$,
and $(\leader{1} \sep 25\leader{6}7 \sep 3\leader{4})$.
\smallskip
Let the number of GLaDOS Partitions for $n$~students into $k$~groups, where each group has a designated leader, be denoted as~$G(n,k)$.
Your task is to find a generic formula and/or recurrence relation for~$G(n,k)$ and justify it.
\endgroup
\bigskip
% \noindent\hfil\rule{0.5\textwidth}{.2pt}\hfil
\noindent\hfil\rule{0.3\textwidth}{.1pt}~~$\ast$~$\ast$~$\ast$~~\rule{0.3\textwidth}{.1pt}\hfil
\bigskip
Please make sure to answer \emph{all} questions and provide \emph{clear} explanations for your solutions.
\smallskip
\emph{Good luck!}
% \item \ldots
\end{tasks}
\end{document}