moved files

This commit is contained in:
CDaut 2022-11-23 00:15:28 +01:00 committed by CDaut
parent 5829e05a84
commit db163b0ab2
8 changed files with 0 additions and 0 deletions

View file

@ -0,0 +1,7 @@
@article{My colleague et al.,
title={A first approach to sock sorting},
journal={Journal of laundry science},
author={My colleague et al.},
year={1969},
month={13}
}

286
Socksorting/defs.tex Normal file
View file

@ -0,0 +1,286 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% NEW defs.tex file hack
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% PACKAGES TO BE USED
% \usepackage{fontspec}
\usepackage{graphicx}
\usepackage{grffile}
\usepackage{multicol}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{bm}
\usepackage{wrapfig}
% \usepackage{url}
\usepackage{pdfpages}
\usepackage{color}
\usepackage{xcolor}
%\usepackage{floatrow}
\usepackage{hyperref}
\hypersetup{
colorlinks=true,
allcolors=blue
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% footnote with no marker
\newcommand\blfootnote[1]{%
\begingroup
\renewcommand\thefootnote{}\footnote{#1}%
\addtocounter{footnote}{-1}%
\endgroup
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Bibliography
\usepackage[backend=biber]{biblatex}
\DefineBibliographyStrings{english}{andothers={+}}
\newbibmacro{name:newformat}{%
\namepartfamily % #1->\namepartfamily, #2->\namepartfamilyi
}
\DeclareNameFormat{default}{%
\nameparts{#1}% split the name data, will not be necessary in future versions
\usebibmacro{name:newformat}%
\usebibmacro{name:andothers}%
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% % SET THE FONT (FONTSPEC PACKAGE REQUIRED!)
% %\renewcommand{\familydefault}{\sfdefault}
% \setmainfont{Arial}
% %\newfontfamily\Condensed[Ligatures=TeX]{ArialNarrow}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% PAGE DIMENSIONS
\textheight 10in
\textwidth 6.6in
\topmargin -35pt
\oddsidemargin -15pt
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% PARAGRAPH PROPERTIES
\parindent=0pt
\parskip=1pt
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% SECTION COMMANDS
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcounter{project}
\newcommand{\project}[2]
{\refstepcounter{project}
\addcontentsline{toc}{section}{\theproject:\ \ #2 -- (#1)}
{\Large\fontseries{b}\selectfont{
\theproject:\ \ #2 -- (#1)}\par}
\vspace{0mm}\ignorespaces
\setcounter{footnote}{0}
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% the \ftedata{}: takes one argumemnt.
%\newcommand{\ftedata}[1]
%{{\centering\sffamily\fontseries{sbc}
% \selectfont{#1}\par}\vspace{1mm}\ignorespaces}
\newcommand{\ftedata}[1]
{{%\sffamily%\fontseries{sbc}\selectfont{#1}
#1\par}\vspace{0mm}\ignorespaces}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% the \facilites{}: takes one argumemnt.
%\newcommand{\facilities}[1]
%{{\centering\sffamily\fontseries{sbc}
%\selectfont{#1}\par}\vspace{1mm}\ignorespaces}
\newcommand{\facilities}[1]
{{%\sffamily%\fontseries{sbc}\selectfont{#1}
#1\par}\vspace{1mm}\ignorespaces}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Redefine \footnotesize to normal size font
\renewcommand{\footnotesize}{\fontsize{11pt}{11pt}\selectfont}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Figure captions
\usepackage[format=plain,font=small,labelfont=bf,skip=-5pt,belowskip=-20pt]{caption}
\renewcommand{\figurename}{Fig.}
% headings
\newcommand{\heading}[1]
{\par\vspace{2mm}\noindent{\large\fontseries{b}\selectfont{\bf #1}}}
% subheadings
\newcommand{\Condensed}{}
\newcommand{\sstrong}[1]{\textbf{#1}}
\newcommand{\subheading}[1]
{\par\vspace{1.5mm}\noindent{\Condensed\sstrong{#1}}}
% metadata
\newcommand{\metadata}[1]
{{\centering\small{#1}\par}\vspace{1mm}\ignorespaces}
% psummary
\newenvironment{psummary}[1][]{\vspace{1mm}\par\hrule\vspace{0.5mm}\noindent\metadata{{#1}}{\par\noindent\sstrong{Abstract\ }}}{\par\vspace{2mm}\hrule}
% compact lists
\newenvironment{shortitem}
{\begin{list}
{$\bullet$}{\topsep=0pt\itemsep=0pt\parsep=0pt\parskip=0pt\leftmargin=12pt}}
{\end{list}}
\newenvironment{compactlist}{\begin{list}{$\triangleright$}%
{\topsep=0pt\itemsep=0pt\parsep=0pt\parskip=0pt\leftmargin=12pt}}%
{\end{list}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% JOURNAL SHORTCUTS
\def\mnras{{MNRAS}}
\def\pr{{PR}}
\def\prd{{PRD}}
\def\prl{{PRL}}
\def\apj{{ApJ}}
\def\apjs{{ApJS}}
\def\apjl{{AJL}}
\def\apjl{{ApJL}}
\def\aa{{A\&A}}
\def\nat{{Nat.}}
\def\astropart{{Astro-particle Phys.~}}
\def\rvmp{{RMP}}
\def\physrep{{PR}}
\def\jcap{JCAP}
\def\araa{ARAA}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%ABBREVIATIONS
\def\LCDM{\mbox{$\Lambda$CDM}}
\def\Lsun{\mbox{L$_\odot$}}
\def\Msun{\mbox{M$_\odot$}}
\def\spose#1{\hbox to 0pt{#1\hss}}
\def\simlt{\mathrel{\spose{\lower 3pt\hbox{$\mathchar"218$}}
\raise 2.0pt\hbox{$\mathchar"13C$}}}
\def\simgt{\mathrel{\spose{\lower 3pt\hbox{$\mathchar"218$}}
\raise 2.0pt\hbox{$\mathchar"13E$}}}
\def\eg{{\textit{e.g.}}}
\def\gtsima{$\; \buildrel > \over \sim \;$}
\def\ltsima{$\; \buildrel < \over \sim \;$}
\def\gsim{\lower.5ex\hbox{\gtsima}}
\def\lsim{\lower.5ex\hbox{\ltsima}}
\def\simgt{\lower.5ex\hbox{\gtsima}}
\def\simlt{\lower.5ex\hbox{\ltsima}}
\def\simpr{\lower.5ex\hbox{\prosima}}
\def\la{\lsim}
\def\ga{\gsim}
\def\zcr{Z_{\rm cr}}
\def\ekin{\mbox{\cal E}_{\rm kin}}
\def\ekin{{\cal E}_{\rm kin}}
\def\fgg{f_{\gamma\gamma}}
\def\Lya{Ly$\alpha$~}
\def\sngg{SN$_{\gamma\gamma}$~}
\def\msun{{M_\odot}}
% Arial doesn't do small caps (so replaced with normal caps)
\newcommand{\spitzer}{\emph{Spitzer}}
\newcommand{\jwst}{\emph{JWST}}
\newcommand{\sam}{\emph{SAM}}
\newcommand{\swift}{\emph{Swift}}
\newcommand{\wfirst}{\emph{WFirst}}
\newcommand{\euclid}{\emph{Euclid}}
\newcommand{\hubble}{\emph{Hubble}}
\newcommand{\herschel}{\emph{Herschel}}
\newcommand{\webb}{\emph{Webb}}
\newcommand{\bluetides}{\textsc{Bluetides}}
%\newcommand{\eagle}{\textsc{Eagle}}
\newcommand{\eagle}{{EAGLE}}
%\newcommand{\colibre}{\textsc{Colibre}}
\newcommand{\colibre}{{COLIBRE}}
%\newcommand{\gadget}{\textsc{Gadget}}
\newcommand{\gadget}{{GADGET}}
\newcommand{\lgal}{\textsc{L-Galaxies}}
\newcommand{\arepo}{\textsc{AREPO}}
\newcommand{\cosmomc}{\textsc{CosmoMC}}
\newcommand{\SO}{\textsc{Simons Observatory}}
\newcommand{\planck}{\textsc{Planck}}
\newcommand{\getdist}{\textsc{GetDist}}
\newcommand{\Eg}{E_{\mathrm{G}}}
\newcommand{\kms}{\mbox{$\mbox{\,km\,s}^{-1}$}}
\newcommand{\Mpc}{h^{-1}\, \mathrm{Mpc}}
\newcommand{\Msol}{h^{-1}M_{\odot}}
\newcommand{\hMpc}{\mbox{ $h^{-1}{\rm Mpc}$}}
\newcommand{\volunit}{\mbox{\,$h^{-3}$\,Mpc$^{3}$}}
\newcommand{\del}{\delta}
\newcommand{\Del}{\Delta}
\newcommand{\nb}{\bar{n}}
\newcommand{\etalb}{et al.}
\def\etal{et~al.~}
\def\spose#1{\hbox to 0pt{#1\hss}}
\def\simgt{\mathrel{\spose{\lower 3pt\hbox{$\mathchar"218$}}
\raise 2.0pt\hbox{$\mathchar"13E$}}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% highlighting macros
\newcommand{\red}[1]{{\color{red}{#1}}}
\newcommand{\green}[1]{{\color{green}{#1}}}
\newcommand{\blue}[1]{{\color{blue}{#1}}}
\newcommand{\brown}[1]{{\color{brown}{#1}}}
\newcommand{\white}[1]{{\color{white}{#1}}}
% Comments, etc
\newcommand{\changed}[2][{}]{\red{\sout{#1}}\blue{#2}}
%\newcommand{\changed}[2][{}]{#2}
\newcommand{\comment}[1]{\brown{#1}}
\newcommand{\todo}[1]{\red{#1}}

BIN
Socksorting/figs/Sock.jpeg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 299 KiB

BIN
Socksorting/figs/rack.jpeg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 49 KiB

BIN
Socksorting/main.pdf Normal file

Binary file not shown.

36
Socksorting/main.tex Normal file
View file

@ -0,0 +1,36 @@
\documentclass[a4paper,11pt, twocolumn]{article}
\usepackage{fancyhdr}
\usepackage[compact]{titlesec}
\titlespacing{\section}{1pt}{*1}{*1}
\titlespacing{\subsection}{0.2pt}{*0.2}{*0.2}
\titlespacing{\subsubsection}{0.2pt}{*0.2}{*0.2}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\input{defs.tex}
\input{mydefs.tex}
\addbibresource{bibliography.bib}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{document}
\fancyhf{}
\pagestyle{fancy}
\lhead{}
\rhead{CelloClemens et al.}
\cfoot{\thepage }
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\clearpage
% PROJECTS
\newcommand{\projectpath}{} % Necessary because of the inclusion of extra files
\begin{refsection}
\include{project}
\end{refsection}
\end{document}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

13
Socksorting/mydefs.tex Normal file
View file

@ -0,0 +1,13 @@
\usepackage{lipsum}
\usepackage[T1]{fontenc}
\usepackage[sfdefault]{biolinum}
\biolinum
\usepackage{listings}
\usepackage{mathrsfs}
\usepackage{algorithm}
\usepackage{algorithmicx}
\usepackage{algpseudocode}
\usepackage{emoji}
\newcommand{\acronym}{HADES }

135
Socksorting/project.tex Normal file
View file

@ -0,0 +1,135 @@
\twocolumn[
\title{\bf \acronym (High end, Advanced, Data driven, Enterprise grade Sock sorting algorithm) - An algorithm for faster sock sorting}
\author{
CelloClemens$^{1,2}$,
Henri\emoji{duck}$^{1}$,
}
\date{\today}
% List of institutions
\maketitle
$^{1}$Department for theoretical laundry science, Karlsruhe institute of suffering and sorrow (KISS), Karlsruhe, Germany \\
$^{2}$Institute of laundry sorting, Department for socks, Karlsruhe institute of suffering and sorrow (KISS), Karlsruhe, Germany
\begin{psummary}
Sorting socks can often be a time consuming task. This paper introduces the fastest method known in the scientific community to tackle
this challanging task. To be able to implement this new algorithm
a new datastructure will be introduced and discussed. Abundant application of this novel algorithm may be able to
reduce the time required for sorting socks considerably.
\end{psummary}
\vspace{2mm}
]
\fancypagestyle{firstpage}{%
\lhead{Please help I am stuck in the basement sorting socks}
\rhead{Journal of Immaterial Science}
}
\thispagestyle{firstpage}
% The introduction
\section{Introduction}
While sorting algorithms are one of the most discussed algorithms in the
computer science community, application of this field to laundry is still quite new.
In fact no research is known to the authors connecting the fields of computer science
and laundry sorting. A few definitions are required in order to establish a baseline
for the algorithm discussed in the following paper.
\subsection{Definitions}
In this section a few definitions, common in the field of theoretical laundry science shall be
introduced. These are required to understand the algorithm and its advantages.
\subsubsection{Sock}
Let $\Lambda_a$ be the Set of laundry. The set of socks, $\Sigma\subset\Lambda_a$
is defined as $\Sigma:=\{s\in\Lambda_a|\chi(s)=1\}$\footnote{Yes, some socks have holes. So what?!}, where $\chi(s)$ is the Euler
characteristic of $s$. For every sock $s$ there is an equal counterpart $s^{-1}$ giving rise
to the identity $s\cong s^{-1}$. The task commonly known as "sock sorting" is in fact the
search for this isomorphism $\eta$ and matching every sock $s$ to its inverse
$s^{-1}$.
\begin{figure}[h]
\centering
\includegraphics[width=\columnwidth]{\projectpath figs/Sock.jpeg}
\vspace{0.1in}
\caption{A pair of blue socks and a single orange sock.}
\label{fig:Sock}
\vspace{0.1in}
\end{figure}
\subsubsection{Laundry basket}
Let $\Lambda\subseteq\Lambda_a$ be a set of laundry items. Then a laundry basket is a
triplet $(\Lambda, +, -)$ representing a datastructure that implements
the following functions:
\begin{itemize}
\item \texttt{get: }$\mathscr{L}\in\Lambda_a$, returns a uniformly random
laundry item from the basket or $\mathscr{L}_0$, the Zero element of laundry, iff
There are no items left.
\item \texttt{put($\mathscr{L}\in\Lambda_a$)}, deposits the given laundry item
into the basket.
\end{itemize}
Note that both operations run in $\mathcal{O}(1)$. Because of the nature of
a laundry basket finding a unique item requires transferring the content of
the whole basket to a new basket thus requiring $\mathcal{O}(n)$ operations,
$n$ being the number of items currently inside the basket.
\subsection{Ongoing and latest research}
To fully appreciate the gravity of \acronym it has to first be discussed
how most resent research tackles the problem of sock sorting.
The following code describes the most recently developed sock sorting
algorithm from the paper by \citeauthor{My colleague et al.} Which is the current
industry standard. Notice the code has a runtime complexity of $\mathcal{O}(n^2)$.
\begin{algorithm}
\caption{Conventional sock sorting}\label{euclid}
\begin{algorithmic}[1]
\State\Comment initialize a new laundry basket with a given set of laundry
\State $A\gets\Lambda$\Comment WLOG assume $\forall\mathscr{L}\in\Lambda|\mathscr{L}$ is a sock
\State $\text{matches}\gets []$
\Repeat
\State $\mathscr{L}\gets$ A.get
\Repeat\Comment find the inverse Sock by checking all other socks
\State $\mathscr{L}^\prime\gets$ A.get
\Until{$\mathscr{L}^\prime =\mathscr{L}^{-1}$}
\State matches.append(($\mathscr{L}, \mathscr{L}^\prime$))
\Until{$\mathscr{L}\ne\mathscr{L}_0$}
\end{algorithmic}
\end{algorithm}
\section{Concepts}
The basis for every fast algorithm are simple yet equally fast
datastructures. To enable the low runtime achieved by \acronym,
the introduction of a new datastructure, the "laundry rack" is integral.
\subsection{Laundry rack}
Let $\Lambda\subseteq\Lambda_a$ be a set of laundry. A laundry rack (See figure \ref{fig:Rack}) is a
triplet $(\Lambda, +, -)$ representing a datastructure that implements the
following methods:
\begin{itemize}
\item \texttt{get($\mathscr{L}\in\Lambda$)}: $\mathscr{L}\in\Lambda$, gets
a specific laundry item from the laundry rack.
\item \texttt{put($\mathscr{L}\in\Lambda$)}, deposits a laundry item onto
the laundry rack.
\item \texttt{match($\mathscr{L}\in\Lambda$)}: $(\mathscr{P}\in\Lambda\times\Lambda)|\mathscr{L}_0$,
returns a tuple $(\mathscr{L}, \mathscr{L}^{-1})$ representing
a pair of socks iff $\mathscr{L}^{-1}$ is already on the laundry rack,
$\mathscr{L}_0$ otherwise.
\end{itemize}
All these operations (especially \texttt{match}) run in $\mathcal{O}(1)$,
making iteration over all $n$ laundry items to find a pair $(\mathscr{L}, \mathscr{L}^{-1})$
obsolete.
\begin{figure}[h]
\centering
\includegraphics[width=\columnwidth]{\projectpath figs/rack.jpeg}
\vspace{0.1in}
\caption{A blue drying rack, found in many housholds.}
\label{fig:Rack}
\vspace{0.1in}
\end{figure}
\section{Algorithm}
\section{Discussion and Results}
\section{Conclusion}
\section{Acknowledgements}
\begingroup
\setlength\bibitemsep{0pt}
\setlength\bibnamesep{0pt}
\printbibliography[heading=subbibliography]
\endgroup