<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title/><link>https://monkemanx.github.io/</link><description>Recent content on</description><generator>Hugo</generator><language>en-us</language><managingEditor>monkeman@cock.li (MonkeMan)</managingEditor><webMaster>monkeman@cock.li (MonkeMan)</webMaster><lastBuildDate>Wed, 14 Oct 2026 16:09:31 +0000</lastBuildDate><atom:link href="https://monkemanx.github.io/index.xml" rel="self" type="application/rss+xml"/><item><title>AI, Mathematics, and What We Value</title><link>https://monkemanx.github.io/articles/ai_math_what_we_value/</link><pubDate>Mon, 12 Oct 2026 10:00:00 +0000</pubDate><author>monkeman@cock.li (MonkeMan)</author><guid>https://monkemanx.github.io/articles/ai_math_what_we_value/</guid><description>&lt;p&gt;Since OpenAI announced a &lt;a href="https://openai.com/index/navier-stokes-solution/"&gt;solution&lt;/a&gt; to the &lt;a href="https://en.wikipedia.org/wiki/Navier%E2%80%93Stokes_equations"&gt;Navier–Stokes&lt;/a&gt; &lt;a href="https://en.wikipedia.org/wiki/Millennium_Prize_Problems"&gt;Millennium Prize Problem&lt;/a&gt; and subsequently released &lt;a href="https://github.com/openai/math"&gt;Math Repo&lt;/a&gt;, a collection of hundreds of mathematical results produced with the help of AI, there has been a great deal of discussion on social media.&lt;/p&gt;
&lt;p&gt;The reactions seem to fall into two broad camps: (1) this is the coolest and greatest thing that has ever happened, and (2) this is the worst thing that has ever happened. The battle lines are drawn, with tech bros tending toward the first camp and many mathematicians expressing concerns associated with the second. The divide seems so entrenched that, when I looked, I could not find a dedicated thread in the &lt;a href="https://www.reddit.com/r/math/"&gt;largest mathematics subreddit&lt;/a&gt; discussing the hundreds of AI-generated results, because they ban all posts about AI.&lt;/p&gt;
&lt;p&gt;I feel that a lot of interesting nuance is being lost in this debate, and I want to try to recover some of it in this article.&lt;/p&gt;
&lt;p&gt;To start, I want to use the video below as a starting point. It was uploaded by a mathematician who is frustrated with AI and, as you might expect, falls more into camp (2). I recommend watching it before returning to this article.&lt;/p&gt;




 


&lt;div class="video-container"&gt;
 &lt;iframe
 src="https://www.youtube.com/embed/IoW8bozMzik?si=lZRTPlegcEfeKjJY"
 frameborder="0"
 allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
 allowfullscreen
 referrerpolicy="strict-origin-when-cross-origin"&gt;
 &lt;/iframe&gt;
&lt;/div&gt;

&lt;style&gt;
.video-container {
 width: 100%;
 margin: 0 auto;
}
.video-container iframe {
 width: 100%;
 aspect-ratio: 16 / 9;
 display: block;
}
&lt;/style&gt;

&lt;p&gt;I tried to write down the main claims made in the video:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Job security:&lt;/strong&gt; She feels that AI threatens her job. If mathematicians were in it for the money, they would join hedge funds. People become mathematicians because they love mathematics.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Human intelligence:&lt;/strong&gt; An LLM is not inherently more intelligent than a human. Given enough time, a human could solve the same problems.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;The joy of doing mathematics:&lt;/strong&gt; She loves solving problems, discovering new things, and struggling toward a solution. AI takes away some of the uncertainty and excitement of that process.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;The pressure to use AI:&lt;/strong&gt; Mathematics will change, and people will have to use AI, even if they prefer the creativity, journey, and challenge of solving problems themselves.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;The value of mathematics:&lt;/strong&gt; If its value lies in the results, AI is great. If its value lies in the process, this is a sad development. Mathematics allows us to explore the limits of human ability and collaborate with others.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Lost opportunities for collaboration:&lt;/strong&gt; After she made a Computerphile video about a mathematical problem, many viewers emailed her with their attempts to solve it. Now that AI has solved the problem, that shared opportunity for discovery may be lost.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;The frustration of repeated interruption:&lt;/strong&gt; Imagine someone repeatedly solving difficult problems you have spent months working on. At some point, you just want to tell them to fuck off. They have already proved they can do it. They do not need to keep ruining your experience.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;The benefits of AI:&lt;/strong&gt; AI could be valuable for scientific research and breakthroughs that change the world. But that does not address what mathematicians themselves value about doing mathematics.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;I do not intend to address every argument in the video, only the ones where I think I can contribute something useful.&lt;/p&gt;
&lt;p&gt;Before I begin, one note on terminology: throughout this article, I may use anthropomorphic language when talking about AI or LLMs. If a particular term annoys you, replace it with something you think is more appropriate. I do not care much about &lt;a href="https://monkemanx.github.io/articles/on_language_and_definitions/"&gt;policing language&lt;/a&gt; for its own sake. If I had to defend my usage, however, I would point to the idea of &lt;a href="https://en.wikipedia.org/wiki/Duck_typing"&gt;duck typing&lt;/a&gt; in programming: if something looks like a duck and quacks like a duck, we treat it as a duck. Similarly, when a submarine moves through water, we routinely say that it is swimming, even though it is a machine that does not move in the same way an animal does. I think this kind of shorthand can be useful when talking about AI, too.&lt;/p&gt;
&lt;h2 id="1-jobs-job-security-and-the-future-of-mathematics"&gt;1. Jobs, job security, and the future of mathematics&lt;/h2&gt;
&lt;h3 id="11-maybe-there-will-be-more-jobs"&gt;1.1. Maybe there will be more jobs&lt;/h3&gt;
&lt;p&gt;One possibility is that AI will actually create more demand for mathematical work. The &lt;a href="https://en.wikipedia.org/wiki/Jevons_paradox"&gt;Jevons paradox&lt;/a&gt; describes how improvements in efficiency can increase the overall consumption of a resource rather than reduce it. When something becomes cheaper, people may use more of it.&lt;/p&gt;
&lt;p&gt;If mathematical work becomes substantially cheaper, perhaps it will be used more extensively. Organizations might start tackling mathematical problems for which employing a mathematician was previously too expensive. Some applications may become economically viable for the first time, potentially creating new demand for mathematical expertise.&lt;/p&gt;
&lt;p&gt;Of course, this is only one possible outcome. Increased demand does not guarantee that the number of jobs will increase. AI can still replace people in particular roles, and some of the new work may require fewer mathematicians than before.&lt;/p&gt;
&lt;p&gt;There is also the question of judgment. LLMs make mistakes, and many professional tasks involve choices for which there is no single objectively correct answer.&lt;/p&gt;
&lt;p&gt;Consider software engineering. There are different ways to construct a program, different programming languages and frameworks to choose from, and different architectural approaches. There is not always a single correct choice. The same applies to designing a user interface: should it prioritize aesthetics or practicality? Should it be visually elaborate or simple and functional?&lt;/p&gt;
&lt;p&gt;These decisions require judgment about trade-offs, requirements, and what matters in a particular situation. A mathematician working with AI may similarly need to decide which problems are worth pursuing, whether a proposed result is meaningful, and whether the solution is trustworthy and useful.&lt;/p&gt;
&lt;p&gt;AI could therefore change the nature of mathematical work rather than simply eliminate it. But exactly how that will happen remains uncertain.&lt;/p&gt;
&lt;h3 id="12-no-one-has-a-right-to-a-particular-job"&gt;1.2. No one has a right to a particular job&lt;/h3&gt;
&lt;p&gt;There is another point that may be uncomfortable, but I think it is worth stating: nobody has an inherent right to a particular job.&lt;/p&gt;
&lt;p&gt;In a capitalist system, employment generally involves an exchange. One person offers their skills and services, and another person decides whether those services are worth paying for. If someone else can perform the same work more effectively or cheaply, the original worker may lose their position.&lt;/p&gt;
&lt;p&gt;That does not mean job losses are painless, that employers have no responsibilities, or that society should leave displaced workers without support. It does mean that a particular job cannot be guaranteed forever simply because someone enjoys doing it or has spent years becoming good at it.&lt;/p&gt;
&lt;p&gt;If AI changes the demand for mathematical work, mathematicians will face the same problem that workers in other professions have faced when technology changes their industries. It is understandable to worry about this, but the fact that someone loves their job does not mean the world must preserve that job in its current form.&lt;/p&gt;
&lt;h3 id="13-do-not-define-your-self-worth-through-your-job"&gt;1.3. Do not define your self-worth through your job&lt;/h3&gt;
&lt;p&gt;A related point is that it is unwise to define your self-worth through your employment or professional abilities.&lt;/p&gt;
&lt;p&gt;Jobs can disappear. Careers can end. People can lose abilities they once relied on. If your entire sense of self depends on being good at a particular activity, or on being recognized for doing it, losing that ability or recognition can be devastating.&lt;/p&gt;
&lt;p&gt;This is not unique to mathematics or AI. It is a more general problem with tying personal worth to something external that can change independently of you.&lt;/p&gt;
&lt;p&gt;None of the previous points means that mathematicians are wrong to feel anxious. The pace of AI development is rapid, and the future is uncertain. It is difficult to know what a profession will look like in five or ten years when its existing practices are changing so quickly.&lt;/p&gt;
&lt;p&gt;That uncertainty is frightening. I do not think it is necessary to dismiss that fear in order to recognize that technological change can also create opportunities.&lt;/p&gt;
&lt;h2 id="2-are-llms-more-intelligent-than-humans"&gt;2. Are LLMs more intelligent than humans?&lt;/h2&gt;
&lt;p&gt;Whether LLMs are more intelligent than humans is not entirely clear. AI already performs better than humans at some tasks and much worse at others.&lt;/p&gt;












&lt;figure style="display: block; margin: 0 auto; width: 100%; "&gt;
 &lt;img
 src="https://monkemanx.github.io/attachments/Time_Horizon_1.1_and_Time_Horizon_1.0_%282019-2025%29_%28METR%29.png"
 loading="lazy"
 width=""
 height=""
 alt="Image"
 style="display: block; width: 100%; height: 100%; object-fit: contain; "
 &gt;
 
&lt;/figure&gt;

&lt;p&gt;Even if humans are more intelligent than current AI systems overall, what about a year from now? What about ten, fifty, or a hundred years from now? Can we confidently assume that humans will retain some decisive cognitive advantage over machines indefinitely?&lt;/p&gt;
&lt;p&gt;I think it is a mistake to make judgments about AI, or about our own worth, depend on the assumption that humans are superior in some particular capability.&lt;/p&gt;
&lt;p&gt;In his famous essay &lt;a href="https://monkemanx.github.io/paper-summary/all_animals_are_the_same/"&gt;All Animals Are Equal&lt;/a&gt;, Peter Singer argues against grounding the moral consideration we give to others in the assumption that we share the same capabilities. If equal consideration depended on everyone possessing the same abilities, what would happen when we encountered beings that differed from us in those abilities?&lt;/p&gt;
&lt;p&gt;A similar problem arises when we base our self-worth on human intellectual superiority. What happens if we discover that machines can reason better than we can, even in domains that we previously considered uniquely human?&lt;/p&gt;
&lt;p&gt;Why should our value depend on the answer?&lt;/p&gt;












&lt;figure style="display: block; margin: 0 auto; width: 50%; "&gt;
 &lt;img
 src="https://monkemanx.github.io/attachments/ai_will_never_be_able_to_do_x.jpeg"
 loading="lazy"
 width=""
 height=""
 alt="Image"
 style="display: block; width: 100%; height: 100%; object-fit: contain; "
 &gt;
 
 &lt;figcaption style="text-align: center; margin-top: 0.5rem;"&gt;Outdated, but it gets the gist across.&lt;/figcaption&gt;
 
&lt;/figure&gt;

&lt;h3 id="21-the-limits-of-human-cognition"&gt;2.1. The limits of human cognition&lt;/h3&gt;
&lt;p&gt;Consider the argument that a mathematician could solve the same problem as an LLM if only they had enough time. Perhaps they could. But human beings do not have unlimited time, and our limitations go deeper than that.&lt;/p&gt;
&lt;p&gt;We are limited both in how we perceive the world and in how we think about it. Immanuel Kant described the a priori structures of cognition that shape how the world can appear to us. Martin Heidegger explored how our way of existing in the &lt;a href="https://www.scotthyoung.com/blog/2020/04/13/being-and-time/"&gt;world shapes our understanding&lt;/a&gt; and the things that can become intelligible to us.&lt;/p&gt;












&lt;figure style="display: block; margin: 0 auto; width: 60%; "&gt;
 &lt;img
 src="https://monkemanx.github.io/attachments/1_xuw_ptlFYrQkqtu7DlaY0g.jpg"
 loading="lazy"
 width=""
 height=""
 alt="Image"
 style="display: block; width: 100%; height: 100%; object-fit: contain; "
 &gt;
 
&lt;/figure&gt;

&lt;p&gt;Borrowing Heidegger&amp;rsquo;s terminology somewhat loosely, our &lt;em&gt;&lt;a href="https://en.wikipedia.org/wiki/Dasein"&gt;Dasein&lt;/a&gt;&lt;/em&gt;, our particular way of existing and encountering the world, shapes how we approach problems. Our cognitive structures do not merely determine how quickly we can solve a problem. They also influence which problems we can formulate, which connections we notice, and which possibilities we can conceive of in the first place.&lt;/p&gt;
&lt;p&gt;Some things may therefore remain inaccessible to us, even if we devote enormous amounts of time and effort to understanding them.&lt;/p&gt;
&lt;p&gt;The same general consideration applies to other forms of existence, whether other animals, hypothetical extraterrestrial beings, or AI systems. Their ways of perceiving, representing, and reasoning about the world may differ from ours. Those differences can shape what they find intelligible.&lt;/p&gt;
&lt;p&gt;To understand what I mean, consider the mathematical landscape.&lt;/p&gt;
&lt;p&gt;When doing mathematics, we are exploring a landscape of interconnected theorems, definitions, and proofs. But, just as with a physical landscape, not every region is equally accessible to every explorer.&lt;/p&gt;
&lt;p&gt;Humans cannot naturally dive thousands of metres into the ocean or survive in lava. Our bodies impose limits on where we can go and what we can experience directly. Other organisms have different limitations. For example, the &lt;a href="https://en.wikipedia.org/wiki/Pseudoliparis_amblystomopsis"&gt;hadal snailfish&lt;/a&gt; can live at depths of around 8,000 metres, in environments that humans cannot explore unaided.&lt;/p&gt;
&lt;p&gt;The mathematical landscape may have analogous limits. Our cognitive structures and ways of reasoning could impose natural boundaries on what we can discover, just as our bodies limit the physical environments we can inhabit.&lt;/p&gt;
&lt;p&gt;Perhaps we can push those boundaries outward by changing how we perceive and interact with the world through tools. Perhaps we can also push them outward by developing new ways of thinking.&lt;/p&gt;
&lt;h3 id="22-what-counts-as-an-interesting-mathematical-result"&gt;2.2. What counts as an interesting mathematical result?&lt;/h3&gt;
&lt;p&gt;To make this idea more concrete, consider the fact that mathematicians often prefer solutions that are elegant, beautiful, or aesthetically pleasing. Other solutions, even when correct, may be regarded as ugly or unsatisfying.&lt;/p&gt;
&lt;p&gt;These aesthetic preferences are not necessarily arbitrary. Elegant solutions often reveal connections between ideas, reuse familiar structures, and make a difficult result easier to understand. As a result, they may also be easier for us to discover: they fit into ways of thinking that we already understand.&lt;/p&gt;
&lt;p&gt;But these preferences also shape what we consider worth exploring. They influence which parts of the mathematical landscape attract our attention.&lt;/p&gt;
&lt;p&gt;When we imagine exploring a physical landscape, we might think of climbing the highest mountain, exploring a deep cave, or discovering an unfamiliar region. These are the kinds of things that humans tend to find interesting.&lt;/p&gt;
&lt;p&gt;But there is no reason to assume that every form of intelligence would &lt;a href="https://monkemanx.github.io/articles/where_the_eiffel_tower_is_is_not_obejctive/"&gt;find the same things interesting&lt;/a&gt;. For an insect, the space beneath a particular rock might be a hundred times more significant than a mountain. What looks beautiful to us might look ugly to another being, while something we regard as ugly might be beautiful to it.&lt;/p&gt;
&lt;p&gt;Our way of existing in the world shapes what we find interesting and worth pursuing. Other forms of intelligence may have entirely different preferences.&lt;/p&gt;
&lt;p&gt;When OpenAI&amp;rsquo;s mathematics repository appeared, I read some of the comments from mathematicians discussing the results. One reaction concerned a &lt;a href="https://github.com/openai/math/blob/main/preprints/A-Coulomb-Ground-State-Density-without-Kohn-Sham-Ensemble-Representation-September-25-2026/paper.pdf"&gt;paper&lt;/a&gt; that began with a dimension of \(10^{200}\), prompting the response, in effect, &amp;ldquo;What am I even looking at?&amp;rdquo;&lt;/p&gt;
&lt;p&gt;These reactions struck me as illustrative of the point I am trying to make. Some mathematical approaches may be difficult for humans to appreciate because they operate in regions of the mathematical landscape that do not align with our usual intuitions.&lt;/p&gt;
&lt;p&gt;Perhaps AI can discover results that humans would never have found, not necessarily because it is smarter, more intelligent, or more knowledgeable than us, but because its way of representing problems, exploring possibilities, and making connections differs from ours.&lt;/p&gt;
&lt;h3 id="23-why-does-the-comparison-with-humans-matter-so-much"&gt;2.3. Why does the comparison with humans matter so much?&lt;/h3&gt;
&lt;p&gt;I also think the framing of this debate is often wrong. At times, the reaction seems closer to &lt;a href="https://en.wikipedia.org/wiki/Ressentiment"&gt;ressentiment&lt;/a&gt;, in a Nietzschean sense, than to a considered intellectual argument.&lt;/p&gt;
&lt;p&gt;Results and processes can have value without constantly being compared against one another. Yet much of the discussion seems to revolve around whether AI is better than humans, as though its capabilities would somehow diminish the value of human beings.&lt;/p&gt;
&lt;p&gt;I think this comparison sometimes arises from a wishful fantasy that humans must retain some special status.&lt;/p&gt;
&lt;p&gt;I wrote about this a while ago in my article &lt;a href="https://monkemanx.github.io/articles/insult_to_humanity/"&gt;Insult to Humanity&lt;/a&gt;. The idea that humans possess some unique, superior quality that guarantees our special place in the world is, in my view, a form of naive self-delusion.&lt;/p&gt;
&lt;p&gt;The rapid improvement of AI forces people to confront uncomfortable questions about value and meaning that they may previously have been able to avoid. Even before AI, there was the question of what makes human life meaningful and valuable. But as long as there was no machine capable of challenging our perceived intellectual superiority, it was easier to ignore the question.&lt;/p&gt;
&lt;p&gt;AI now holds up a mirror to us. That mirror can produce a lot of anxiety.&lt;/p&gt;
&lt;h2 id="3-the-joy-of-mathematics-and-the-value-of-the-process"&gt;3. The joy of mathematics and the value of the process&lt;/h2&gt;
&lt;p&gt;I agree that humans often focus too much on results and outcomes, and that learning to enjoy the process is important (much about my writing is about that, see &lt;a href="https://monkemanx.github.io/articles/how_to_live/"&gt;this&lt;/a&gt; and &lt;a href="https://monkemanx.github.io/tangled_thoughts/philosophy_philosophical_ramblings_morality/"&gt;this&lt;/a&gt; as example)). However, the rise of AI has not fundamentally changed our ability to enjoy solving mathematical problems ourselves.&lt;/p&gt;
&lt;p&gt;At least in a recreational setting, nobody is forcing you to use a tool you dislike. If you enjoy solving mathematical puzzles, exploring ideas, and discovering things for yourself, you can still do all of that by hand.&lt;/p&gt;
&lt;p&gt;I remember playing &lt;a href="https://en.wikipedia.org/wiki/Professor_Layton"&gt;Professor Layton&lt;/a&gt; on the Nintendo DS as a child. I loved solving all the different puzzles. In fact, it became a family activity: sometimes my siblings would play, and sometimes my mother would join in.&lt;/p&gt;
&lt;p&gt;Every puzzle already had a solution. Did that make solving it any less exciting? I do not think so.&lt;/p&gt;
&lt;p&gt;The fact that a solution already exists does not necessarily diminish the enjoyment of finding it yourself. If you genuinely enjoy thinking through a problem, trying different approaches, and gradually working toward a solution, the existence of an answer does not take that experience away from you.&lt;/p&gt;
&lt;p&gt;Of course, mathematical research is not identical to solving a puzzle in a video game. Research often involves the possibility of discovering something genuinely new, sharing that discovery with others, and contributing to a collective effort. The release of an AI-generated solution can change those opportunities, especially when a mathematical community has been working on the same problem.&lt;/p&gt;
&lt;p&gt;That is a real concern, and I do not think the Professor Layton analogy fully addresses it. But I do think it is important to distinguish the loss of a particular opportunity for discovery from the idea that AI has somehow destroyed the joy of doing mathematics itself.&lt;/p&gt;
&lt;h3 id="31-i-making-and-mine-making"&gt;3.1. I-making and mine-making&lt;/h3&gt;
&lt;p&gt;I suspect that some of the frustration goes deeper than the loss of an enjoyable process.&lt;/p&gt;
&lt;p&gt;When an AI system solves a problem before a human does, it removes the opportunity to say, &amp;ldquo;I discovered this.&amp;rdquo; The sense of having made a discovery, of being the person who solved a problem that others could not solve, is no longer available in quite the same way.&lt;/p&gt;
&lt;p&gt;This reminds me of the Buddhist concepts of &lt;a href="https://www.imsb.org/i-making-and-mine-making-what-are-the-five-aggregates/"&gt;I-making and mine-making&lt;/a&gt;: the construction of a sense of self and ownership through identification with experiences and achievements.&lt;/p&gt;
&lt;p&gt;The sentiment that AI is destroying the process of mathematics may sometimes conceal an attachment to the idea that &lt;em&gt;I&lt;/em&gt; discovered something, that &lt;em&gt;my&lt;/em&gt; solution was special, or that I accomplished something others could not.&lt;/p&gt;
&lt;p&gt;I do not mean that every mathematician is primarily motivated by vanity, or that the joy of discovery is somehow inauthentic. Genuine curiosity, intellectual ambition, and the desire for recognition can coexist. The point is that the desire to discover something and the desire to be the person who discovered it are not necessarily the same thing.&lt;/p&gt;
&lt;p&gt;Before AI-assisted proofs became widespread, mathematicians could say that they had discovered a new lemma or solved a difficult problem. But how independent was that achievement really?&lt;/p&gt;
&lt;p&gt;Mathematics has always relied on tools and contributions from others. Researchers use previous papers, calculators, computers, and methods developed by other mathematicians. In combinatorics, computers have been used to rule out large numbers of possibilities and establish results that would be impractical to verify by hand. Proof assistants provide another form of assistance.&lt;/p&gt;
&lt;p&gt;None of this makes human mathematical achievement meaningless. It does, however, complicate the idea of a discovery as something produced by an isolated individual through their own unaided ability.&lt;/p&gt;
&lt;p&gt;AI is another tool, albeit an extraordinarily powerful one. Its arrival makes the network of assistance behind mathematical work more visible. Perhaps what changes most is not the fact that mathematical discoveries rely on tools and previous work, but how difficult it becomes to maintain the image of the solitary mathematician who discovers something entirely by themselves.&lt;/p&gt;
&lt;h2 id="4-pushing-the-limits-of-human-ability"&gt;4. Pushing the limits of human ability&lt;/h2&gt;
&lt;p&gt;Another argument is that mathematics is about pushing the limits of human cognition. It is similar to running a marathon: the point is to discover what human beings are capable of and to push those limits further. It would be absurd to include cars in a marathon, because the purpose of the event is to test human endurance, not to find the fastest way to cover a distance.&lt;/p&gt;
&lt;p&gt;I agree with that argument in the context of competition. But I do not think it describes all of mathematics.&lt;/p&gt;
&lt;p&gt;We have seen this distinction play out in other fields. Many people remember &lt;a href="https://en.wikipedia.org/wiki/Deep_Blue_versus_Garry_Kasparov"&gt;Garry Kasparov&amp;rsquo;s famous match against IBM&amp;rsquo;s Deep Blue in 1997&lt;/a&gt;, after which computers became increasingly dominant in chess. Around two decades later, &lt;a href="https://en.wikipedia.org/wiki/AlphaGo_versus_Lee_Sedol"&gt;AlphaGo defeated Lee Sedol&lt;/a&gt; in Go. In both cases, machines achieved levels of performance that many people had previously considered impossible.&lt;/p&gt;
&lt;p&gt;Yet people still enjoy watching humans play chess and Go against one another. We have not stopped caring about human performance simply because machines can outperform us.&lt;/p&gt;
&lt;p&gt;The same applies to mathematics competitions. Even if &lt;a href="https://deepmind.google/blog/advanced-version-of-gemini-with-deep-think-officially-achieves-gold-medal-standard-at-the-international-mathematical-olympiad/"&gt;AI can solve problems from the International Mathematical Olympiad&lt;/a&gt;, that does not mean people will stop wanting to watch human competitors solve them.&lt;/p&gt;
&lt;p&gt;In these settings, the point is not merely to obtain the correct answer. It is to see what people can achieve, to challenge ourselves, and to recognize ourselves in those who push the limits of human ability.&lt;/p&gt;
&lt;p&gt;There is nothing wrong with that. We can value human achievement without pretending that machines must be excluded from every other mathematical activity.&lt;/p&gt;
&lt;p&gt;The distinction is similar to the one I encounter in running. When I travel across the country to visit my grandparents, I take a car or public transport rather than running there. The purpose is to visit my grandparents, and getting there efficiently is what matters. At the same time, I enjoy running half marathons. On those occasions, I do not take a car, even though it would be much faster, because the purpose is different. I want to exercise, challenge myself, and see what I can achieve.&lt;/p&gt;
&lt;p&gt;The appropriate tool depends on the purpose of the activity.&lt;/p&gt;
&lt;p&gt;Mathematical competition can be about human performance. Mathematical research, however, is not one giant competition in which humanity must defeat AI to justify its existence.&lt;/p&gt;
&lt;p&gt;If research were primarily about pushing the limits of human cognition, the same controversy could have arisen when mathematicians began using computers to establish combinatorial results or proof assistants to verify proofs. Those developments also changed what could be achieved by an individual working alone.&lt;/p&gt;
&lt;p&gt;The arrival of AI makes this issue more pressing because of the scale and speed at which it can produce results. But the value of mathematics has never been reducible to the question of whether a human or a machine can solve a problem faster.&lt;/p&gt;
&lt;p&gt;It can still be inspiring to hear about &lt;a href="https://en.wikipedia.org/wiki/Grigori_Perelman"&gt;Grigori Perelman solving a Millennium Prize Problem and refusing the prize money&lt;/a&gt;. His achievement remains remarkable, even if an AI system can solve comparable problems.&lt;/p&gt;
&lt;h2 id="5-the-purpose-of-a-job-versus-the-tasks-it-involves"&gt;5. The purpose of a job versus the tasks it involves&lt;/h2&gt;
&lt;p&gt;The distinction between the purpose of an activity and the tasks involved in performing it is particularly important when discussing professional work.&lt;/p&gt;
&lt;p&gt;I am not a big fan of Nvidia&amp;rsquo;s CEO, but I think a point he makes about automation in radiology is useful.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;The purpose of a radiologist&amp;rsquo;s job is to help diagnose disease and improve patient care. Studying scans is one of the tasks involved in fulfilling that purpose. Automating the task does not necessarily eliminate the purpose of the job.&lt;/p&gt;
&lt;p&gt;~ Ezra Klein Interview&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;The same distinction applies to mathematics.&lt;/p&gt;
&lt;p&gt;A university does not employ a mathematics professor primarily to push the limits of human cognition. The job involves teaching students, conducting research, and advancing the field of mathematics. That is not to say that pushing human limits has no place in mathematics. It clearly does, particularly in competitions. But it is not the sole purpose of mathematical research as a profession.&lt;/p&gt;
&lt;p&gt;Imagine a radiologist who refuses to use an AI system that has been shown to identify abnormalities more reliably than they can, simply because they find examining the scans themselves more enjoyable. We would reasonably ask whether that decision was compatible with their professional responsibilities toward patients.&lt;/p&gt;
&lt;p&gt;A similar principle applies to mathematicians. Imagine a professor who refuses to use computers or calculators because doing calculations by hand is more satisfying. That might be perfectly reasonable in a teaching exercise designed to develop mental arithmetic. It would be much harder to justify if refusing those tools prevented the professor from fulfilling their professional responsibilities.&lt;/p&gt;
&lt;p&gt;The landscape of AI is changing rapidly, and it is not yet clear which tools will become standard in mathematical research. I am not arguing that every mathematician must use AI today. But if using AI eventually becomes a normal and expected part of doing research, refusing to use it solely because one prefers the older process may conflict with the responsibilities of the job.&lt;/p&gt;
&lt;p&gt;The same kind of transition has occurred in astronomy. Astronomers once relied much more heavily on direct visual observation to identify celestial objects. Today, telescopes and other instruments generate enormous quantities of data, and algorithms help identify objects and patterns within it. It would be strange for an astronomer to insist on using only their own eyes to discover new stars.&lt;/p&gt;
&lt;p&gt;The point is not that every new technology must be adopted immediately. It is that professional work has purposes that extend beyond the personal satisfaction of performing particular tasks. When those tasks change, professionals have to consider how best to fulfil those purposes.&lt;/p&gt;
&lt;h2 id="6-is-mathematics-too-abstract-to-matter"&gt;6. Is mathematics too abstract to matter?&lt;/h2&gt;
&lt;p&gt;One rebuttal to the previous argument is that mathematics differs from other sciences because of how it is used. AI can be applied directly to fields such as physics or medicine, which have obvious practical applications. Mathematics, especially pure mathematics, is different. Its problems may seem completely disconnected from the real world, or so far removed from practical applications that accelerating mathematical research offers little immediate benefit.&lt;/p&gt;
&lt;p&gt;I find this argument particularly unconvincing.&lt;/p&gt;
&lt;p&gt;It is true that pure mathematics is often further removed from practical applications than applied mathematics or even theoretical physics. Mathematical discoveries can take a long time to become useful, and some may never find a practical application. But mathematics is not disconnected from the world.&lt;/p&gt;
&lt;p&gt;Consider the development of calculus, which made major advances in physics possible. Consider graph theory, which has become important in logistics, networks, and scheduling. Or consider Einstein&amp;rsquo;s theory of general relativity, which relied on mathematical tools developed in differential geometry.&lt;/p&gt;
&lt;p&gt;One can debate how much a particular mathematical discovery contributes to the world, and how quickly that contribution appears. What is difficult to deny is that mathematical research has had an enormous impact on other fields and on society more broadly.&lt;/p&gt;
&lt;p&gt;However, there is an even more important consideration.&lt;/p&gt;
&lt;p&gt;A great deal of mathematical research takes place at universities and is funded directly or indirectly by public money. This creates a form of public accountability. Mathematics professors and other academic researchers are paid, in large part, because society expects mathematical research to contribute to human knowledge and, potentially, to developments that benefit society in the future.&lt;/p&gt;
&lt;p&gt;The public does not primarily fund mathematical research so that individual mathematicians can push their own cognitive limits. That may be a valuable personal motivation, but the broader justification for publicly funded research is that expanding mathematical knowledge may produce benefits beyond the immediate experience of the researcher.&lt;/p&gt;
&lt;p&gt;None of this means that every mathematical result must have an obvious practical application. Basic research is valuable precisely because its applications are often unknown in advance. Nor does it mean that researchers should abandon intellectual curiosity in favour of short-term results.&lt;/p&gt;
&lt;p&gt;It does mean that the claim that mathematics is too theoretical for AI to be useful is a poor argument. The potential benefits of mathematical research do not disappear simply because they may take years or decades to become apparent.&lt;/p&gt;
&lt;p&gt;In fact, this argument can sound a little like NIMBY: using AI in other fields is acceptable, but one&amp;rsquo;s own field is special and must remain untouched. There are people in other professions who enjoy their work and worry that AI will take something away from it, too.&lt;/p&gt;












&lt;figure style="display: block; margin: 0 auto; width: 100%; "&gt;
 &lt;img
 src="https://monkemanx.github.io/attachments/math_chad.jpg"
 loading="lazy"
 width=""
 height=""
 alt="Image"
 style="display: block; width: 100%; height: 100%; object-fit: contain; "
 &gt;
 
 &lt;figcaption style="text-align: center; margin-top: 0.5rem;"&gt;Also a bit Outdated.&lt;/figcaption&gt;
 
&lt;/figure&gt;

&lt;h2 id="7-why-keep-using-ai-to-solve-mathematical-problems"&gt;7. Why keep using AI to solve mathematical problems?&lt;/h2&gt;
&lt;p&gt;One final objection is that using AI to solve one or two mathematical problems might be acceptable, but continuing to solve more and more problems is unnecessary showing off. At some point, the argument goes, AI has already demonstrated its capabilities, and continuing to use it in this way takes something important away from human mathematicians.&lt;/p&gt;
&lt;p&gt;I do not find this particularly convincing.&lt;/p&gt;
&lt;p&gt;First, the claim that these achievements are important when humans accomplish them but somehow unnecessary when AI does so resembles the kind of species-based distinction that Peter Singer criticizes in &lt;em&gt;All Animals Are Equal&lt;/em&gt;. Why should the importance of an achievement depend entirely on whether it was accomplished by a human? If the result itself is valuable, its value does not automatically disappear when a machine produces it.&lt;/p&gt;
&lt;p&gt;Second, although I have discussed AI and LLMs throughout this article as if they were a single entity, they are not. New models are constantly being released by different labs, including Anthropic, OpenAI, DeepSeek, Mistral, and Z.ai. Each new model needs to be evaluated to understand what it can and cannot do.&lt;/p&gt;
&lt;p&gt;One difficulty with existing &lt;a href="https://www.jeannelizabeth.com/blog/benchmaxxing-the-ugly-art-of-optimising-for-leaderboards"&gt;AI benchmarks is that they can become saturated or contaminated&lt;/a&gt;. A model may have encountered benchmark questions or very similar material during training, either deliberately or incidentally. This makes it difficult to determine whether a strong score reflects genuine generalization or familiarity with the material.&lt;/p&gt;
&lt;p&gt;Mathematics provides an interesting way to evaluate these systems. There are many open problems for which no accepted solution is known, so a genuinely new result can provide evidence of a model&amp;rsquo;s capabilities beyond its performance on familiar benchmark questions.&lt;/p&gt;
&lt;p&gt;Furthermore, where a formal proof is provided, it can often be checked using a proof assistant such as &lt;a href="https://terrytao.wordpress.com/2026/10/09/what-mathematicians-should-know-about-the-lean-theorem-proverquestions-of-reliability-and-ai/"&gt;Lean&lt;/a&gt;. This does not automatically establish that the problem is important, that the formalization captures the intended mathematical claim, or that the result will be useful. But it offers a way to verify mathematical correctness that is unavailable for many other kinds of open-ended task.&lt;/p&gt;
&lt;p&gt;This is one reason that solving previously unsolved mathematical problems is valuable for evaluating AI systems. The point is not simply to show off. It is to establish what current models can achieve, identify the limits of their capabilities, and compare those capabilities with those of earlier systems.&lt;/p&gt;
&lt;p&gt;There is also a separate question about how AI companies should publish their results. Mathematicians have legitimate reasons to care about transparency, attribution, independent verification, and the effect of mass releases on academic research. Those concerns deserve to be taken seriously. But they are arguments about how mathematical AI research should be conducted and communicated, not arguments for stopping the evaluation of AI systems altogether.&lt;/p&gt;
&lt;h2 id="conclusion"&gt;Conclusion&lt;/h2&gt;
&lt;p&gt;Thats it. Make of this what you will.&lt;/p&gt;












&lt;figure style="display: block; margin: 0 auto; width: 60%; "&gt;
 &lt;img
 src="https://monkemanx.github.io/attachments/world_as_chill_recreation.jpg"
 loading="lazy"
 width=""
 height=""
 alt="Image"
 style="display: block; width: 100%; height: 100%; object-fit: contain; "
 &gt;
 
&lt;/figure&gt;
</description></item><item><title>I hate my Phone</title><link>https://monkemanx.github.io/articles/i_hate_my_phone/</link><pubDate>Thu, 01 Oct 2026 10:00:00 +0000</pubDate><author>monkeman@cock.li (MonkeMan)</author><guid>https://monkemanx.github.io/articles/i_hate_my_phone/</guid><description>&lt;p&gt;I hate my phone. And I don&amp;rsquo;t mean this in a polemical sense either. If I were asked to describe a device designed by the devil himself, I could not come up with a better device than a smartphone.&lt;/p&gt;












&lt;figure style="display: block; margin: 0 auto; width: 70%; "&gt;
 &lt;img
 src="https://monkemanx.github.io/attachments/phones/firework_2019_china.jpg"
 loading="lazy"
 width=""
 height=""
 alt="Image"
 style="display: block; width: 100%; height: 100%; object-fit: contain; "
 &gt;
 
&lt;/figure&gt;

&lt;p&gt;I hate the constant notifications. I hate how it is a constant source of distraction. I hate how owning a smartphone comes with the expectation of being available at all times. I hate how it has shifted many direct conversations we used to have into conversations mediated through text, or even worse, video calls. I hate how it normalized freeware and software riddled with ads. I hate how the idea of an open-source version of Android, available to everyone and modifiable by everyone, became a collection of locked-down, vendor-specific versions. I hate how much time I spend on it. I hate how much it has become necessary for everyday life, from two-factor authentication needed for everything to banking apps and navigation.&lt;/p&gt;
&lt;p&gt;But if I had to pick one specific target for my dislike, it would be how it mediates and filters experience, so that the experience itself becomes secondary to what we can do with that experience.&lt;/p&gt;












&lt;figure style="display: block; margin: 0 auto; width: 70%; "&gt;
 &lt;img
 src="https://monkemanx.github.io/attachments/phones/mona_lisa_imago-dreamstime_1_1_format_l.jpg"
 loading="lazy"
 width=""
 height=""
 alt="Image"
 style="display: block; width: 100%; height: 100%; object-fit: contain; "
 &gt;
 
&lt;/figure&gt;

&lt;p&gt;The problem is not mediation itself. How we experience reality is always mediated through something, be it obvious examples such as glasses if we have problems with our sight, hearing aids if we have impaired hearing, or much more subtle things, such as the coffee we drink in the morning and the caffeine that so subtly changes our perception of reality. In fact, we can say that there is no such thing as an unmediated way of experiencing life. If you are familiar with some of my blog articles where I explore Heidegger&amp;rsquo;s thoughts or Buddhist dependent origination, this goes in the same direction.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&amp;ldquo;This is probably the case with all psychoactive drugs, but is especially true of caffeine, since the particular quality of consciousness it sponsors in the regular user feels not so much altered or distorted as normal and transparent. Indeed, for most of us, to be caffeinated to one degree or another has simply become baseline human consciousness. Something like 90 percent of humans ingest caffeine regularly, making it the most widely used psychoactive drug in the world, and the only one we routinely give to children (commonly in the form of soda). Few of us even think of it as a drug, much less our daily use of it as an addiction. It&amp;rsquo;s so pervasive that it&amp;rsquo;s easy to overlook the fact that to be caffeinated is not baseline consciousness but, in fact, an altered state. It just happens to be a state that virtually all of us share, rendering it invisible.&amp;rdquo;&lt;/p&gt;
&lt;p&gt;~ Michael Pollen, This is your mind on Plants&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;The problem is how smartphones mediate experience. Before I can talk about this, I want to first talk a bit about time.&lt;/p&gt;
&lt;p&gt;If we look at time, there is something strange about how we perceive it. The past is over and can never be regained, and the future is not here. We can do all the wishing we want, but the future will not come sooner. The Stoic Seneca already echoes this:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Life is divided into three periods—that which has been, that which is, and that which will be. Of these the present time is short, the future is doubtful, the past is certain. [&amp;hellip;] The past is the one over which Fortune has lost control, the one which cannot be brought back under any man&amp;rsquo;s power. [&amp;hellip;] Present time is very brief [&amp;hellip;] for it is always in motion, it ever flows and hurries on; it ceases to be before it has come.&lt;/p&gt;
&lt;p&gt;~ Seneca, &lt;em&gt;On the Shortness of Life&lt;/em&gt;, X&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;For a more Christian perspective, Saint Augustine talks about something very similar:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;(23) Wherever they are, whatever they are, they do not exist except in the present. When a true narrative of the past is related, the memory produces not the actual events which have passed away but words conceived from images of them &amp;hellip; Thus my boyhood, which is no longer, lies in past time which is no longer. But when I am recollecting and telling my story, I am looking on its image in present time, since it is still in my memory &amp;hellip; we frequently think out in advance our future actions, and that premeditation is in the present; but the action which we premeditate is not yet in being because it lies in the future.&lt;/p&gt;
&lt;p&gt;(26) What is by now evident and clear is that neither future nor past exists&amp;hellip;&lt;/p&gt;
&lt;p&gt;~ St. Augustine, &lt;em&gt;Confessions&lt;/em&gt;, XI.18.23, 26&lt;/p&gt;
&lt;/blockquote&gt;












&lt;figure style="display: block; margin: 0 auto; width: 70%; "&gt;
 &lt;img
 src="https://monkemanx.github.io/attachments/phones/photo-1759558157347-8cdbb3c9d5b1.jpg"
 loading="lazy"
 width=""
 height=""
 alt="Image"
 style="display: block; width: 100%; height: 100%; object-fit: contain; "
 &gt;
 
&lt;/figure&gt;

&lt;p&gt;Hence, there is something very insidious about how smartphones work. Who does not know the experience of being on a family holiday when suddenly something beautiful catches your attention, perhaps a building, a landscape, or some food, and immediately the smartphone is taken out and photos are made?&lt;/p&gt;
&lt;p&gt;This introduces a new layer to how we experience reality. Before, the experience might simply have been: &lt;strong&gt;world → experience&lt;/strong&gt;. Now every moment can become: &lt;strong&gt;world → experience → &amp;ldquo;I should photograph this&amp;rdquo; → photograph → edit → share → reactions&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;And what is important here is not the act of taking the photo itself, but that the possibility of doing so is always somewhere in the back of your mind. It changes our thought patterns and how we experience the world.&lt;/p&gt;
&lt;p&gt;An experience cannot simply be experienced for its own sake wholeheartedly, where one just marvels at the experience itself. The possibility of taking a photo introduces thoughts such as: &lt;em&gt;How does this look through the camera? How is the lighting? Are those people in the way?&lt;/em&gt; And so on.&lt;/p&gt;
&lt;p&gt;We become distracted from wholeheartedly embracing an activity and instead run on a hamster wheel of thoughts, even when those thoughts are not obvious or fully conscious, but instead operate in the background.&lt;/p&gt;
&lt;p&gt;Let&amp;rsquo;s think about why people take photos. The most common response is probably something like: &lt;em&gt;I want to preserve this beautiful moment so I can look at it later.&lt;/em&gt; But this is problematic on multiple levels.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;As already described, only the present truly exists. We are trading the nonexistent future for the existing present. When we are not wholeheartedly present and instead think about future plans, we are not really living in the present.&lt;/li&gt;
&lt;li&gt;This mentality of preservation contains the idea of capturing a moment and somehow eternalizing it. But this is fundamentally at odds with the fact that everything is constantly changing. Reality never remains fixed. By these little acts of preservation, we reinforce the illusion that things can remain unchanged. This can lead to nostalgia for the past, even though the past no longer exists.&lt;/li&gt;
&lt;li&gt;it also undermines the future present. When that future moment finally arrives, instead of focusing on the present, we may find ourselves focused on the past and trying to recreate or remember something that has already passed.&lt;/li&gt;
&lt;/ol&gt;












&lt;figure style="display: block; margin: 0 auto; width: 70%; "&gt;
 &lt;img
 src="https://monkemanx.github.io/attachments/phones/160526_TRA_004_xgaplus.jpg"
 loading="lazy"
 width=""
 height=""
 alt="Image"
 style="display: block; width: 100%; height: 100%; object-fit: contain; "
 &gt;
 
&lt;/figure&gt;

&lt;p&gt;So, to summarize: in the existing present, we instead focus on the nonexistent future, and in the future present, we focus on the nonexistent past. This is madness.&lt;/p&gt;
&lt;p&gt;One Buddhist monk describes this very well:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;If while washing dishes, we think only of the cup of tea that awaits us, thus
hurrying to get the dishes out of the way as if they were
a nuisance, then we are not &amp;ldquo;washing the dishes to wash the dishes.&amp;rdquo; What&amp;rsquo;s
more, we are not alive during the time we are washing the dishes. In fact we
are completely incapable of realizing the miracle of life while standing at the
sink. If we can&amp;rsquo;t wash the dishes, the chances are we won&amp;rsquo;t be able to drink
our tea either. While drinking the cup of tea, we will only be thinking of other
things, barely aware of the cup in our hands. Thus we are sucked away into
the future —and we are incapable of actually living one minute of life.&lt;/p&gt;
&lt;p&gt;~ Thích Nhất Hạnh, &lt;em&gt;The Miracle of Mindfulness: An Introduction to the Practice of Meditation&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h3 id="a-minimal-smartphone"&gt;A Minimal Smartphone&lt;/h3&gt;
&lt;p&gt;Still, all this being said, I am still reliant on my smartphone on a day-to-day basis. The most essential things are all kinds of two-factor authentication, navigation of public transport, and, lastly, messaging with family. So sadly, I cannot yet get rid of my phone. One can dream.&lt;/p&gt;
&lt;p&gt;But I can do the next best thing, which is minimizing my phone to its essentials. That is what I want to outline in the next few steps. First, keep in mind that what I suggest below only works for Android and may damage your phone.&lt;/p&gt;
&lt;p&gt;The first thing I suggest is installing &lt;a href="https://play.google.com/store/apps/details?id=app.olauncher&amp;amp;hl=en_US&amp;amp;pli=1"&gt;Olauncher&lt;/a&gt;, which is a minimal interface for your Android phone. It removes all those pesky app icons littered across your home screen and replaces them with a simple list that you can scroll through to find the app you want to start.&lt;/p&gt;
&lt;p&gt;Why do this? We want to minimize our phone to the basics we really need. The colorful icons and all the fancy stuff are unnecessary bloat that distracts from what your phone is really for: a tool meant to be used, not one that uses you.&lt;/p&gt;
&lt;p&gt;The first thing we want to do is enable ADB. This basically lets us change things on our phone using our computer. To do this, you first need to enable developer settings. If you have not done so already, you can usually do this by tapping the build number around seven times in your settings. After that, you can go into the developer settings and enable ADB.&lt;/p&gt;
&lt;p&gt;Now that we have enabled ADB, we can connect it to our phone. With &lt;code&gt;adb devices&lt;/code&gt;, you should be able to see your phone. I would then suggest making some backups in case something goes wrong. To back up your SD card, you can use ADB:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;❯ adb pull /sdcard/ ~/phone-backup/&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Also back up Google and WhatsApp, if you use them, as well as any other apps that are important to you and offer cloud backups.&lt;/p&gt;
&lt;p&gt;There are two main sources of distraction that we want to remove. The first is bloatware installed by the OEM, basically the manufacturer of the phone. The second is apps that we manually installed ourselves.&lt;/p&gt;
&lt;p&gt;Let&amp;rsquo;s start with the first. For this, I suggest using &lt;a href="https://github.com/Universal-Debloater-Alliance/universal-android-debloater-next-generation"&gt;Universal Android Debloater Next Generation&lt;/a&gt;. After you have installed it, open it. If your smartphone has ADB enabled and is connected to your computer via a cable, you should now see a bunch of apps that can be removed.&lt;/p&gt;
&lt;p&gt;I would suggest using the recommended list. Select the apps from that list and remove them. Then check whether your phone is still working properly. If something goes wrong, you can either reinstall the apps using the program or factory-reset your phone, which should also automatically reinstall the removed programs.&lt;/p&gt;
&lt;p&gt;For manually installed apps, you can use the following command in the terminal:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-fish" data-lang="fish"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;1&lt;/span&gt;&lt;span class="cl"&gt;❯ adb shell pm list packages -&lt;span class="m"&gt;3&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="nf"&gt;sed&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;s/^package://&amp;#39;&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; ~/phone-backup/user-apps.txt
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This generates a list of all the apps installed on your smartphone. Edit the list and remove all the apps you want to keep. If you are unsure what a particular app is because of its cryptic package name, use Google to search for it.&lt;/p&gt;
&lt;p&gt;After that, if you use Fish as your shell, you can use the following command to remove the apps remaining on your list:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-fish" data-lang="fish"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;1&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;while&lt;/span&gt; &lt;span class="nb"&gt;read&lt;/span&gt; &lt;span class="na"&gt;-l&lt;/span&gt; package
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;2&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="k"&gt;test&lt;/span&gt; &lt;span class="na"&gt;-n&lt;/span&gt; &lt;span class="s2"&gt;&amp;#34;&lt;/span&gt;&lt;span class="nv"&gt;$package&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;3&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;&amp;#34;Removing &lt;/span&gt;&lt;span class="nv"&gt;$package&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;4&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="nf"&gt;adb&lt;/span&gt; shell pm uninstall &lt;span class="na"&gt;--user&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt; &lt;span class="s2"&gt;&amp;#34;&lt;/span&gt;&lt;span class="nv"&gt;$package&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;/dev/null
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;5&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;end&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;6&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;end&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; ~/phone-backup/user-apps.txt
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</description></item><item><title>In Defense of Idealism</title><link>https://monkemanx.github.io/articles/defense_of_idealism/</link><pubDate>Sun, 02 Aug 2026 18:00:00 +0000</pubDate><author>monkeman@cock.li (MonkeMan)</author><guid>https://monkemanx.github.io/articles/defense_of_idealism/</guid><description>&lt;h2 id="1-introduction"&gt;1. Introduction&lt;/h2&gt;
&lt;p&gt;Recently, as part of a research practicum, I attended a lecture on epistemology. However, the lecture was not given by a member of the philosophy faculty but by a computer science professor who happened to be interested in philosophical ideas. During the lecture, he presented various epistemological positions, including naïve realism, empiricism, rationalism, idealism, positivism, and others.&lt;/p&gt;
&lt;p&gt;He was also very opinionated about these theories. In particular, he was a strong supporter of verificationism and realism and highly critical of what we might call the more &amp;ldquo;subjective&amp;rdquo; approaches, such as idealism or constructivism. He repeatedly made fun of people in the humanities, where these theories are more common, arguing that they are ridiculous, that dialectics has long since been proven wrong, that the &lt;em&gt;Weltgeist&lt;/em&gt; is a nonsensical concept, and so on. The overall message was essentially: &lt;em&gt;we&lt;/em&gt; in STEM are the enlightened ones who know how much better realism is.&lt;/p&gt;
&lt;p&gt;I did not say anything at the time. Although I am a computer science student myself, and therefore supposedly on the &amp;ldquo;better&amp;rdquo; or &amp;ldquo;enlightened&amp;rdquo; side, I found the whole presentation deeply frustrating for several reasons.&lt;/p&gt;
&lt;p&gt;First, you are a computer science professor, not a philosopher. I doubt he has carefully read Schopenhauer&amp;rsquo;s &lt;em&gt;The World as Will and Representation&lt;/em&gt; or Berkeley&amp;rsquo;s &lt;em&gt;A Treatise Concerning the Principles of Human Knowledge&lt;/em&gt;. The sheer arrogance of believing that, without seriously engaging with the primary literature, you understand these ideas better than philosophers such as Berkeley, Schopenhauer, or Hegel is astonishing. Whatever objection you have to their theories, do you really think it never occurred to them? These thinkers spent decades developing and defending their positions. Honestly, it often felt as though his understanding of these so-called &amp;ldquo;subjective&amp;rdquo; theories came primarily from Bertrand Russell&amp;rsquo;s &lt;em&gt;History of Western Philosophy&lt;/em&gt;, a book that is well known for its rather poor treatment of German idealism.&lt;/p&gt;
&lt;p&gt;Second, even if you genuinely believe that your position is correct and that other disciplines are mistaken, I do not understand the need to ridicule them. At one point, he lamented that the gap between STEM and the humanities is widening and predicted that it would continue to do so. But this attitude, mocking rather than sincerely trying to understand the other side, is precisely what keeps that gap from closing.&lt;/p&gt;
&lt;p&gt;Third, he spent several slides proudly talking about papers he had written in which he had supposedly &amp;ldquo;owned&amp;rdquo; these foolish constructivists. He then recounted the story that one prominent constructivist, Paul Feyerabend, was asked on his deathbed, while suffering in great pain, whether he still believed that pain and medicine were socially constructed, to which he allegedly replied, &amp;ldquo;No.&amp;rdquo; Whether the story is even true is beside the point. What struck me was the complete lack of empathy in using someone&amp;rsquo;s final moments as a punchline to score philosophical points.&lt;/p&gt;
&lt;p&gt;Because of all this, I wanted to push back against at least one of the positions that was dismissed so casually. In this article, I want to defend idealism. My goal is to show that idealism is a far more reasonable worldview than it initially appears to someone encountering it for the first time. Although I am not fully convinced by idealism myself, that is not because I believe its arguments are obviously flawed or because the view is too radical. If anything, I think its real challenge is that it may not be radical enough.&lt;/p&gt;
&lt;p&gt;I will not discuss every position that was criticized in the lecture. Constructivism, dialectics, and several other theories deserve discussions of their own. However, for the sake of brevity and because idealism is the tradition I know best—I will focus exclusively on idealism.&lt;/p&gt;












&lt;figure style="display: block; margin: 0 auto; width: 60%; "&gt;
 &lt;img
 src="https://monkemanx.github.io/attachments/IMG_0707.jpg"
 loading="lazy"
 width=""
 height=""
 alt="Image"
 style="display: block; width: 100%; height: 100%; object-fit: contain; "
 &gt;
 
&lt;/figure&gt;

&lt;p&gt;Before I begin, two caveats are in order.&lt;/p&gt;
&lt;p&gt;First, throughout this article I will use terms such as &lt;em&gt;spirit&lt;/em&gt;, &lt;em&gt;consciousness&lt;/em&gt;, &lt;em&gt;mind&lt;/em&gt;, &lt;em&gt;experience&lt;/em&gt;, and &lt;em&gt;idea&lt;/em&gt; somewhat interchangeably. This is partly because I am highly skeptical of our ability to define such concepts with complete precision. Rather than referring to sharply bounded entities, I think these words evoke overlapping clusters of associations. Moreover, although different philosophers cash out these terms differently, they are often pointing toward something broadly similar. Berkeley primarily speaks of &lt;em&gt;ideas&lt;/em&gt;, Schopenhauer emphasizes &lt;em&gt;will&lt;/em&gt;, Hegel speaks of &lt;em&gt;mind&lt;/em&gt; or &lt;em&gt;spirit&lt;/em&gt;, while contemporary philosophers such as Bernardo Kastrup tend to frame the discussion in terms of &lt;em&gt;consciousness&lt;/em&gt; or &lt;em&gt;experience&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;Second, when I speak of &lt;em&gt;idealism&lt;/em&gt; in this article, I primarily have in mind the version that David Chalmers calls &lt;strong&gt;cosmic idealism&lt;/strong&gt;. This is the view that reality does not depend on the mind of any individual subject. Rather, all concrete facts are ultimately grounded in the mental states of a single cosmic mind, such as the universe itself or perhaps God.&lt;/p&gt;
&lt;h2 id="2-what-is-idealism"&gt;2. What is Idealism?&lt;/h2&gt;
&lt;p&gt;Before mounting a defense of idealism, it is helpful to first define what idealism actually is. The exact definition differs from philosopher to philosopher, so I will only give a rough outline here. Historically, idealism has been associated with philosophers such as Berkeley and Schopenhauer. More recently, philosophers like Bernardo Kastrup have defended modern versions of the view, although they formulate it somewhat differently.&lt;/p&gt;
&lt;p&gt;Broadly speaking, however, they all give the same answer to the question: &lt;strong&gt;What is reality ultimately made of?&lt;/strong&gt; Or, put differently, &lt;strong&gt;what is the fundamental substance of the universe?&lt;/strong&gt; Some call it &lt;em&gt;spirit&lt;/em&gt;, others &lt;em&gt;mind&lt;/em&gt;, &lt;em&gt;experience&lt;/em&gt;, or &lt;em&gt;consciousness&lt;/em&gt;, but the central idea is the same: reality is fundamentally mental.&lt;/p&gt;
&lt;p&gt;To better understand what this means, it is helpful to consider the following distinction. When we reflect on our own experience, we notice (no pun intended) that there seems to be a difference between our &lt;strong&gt;outer world&lt;/strong&gt; and our &lt;strong&gt;inner world&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;The outer world appears to consist of objective things that exist independently of us, can be measured, quantified, and are accessible to everyone. By contrast, our inner life seems to be subjective, varying from person to person, and directly accessible only to ourselves.&lt;/p&gt;
&lt;p&gt;These two &amp;ldquo;worlds&amp;rdquo; also appear to possess different properties.&lt;/p&gt;
&lt;p&gt;First, objects in the outer world have &lt;strong&gt;extension&lt;/strong&gt;: they occupy a determinate region of space. My desk occupies part of my room and excludes other objects from occupying exactly the same place. This does not seem to be true of the inner world. If I imagine the Eiffel Tower, it does not appear to literally occupy space inside my mind. I can effortlessly shrink or enlarge it, and no matter how large I imagine it to be, I can always imagine something next to it. It does not seem to possess spatial extension in the same sense as physical objects.&lt;/p&gt;
&lt;p&gt;Second, the outer world appears to be &lt;strong&gt;governed by mechanical laws&lt;/strong&gt;. If I drop an apple, it falls. Massive objects attract one another through gravity, and physical systems evolve according to regular laws. My imagination, however, does not appear to be constrained in the same way. I can imagine apples floating upward, objects repelling one another, or entirely impossible worlds without contradiction.&lt;/p&gt;
&lt;p&gt;Third, the outer world appears to be &lt;strong&gt;public&lt;/strong&gt;, whereas the inner world is &lt;strong&gt;private&lt;/strong&gt;. We can all observe the same tree, hear the same sound, or measure the same temperature. By contrast, no one else can directly observe my thoughts or experiences.&lt;/p&gt;
&lt;p&gt;Finally, we have access to these two worlds in fundamentally different ways. We know our inner world through &lt;strong&gt;immediate introspection&lt;/strong&gt;. We simply attend to our own thoughts, sensations, or imaginings. Our knowledge of the outer world, by contrast, is &lt;strong&gt;mediated through the senses&lt;/strong&gt;. Sight, hearing, touch, smell, and taste act as interfaces through which information about the external world reaches consciousness.&lt;/p&gt;
&lt;p&gt;Kastrup makes a similar point:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;When we look around, we see a world of objects with particular shapes, as well as events unfolding in defined locations. We then automatically assume that the world around us is constituted by these objects and events; by these shapes and locations. In other words, we believe that our perception is a kind of transparent window into the world, revealing to us the world as it is in itself. But can we conceive of perception as something other than a transparent window into the world? Of course we can. Take an airplane, for instance: it has a number of sensors—such as air speed, pressure, and orientation sensors—which measure the states of the sky outside the airplane. The resulting measurements are then displayed to the pilot in an encoded manner, in the form of dial indications in the airplane’s dashboard. As such, the airplane’s dashboard conveys accurate and important information about the sky outside, albeit in an encoded form&amp;hellip;&lt;/p&gt;
&lt;p&gt;[&amp;hellip;]&lt;/p&gt;
&lt;p&gt;Instead, perception is like a dashboard of dials: it contains information about the world only in an encoded form, thereby limiting the entropy of our internal states, just as a dashboard of dials intrinsically limits the entropy of information pilots have to contend with.&lt;/p&gt;
&lt;p&gt;~ Bernardo Kastrup, &lt;em&gt;Analytic Idealism&lt;/em&gt;, Chapter 2&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Before we continue, it is helpful to introduce one more important concept: &lt;strong&gt;substance&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;A substance is the fundamental substrate out of which things are made. One traditional way of defining a substance is as something that exists independently of anything else. For example, we might say that a chair is made of atoms. The chair therefore depends on atoms and is not itself a substance. The atoms, however, would count as substances because they are more fundamental.&lt;/p&gt;
&lt;p&gt;Of course, modern physics complicates this picture. Atoms themselves are composed of smaller constituents, which in turn may depend on even more fundamental entities. The example is therefore purely illustrative.&lt;/p&gt;
&lt;p&gt;With this terminology, we can distinguish between &lt;strong&gt;substances&lt;/strong&gt;, which are fundamental, and the &lt;strong&gt;properties&lt;/strong&gt; they possess. Ordinary objects are then understood as arrangements of a substance together with its characteristic properties. Again, this is a simplification, but it will suffice for our purposes.&lt;/p&gt;
&lt;p&gt;Now that we have distinguished the inner and outer worlds, we can ask an important question: &lt;strong&gt;How should we explain this distinction?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;This is where the concept of substance becomes useful.&lt;/p&gt;
&lt;p&gt;Within ontology, the branch of philosophy concerned with what exists and what things are made of, there are three major positions (strictly speaking there are more, such as Leibniz&amp;rsquo;s monadology, but these three are the standard views).&lt;/p&gt;
&lt;p&gt;The first is &lt;strong&gt;dualism&lt;/strong&gt;, most famously defended by Descartes. As the name suggests, dualism holds that there are &lt;strong&gt;two distinct substances&lt;/strong&gt;: a physical substance underlying the outer world and a mental substance underlying the inner world.&lt;/p&gt;
&lt;p&gt;Why might someone be attracted to this view? Precisely because of the differences we just discussed. The physical world possesses extension and appears to follow mechanical laws, whereas the mental world lacks extension and seems fundamentally different. Dualism explains this by saying that these two domains are literally composed of different kinds of substance.&lt;/p&gt;
&lt;p&gt;The second position is &lt;strong&gt;physicalism&lt;/strong&gt; (or materialism, I will ignore the distinction here, since philosophers themselves disagree on how best to define &lt;em&gt;physical&lt;/em&gt; or &lt;em&gt;matter&lt;/em&gt;).&lt;/p&gt;
&lt;p&gt;Physicalism is probably the view most people in STEM implicitly grow up with. Its motivation comes largely from the remarkable success of modern science. Time and again, science has explained complex phenomena by reducing them to simpler physical processes. Falling apples, planetary motion, chemical reactions, and biological life have all received increasingly successful physical explanations.&lt;/p&gt;
&lt;p&gt;Physicalism therefore argues that the same strategy should apply to the mind. Mental phenomena are not fundamental but instead emerge from physical processes occurring in the brain. There is ultimately only one substance, the physical, and everything mental is reducible to it.&lt;/p&gt;
&lt;p&gt;Finally, we arrive at &lt;strong&gt;idealism&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;In a sense, idealism simply reverses the explanatory direction. Instead of beginning with the physical world and attempting to explain consciousness in terms of matter, idealism begins with consciousness itself. We know our own experiences directly, so the idealist proposes that mentality, not matter, is fundamental. The physical world is then explained in terms of mental substance rather than the other way around.&lt;/p&gt;
&lt;p&gt;At first glance this may sound like an outrageous proposal. However, by the end of this article, I hope you will at least see that it is a far more reasonable philosophical position than it initially appears.&lt;/p&gt;
&lt;p&gt;To summarize:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Dualism:&lt;/strong&gt; there are two fundamental substances, one physical and one mental.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Physicalism:&lt;/strong&gt; there is only one substance, the physical, and the mental reduces to it.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Idealism:&lt;/strong&gt; there is only one substance, the mental, and the physical reduces to it.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Before we can properly defend idealism, however, there is one final question we must answer: &lt;strong&gt;What exactly do idealists mean by &amp;ldquo;the mental&amp;rdquo;?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;As mentioned earlier, throughout this article I will use terms such as &lt;em&gt;experience&lt;/em&gt;, &lt;em&gt;mind&lt;/em&gt;, &lt;em&gt;spirit&lt;/em&gt;, &lt;em&gt;consciousness&lt;/em&gt;, &lt;em&gt;soul&lt;/em&gt;, and &lt;em&gt;idea&lt;/em&gt; somewhat interchangeably. They are not perfectly synonymous, but they all point toward roughly the same underlying notion.&lt;/p&gt;
&lt;p&gt;Here is Berkeley&amp;rsquo;s explanation:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Besides the endless variety of ideas (objects of knowledge), there is also something that knows or perceives them and performs various operations, such as willing, imagining, and remembering. This perceiving, active being is what I call mind, spirit, soul, or myself. By these words I do not mean any of my ideas, but something entirely distinct from them, in which ideas exist — or, equivalently, through which they are perceived; for the existence of an idea consists in being perceived.&lt;/p&gt;
&lt;p&gt;~ Berkeley, &lt;em&gt;Principles of Human Knowledge&lt;/em&gt;, Part I, §2.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;and&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;[&amp;hellip;] What I am myself, that which I denote by the term I, is the same with what is meant by soul or spiritual substance. If it be said that this is only quarrelling at a word, and that since the immediate significations of other names are by common consent called ideas, no reason can be assigned why that which is signified by the name spirit or soul may not partake in the same appellation. I answer, all the unthinking objects of the mind agree, in that they are entirely passive, and their existence consists only in being perceived: whereas a soul or spirit is an active being, whose existence consists not in being perceived, but in perceiving ideas and thinking. It is therefore necessary, in order to prevent equivocation and confounding natures perfectly disagreeing and unlike, that we distinguish between spirit and idea. See sect. 27.&lt;/p&gt;
&lt;p&gt;~ Berkeley, &lt;em&gt;Principles of Human Knowledge&lt;/em&gt;, Part I, §139.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;For Berkeley, reality consists of &lt;strong&gt;spirits&lt;/strong&gt; and &lt;strong&gt;ideas&lt;/strong&gt;. A &lt;strong&gt;spirit&lt;/strong&gt; is an active, immaterial substance that perceives, thinks, imagines, and wills. It is the subject that has experiences, not itself an object of experience. &lt;strong&gt;Ideas&lt;/strong&gt;, by contrast, are the passive contents of experience e.g. colors, sounds, sensations, and thoughts, which exist only insofar as they are perceived by a spirit. The spirit is therefore the &lt;strong&gt;perceiver&lt;/strong&gt;, while ideas are the &lt;strong&gt;things perceived&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;Here is a more modern explanation from Kastrup. Notice that he speaks of &lt;strong&gt;experience&lt;/strong&gt; instead of &lt;strong&gt;ideas&lt;/strong&gt;, and &lt;strong&gt;consciousness&lt;/strong&gt; instead of &lt;strong&gt;spirit&lt;/strong&gt;:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;When we stand on a hill and look out to the horizon, whatever exists beyond the horizon line isn’t accessible to us—i.e., it isn’t visible. Nonetheless, since we can see the earth up until the horizon, it’s natural to think that, beyond the horizon, there is just more earth; as opposed to something distinct from, and incommensurable with, the earth. Indeed, if someone were to claim that the earth exists only until the horizon, and that beyond the horizon there is something totally distinct from the earth, you would probably question the sanity of the person. In just the same way, the analytic idealist inspects everything they have direct access to and finds only experiential—i.e., mental—states. After all, we are always cooped up in mind. Anything allegedly nonmental, insofar as it can be accessed by us, is perforce a mental abstraction of our own mind. Knowledge itself is a set of experiential states. To put this in the language of our analogy, all we can see until the horizon of personal experience is, well, experience.&lt;/p&gt;
&lt;p&gt;~ Bernardo Kastrup, &lt;em&gt;Analytic Idealism&lt;/em&gt;, Chapter 6&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;To put it more simply, and in my own words, we can think of &lt;strong&gt;consciousness&lt;/strong&gt; (or spirit, soul, or mind) as the underlying substance, the stage upon which everything appears. &lt;strong&gt;Experiences&lt;/strong&gt; or &lt;strong&gt;ideas&lt;/strong&gt; are then the contents that appear on this stage, much like actors in a theatre.&lt;/p&gt;
&lt;p&gt;The stage determines the general framework within which events can occur, while the actors determine what is actually happening at any given moment. Likewise, consciousness provides the arena in which experience occurs, while particular experiences constitute the ever-changing contents of consciousness.&lt;/p&gt;
&lt;p&gt;Naturally, much more could be said about idealism. However, since this article is intended primarily as an introduction and a defense of the view, I have deliberately kept the discussion brief.&lt;/p&gt;












&lt;figure style="display: block; margin: 0 auto; width: 80%; "&gt;
 &lt;img
 src="https://monkemanx.github.io/attachments/mimo.jpg"
 loading="lazy"
 width=""
 height=""
 alt="Image"
 style="display: block; width: 100%; height: 100%; object-fit: contain; "
 &gt;
 
&lt;/figure&gt;

&lt;h2 id="3-three-categories-of-arguments"&gt;3. Three Categories of Arguments&lt;/h2&gt;
&lt;p&gt;Now that we have defined what idealism is, I want to provide a defense of it. There are several different categories of arguments that can be used in support of idealism. These are not individual arguments, but rather different families of arguments that approach idealism from different perspectives. I will not discuss any of them in exhaustive detail; instead, I will provide a rough outline of each.&lt;/p&gt;
&lt;p&gt;Before beginning, I want to add another caveat: not all arguments presented here are direct arguments for idealism. Some are primarily criticisms of physicalism. However, if physicalism fails and dualism is also rejected, then idealism becomes a natural alternative.&lt;/p&gt;
&lt;p&gt;To briefly explain why dualism is often excluded from this discussion: in contemporary philosophy, dualism is a minority position, largely because of the famous &lt;strong&gt;interaction problem&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;The interaction problem asks how two fundamentally different substances, the physical and the mental, could interact with each other. At first glance, this might not seem problematic. However, consider the properties traditionally attributed to these substances. The physical world is described as extended and governed by mechanical laws, whereas the mental world appears to lack extension and does not seem to follow mechanical laws.&lt;/p&gt;
&lt;p&gt;How can something that occupies space and follows physical laws affect something that has no spatial extension and is not governed by those same laws? What would the mechanism of this interaction be?&lt;/p&gt;
&lt;p&gt;Physicalism and idealism avoid this problem because they posit only one fundamental substance. In physicalism, the interaction problem disappears because mental processes are ultimately physical processes; they exist within the same physical framework and therefore interact according to physical laws.&lt;/p&gt;
&lt;p&gt;Idealism similarly avoids the problem, but in the opposite direction: the physical world is not fundamentally separate from the mental world. What we call the physical is ultimately a manifestation of the mental and therefore follows the structure of the mental substance.&lt;/p&gt;
&lt;h2 id="31-ontological-defense"&gt;3.1 Ontological Defense&lt;/h2&gt;
&lt;p&gt;Ontology is the branch of philosophy concerned with what exists and what things are ultimately made of. The family of arguments discussed here attempts to identify something that possesses certain characteristics or contains certain features that cannot be explained under physicalism, but can be explained naturally under idealism.&lt;/p&gt;
&lt;p&gt;One candidate for such a thing is &lt;strong&gt;consciousness&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;In the now-famous paper &lt;em&gt;What Is It Like to Be a Bat?&lt;/em&gt;, philosopher Thomas Nagel argues that consciousness cannot be fully explained by reducing it to physical processes. From this, some philosophers argue that consciousness poses a fundamental challenge to physicalism.&lt;/p&gt;
&lt;p&gt;Very roughly, what defines consciousness? Consciousness can be described as &lt;strong&gt;subjectivity&lt;/strong&gt;: the fact that there is something it is like to be a particular subject. It is the first-person perspective of experience.&lt;/p&gt;
&lt;p&gt;To understand the difference between objectivity and subjectivity, we can roughly say that something is objective when there is a fact or answer that exists independently of any particular perspective. Subjectivity, by contrast, concerns the existence of a particular point of view and how reality appears from that perspective.&lt;/p&gt;
&lt;p&gt;The problem for physicalism is that it attempts to explain consciousness, a fundamentally subjective phenomenon, by reducing it to something objective. In other words, reduction seems to remove precisely the thing we are trying to explain: subjectivity itself.&lt;/p&gt;
&lt;p&gt;Consider Nagel&amp;rsquo;s example of bat consciousness. We can describe many objective facts about bats. We can explain their sonar system, describe their behavior, and understand that they experience things such as pain, hunger, fear, or desire. However, no matter how much objective knowledge we acquire, we still cannot know what it is actually like to be a bat.&lt;/p&gt;
&lt;p&gt;The objective aspects of a bat can be understood from an external perspective because they are features of the world that can be described independently of a particular viewpoint. But the subjective character of the bat&amp;rsquo;s experience cannot be captured in this way.&lt;/p&gt;
&lt;p&gt;This creates a fundamental problem. What does it mean to understand consciousness objectively? If we remove the subjective perspective from a subjective experience and examine it purely from the outside, what remains? What would remain of what it is like to be a bat if we removed the perspective of the bat itself?&lt;/p&gt;
&lt;p&gt;Objectification works by removing the particular viewpoint of the observer. We describe things in general terms that are independent of any individual perspective. But consciousness is precisely the existence of a perspective. Any attempt to study consciousness purely objectively seems to move further away from the very thing we are trying to understand.&lt;/p&gt;
&lt;p&gt;Reductionism works by explaining phenomena in terms of more fundamental processes and removing the subjective perspective. However, this approach seems inadequate for consciousness because subjective experience is inherently tied to a first-person point of view.&lt;/p&gt;
&lt;p&gt;At this stage, this argument is not necessarily an argument against physicalism itself, but rather against the reduction of consciousness. However, since physicalism claims that the physical is fundamental, it must ultimately explain consciousness in terms of physical reality. The question therefore becomes: how can this be done without reducing consciousness to something that excludes the very subjectivity we are trying to explain?&lt;/p&gt;
&lt;p&gt;This is where idealism offers a different approach.&lt;/p&gt;
&lt;p&gt;For idealism, consciousness is not something that needs to be derived from something else. Consciousness is fundamental. In the same way that mathematics does not explain its axioms through something more fundamental, axioms are the foundation upon which the rest of mathematics is built, idealism treats consciousness as the foundation upon which reality is built.&lt;/p&gt;
&lt;p&gt;This would also explain why consciousness has been such a difficult phenomenon to study. The problem is not only that we struggle to discover what consciousness is; we struggle even to define it precisely. This difficulty may arise because consciousness is not an object within reality that can be examined from the outside. Rather, it is the very foundation through which anything can appear.&lt;/p&gt;
&lt;h2 id="32-epistemological-defense"&gt;3.2 Epistemological Defense&lt;/h2&gt;
&lt;p&gt;The next category of arguments is epistemological. Epistemology is the branch of philosophy concerned with knowledge: how we acquire it, what justifies our beliefs, and what limits our ability to know things.&lt;/p&gt;
&lt;p&gt;The epistemological argument for idealism begins by examining the different ways in which we have access to the inner and outer worlds.&lt;/p&gt;
&lt;p&gt;As discussed earlier, we appear to have direct access to our inner world through introspection, while our access to the external world is mediated through our senses. The problem is that we know our senses can sometimes deceive us. Optical illusions demonstrate that what we perceive is not always an accurate representation of external reality.&lt;/p&gt;
&lt;p&gt;For example, objects at the edge of our visual field can sometimes be misidentified. A person may mistake a coat hanging on a chair for another person, or mistake an object in the corner of a room for something else entirely. Another familiar example occurs when placing an object such as a fork into a glass of water: the fork appears bent where it enters the water, even though we know that the object itself has not changed shape.&lt;/p&gt;
&lt;p&gt;These examples show that our sensory experience does not always directly reveal reality as it is. Instead, our senses provide us with a representation of the external world, and this representation can sometimes be inaccurate.&lt;/p&gt;
&lt;p&gt;This raises an important question: &lt;strong&gt;How can we know that our senses are not always misleading us?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;There does not appear to be any argument that can prove with absolute certainty that our sensory experiences always correspond perfectly to an external reality. Any attempt to verify our senses would itself require using our senses, creating a potential circularity.&lt;/p&gt;
&lt;p&gt;By contrast, introspection appears to provide a different kind of access. When I experience a thought, feeling, or sensation, I do not infer that I am experiencing it, I directly encounter the experience itself.&lt;/p&gt;
&lt;p&gt;Philosopher Philip Goff describes this distinction using the concept of &lt;strong&gt;phenomenal concepts&lt;/strong&gt;: concepts that refer directly to conscious experience itself. These concepts are sometimes described as &amp;ldquo;opaque&amp;rdquo; because the experience they refer to cannot simply be translated into an external description without losing something essential.&lt;/p&gt;
&lt;p&gt;With this distinction in mind, an argument in favor of idealism can be formulated.&lt;/p&gt;
&lt;p&gt;If dualism is rejected, there are two main alternatives: physicalism and idealism.&lt;/p&gt;
&lt;p&gt;We seem to have immediate and direct access to the mental world. I do not need to infer that I am conscious; consciousness is the very basis of my experience. However, our knowledge of the external world appears fundamentally different. We do not access the external world directly but only through sensory experiences, and we know that these sensory experiences can sometimes misrepresent reality.&lt;/p&gt;
&lt;p&gt;Therefore, we have one domain, our conscious experience, to which we have direct access, and another domain: the external physical world, to which we only have indirect access.&lt;/p&gt;
&lt;p&gt;From this perspective, one might ask: should we not prefer the worldview that begins with what we know most directly?&lt;/p&gt;
&lt;p&gt;Idealism takes consciousness as fundamental because consciousness is the one thing that cannot be doubted or bypassed. Everything we know about the external world already appears within consciousness. Even our scientific theories, measurements, and observations are themselves experiences within consciousness.&lt;/p&gt;
&lt;p&gt;This does not prove idealism by itself. A physicalist can argue that consciousness is a representation of an external physical reality. However, the idealist argues that this reverses the explanatory order. Rather than saying that consciousness somehow emerges from a reality we never directly encounter, idealism begins with the one thing we know directly—experience itself—and explains the apparent external world from there.&lt;/p&gt;
&lt;h2 id="33-additional-arguments"&gt;3.3 Additional Arguments&lt;/h2&gt;
&lt;p&gt;The final category consists of several additional arguments and analogies that do not fit neatly into the previous sections.&lt;/p&gt;
&lt;h3 id="the-problem-of-defining-the-physical"&gt;The Problem of Defining the Physical&lt;/h3&gt;
&lt;p&gt;The first argument is not directly an argument for idealism, but rather a challenge for physicalism. It concerns the difficulty of defining what exactly the physical, or matter, is supposed to be.&lt;/p&gt;
&lt;p&gt;One problem is that our understanding of the physical world has constantly changed throughout the history of science. As scientific progress continues, concepts that once appeared fundamental are often revealed to be composed of something deeper.&lt;/p&gt;
&lt;p&gt;For example, some pre-Socratic philosophers argued that the fundamental substance of reality was fire, water, or earth. Later, with the development of atomic theory, matter was understood as consisting of atoms. However, we eventually discovered that atoms themselves are composed of smaller entities, such as electrons, protons, and neutrons, and that these in turn are related to even more fundamental structures.&lt;/p&gt;
&lt;p&gt;This raises a difficult question: when we say that reality is fundamentally &amp;ldquo;physical,&amp;rdquo; what exactly are we referring to?&lt;/p&gt;
&lt;p&gt;If we define the physical based on our current scientific understanding, then history suggests that this definition may eventually become outdated. What we currently consider fundamental may later be revealed to depend on something deeper.&lt;/p&gt;
&lt;p&gt;One possible response is to define the physical as whatever future science ultimately discovers to be fundamental. This avoids the problem of scientific progress changing our definition. However, it introduces another difficulty: such a definition becomes difficult, if not impossible, to falsify. If the physical is simply whatever science will eventually discover, then no possible scientific discovery could prove that definition wrong.&lt;/p&gt;
&lt;p&gt;This creates a strange situation. The physical becomes something that is always pushed beyond our current understanding: something that exists as the unknown foundation behind our experiences, but whose precise nature remains permanently unclear.&lt;/p&gt;
&lt;p&gt;One possible explanation for why defining the physical is so difficult is that the concept itself may be problematic. Perhaps the reason we struggle to define matter is not because we have not yet discovered the correct description, but because matter, as something fundamentally separate from experience, does not exist in the way we assume.&lt;/p&gt;
&lt;p&gt;Berkeley makes a similar argument:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;(79.) But you will insist, what if I have no reason to believe the existence of matter, what if I cannot assign any use to it, or explain anything by it, or even conceive what is meant by that word? Yet still it is no contradiction to say that matter exists, and that this matter is in general a substance, or occasion of ideas; though, indeed, to go about to unfold the meaning, or adhere to any particular explication of those words, may be attended with great difficulties. I answer, when words are used without a meaning, you may put them together as you please, without danger of running into a contradiction. You may say, for example, that twice two is equal to seven, so long as you declare you do not take the words of that proposition in their usual acceptation, but for marks of you know not what. And by the same reason you may say, there is an inert, thoughtless substance without accidents, which is the occasion of our ideas. And we shall understand just as much by one proposition as the other.&lt;/p&gt;
&lt;p&gt;(80.) In the last place, you will say, what if we give up the cause of material substance, and assert, that matter is an unknown somewhat, neither substance nor accident, spirit nor idea, inert, thoughtless, indivisible, immoveable, unextended, existing in no place? For, say you, whatever may be urged against substance or occasion, or any other positive or relative notion of matter, hath no place at all, so long as this negative definition of matter is adhered to.&lt;/p&gt;
&lt;p&gt;I answer, you may, if so it shall seem good, use the word matter in the same sense that other men use nothing, and so make those terms convertible in your style. For after all, this is what appears to me to be the result of that definition: the parts whereof, when I consider with attention, either collectively or separate from each other, I do not find that there is any kind of effect or impression made on my mind, different from what is excited by the term nothing.&lt;/p&gt;
&lt;p&gt;~ Berkeley, &lt;em&gt;Principles of Human Knowledge&lt;/em&gt;, Part I, §79–80.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Berkeley&amp;rsquo;s point is that if the word &amp;ldquo;matter&amp;rdquo; refers to something that cannot be experienced, defined, or understood in any meaningful way, then we may only be using a word without a clear concept behind it.&lt;/p&gt;
&lt;h3 id="kastrups-dashboard-analogy"&gt;Kastrup&amp;rsquo;s Dashboard Analogy&lt;/h3&gt;
&lt;p&gt;Bernardo Kastrup presents another argument, or perhaps more accurately, an analogy, against treating the physical world as fundamentally separate from consciousness.&lt;/p&gt;
&lt;p&gt;His argument is that physicalism may have reversed the relationship between appearance and reality. We assume that the physical world is the external foundation and that consciousness is something produced by it. However, Kastrup argues that what we call the physical world is itself a representation within consciousness.&lt;/p&gt;
&lt;p&gt;He explains this using the analogy of an airplane dashboard:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Under Analytic Idealism, the external experiential states that constitute the outside world present themselves to our observation in the form of what we colloquially call the ‘physical’ world, or ‘matter’—i.e., the contents of perception, the stuff we see, hear, smell, taste, and touch. The ‘physical’ world is merely a dashboard representation of the states of the real external world out there, which arise upon our measuring— i.e., observing—the latter’s mental states with our sensors: our eyes, ears, tongue, nose, and skin. Just like an airplane represents the output of its sensors in the form of indications on dashboard dials, we represent the output of our sensors in the form of the ‘physical’ world displayed on the screen of perception. What we colloquially call ‘matter’ is thus merely an internal cognitive representation of the results of measurements performed on mental states. In other words, ‘matter’ is what mental states look like when observed from an outside perspective. And that is all there is to it, in all cases, without exception.&lt;/p&gt;
&lt;p&gt;~ Kastrup, &lt;em&gt;Analytic Idealism&lt;/em&gt;, Chapter 6&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;The idea is that an airplane dashboard does not resemble the sky outside the airplane. The dashboard contains numbers, symbols, and indicators that represent information gathered by sensors. A pilot can use this information successfully, even though the dashboard itself does not look like the thing it represents.&lt;/p&gt;
&lt;p&gt;Kastrup argues that perception works in a similar way. Our senses measure the world and transform the information into conscious experiences. What we call the physical world e.g. colors, sounds, textures, shapes, and objects, is therefore not necessarily the world as it exists independently of perception. Rather, it is the way reality appears after being processed through our perceptual system.&lt;/p&gt;
&lt;p&gt;In other words, matter may not be something fundamentally separate from consciousness. Instead, matter may be what consciousness looks like when viewed from a particular perspective.&lt;/p&gt;
&lt;h3 id="berkeleys-argument-from-extension-and-size"&gt;Berkeley&amp;rsquo;s Argument from Extension and Size&lt;/h3&gt;
&lt;p&gt;A similar argument appears in Berkeley&amp;rsquo;s discussion of extension and size.&lt;/p&gt;
&lt;p&gt;Berkeley challenges the idea that physical properties such as size and extension exist entirely independently of perception. He argues that the size of an object seems to change depending on the observer.&lt;/p&gt;
&lt;p&gt;For example, a human and a mite can perceive the same object very differently. A mite&amp;rsquo;s foot may appear enormous to the mite but tiny to a human. Berkeley asks: which perception represents the object&amp;rsquo;s true size?&lt;/p&gt;
&lt;p&gt;If the object has one objectively correct size existing independently of perception, then one of these experiences must somehow be closer to reality than the other. But what determines which one?&lt;/p&gt;
&lt;p&gt;Berkeley argues that this leads to a problem. If extension exists independently of perception, then the same object would somehow need to possess different sizes relative to different observers, which appears contradictory.&lt;/p&gt;
&lt;p&gt;A possible response is that the true size of an object is its measurable size, for example, saying that an object is one millimeter long. However, Berkeley&amp;rsquo;s argument is that measurement only gives us relationships between objects. It tells us that one object is a certain number of units compared with another object, but it does not provide an absolute size existing independently of all possible perspectives.&lt;/p&gt;
&lt;p&gt;A human and a mite may both agree that an object is one millimeter long, but that measurement does not capture how that extension appears from their different perspectives.&lt;/p&gt;
&lt;p&gt;The deeper point is that space is not merely a mathematical structure of distances and coordinates. Our experience of space also includes how things appear: their size, distance, closeness, and magnitude.&lt;/p&gt;
&lt;p&gt;Since these qualities vary depending on the observer, Berkeley argues that there may be no single objective size or extension existing completely independently of perception. What we call the &amp;ldquo;real size&amp;rdquo; of an object may instead be an abstraction from different possible experiences of space.&lt;/p&gt;












&lt;figure style="display: block; margin: 0 auto; width: 80%; "&gt;
 &lt;img
 src="https://monkemanx.github.io/attachments/smart_guy.png"
 loading="lazy"
 width=""
 height=""
 alt="Image"
 style="display: block; width: 100%; height: 100%; object-fit: contain; "
 &gt;
 
&lt;/figure&gt;

&lt;h2 id="4-objections"&gt;4. Objections&lt;/h2&gt;
&lt;p&gt;After reading all of this, you might think that idealism is more reasonable than you initially assumed. However, there are still several objections that can be raised. Perhaps there is a flaw in the argument, or perhaps you have a particular intuition that prevents you from accepting idealism.&lt;/p&gt;
&lt;p&gt;In this section, I want to address several objections that I find particularly interesting.&lt;/p&gt;
&lt;h2 id="41-why-does-idealism-initially-seem-so-ridiculous"&gt;4.1 Why Does Idealism Initially Seem So Ridiculous?&lt;/h2&gt;
&lt;p&gt;The first objection is perhaps the most obvious one: &lt;strong&gt;Why does the idea that everything is mental seem so absurd at first glance?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;If everything were truly mental, shouldn&amp;rsquo;t that idea feel much more natural to us?&lt;/p&gt;
&lt;p&gt;The first thing to note is that many ideas initially appeared ridiculous or counterintuitive but later turned out to be correct. Einstein famously rejected certain interpretations of quantum mechanics, arguing that &amp;ldquo;God does not play dice.&amp;rdquo; A famous response attributed to physicist Niels Bohr was:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&amp;ldquo;Einstein, don&amp;rsquo;t tell God what to do.&amp;rdquo;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Regardless of whether one agrees with the philosophical implications of quantum mechanics, the example illustrates a broader point: our intuitive understanding of reality is not always a reliable guide to what is true. Many scientific discoveries have challenged our everyday assumptions about the world.&lt;/p&gt;
&lt;p&gt;A related question connects back to the story from the beginning of this article. Why did the computer science professor dismiss idealism and other philosophical positions as meaningless or absurd?&lt;/p&gt;
&lt;p&gt;I want to suggest two additional explanations beyond what I have already discussed.&lt;/p&gt;
&lt;h3 id="the-problem-of-philosophical-language"&gt;The Problem of Philosophical Language&lt;/h3&gt;
&lt;p&gt;First, idealists often use words such as &lt;em&gt;spirit&lt;/em&gt;, &lt;em&gt;soul&lt;/em&gt;, &lt;em&gt;Weltgeist&lt;/em&gt;, &lt;em&gt;mind at large&lt;/em&gt;, or &lt;em&gt;world soul&lt;/em&gt;. To many modern readers, these words immediately sound mystical, religious, or unscientific.&lt;/p&gt;
&lt;p&gt;This can create an automatic rejection before the actual argument has even been considered. The terminology itself triggers associations with supernatural claims, even though many idealist philosophers use these terms in a much more technical philosophical sense.&lt;/p&gt;
&lt;p&gt;For example, when Berkeley speaks of &lt;em&gt;spirit&lt;/em&gt;, he is not necessarily referring to a religious soul in the popular sense. He is referring to an active subject of experience: something that perceives, thinks, and wills.&lt;/p&gt;
&lt;p&gt;Similarly, when Kastrup speaks of &lt;em&gt;mind at large&lt;/em&gt;, he is not necessarily claiming that the universe has human-like thoughts or emotions. Rather, he is proposing a metaphysical framework in which consciousness is fundamental.&lt;/p&gt;
&lt;p&gt;The words can therefore be misleading if they are interpreted through their everyday associations rather than their philosophical meaning.&lt;/p&gt;
&lt;h3 id="meaning-requires-a-framework"&gt;Meaning Requires a Framework&lt;/h3&gt;
&lt;p&gt;The second point is that meaning arises from a framework. Without the necessary background knowledge, a concept, action, or phenomenon can appear completely random and meaningless.&lt;/p&gt;
&lt;p&gt;Consider modern art. Many people, when first encountering certain forms of contemporary art, react by saying that anyone could have created it. A famous example is a work consisting of a banana attached to a wall with tape. Without knowledge of the artistic context, movements, and questions being explored, the artwork can appear completely arbitrary.&lt;/p&gt;
&lt;p&gt;However, once the viewer understands the framework behind the work, the history of conceptual art, the role of symbolism, and the questions the artist is engaging with, the same object can take on meaning.&lt;/p&gt;
&lt;p&gt;A similar thing happens with games. Someone unfamiliar with chess may watch two players move pieces around a board and see only random movements. A chess player, however, understands that a particular move can represent a sophisticated strategy, a sacrifice, or a decisive attack.&lt;/p&gt;
&lt;p&gt;The meaning is not contained in the isolated action itself; it emerges from the framework surrounding it.&lt;/p&gt;
&lt;p&gt;Oliver Sacks describes a similar phenomenon in &lt;em&gt;An Anthropologist on Mars&lt;/em&gt; when discussing Virgil, a man who had been blind since childhood and later regained his sight after more than fifty years. Although Virgil could physically see, his visual experiences initially lacked meaning. He did not immediately understand objects, depth, or spatial relationships because he had not spent his life learning how to interpret visual information.&lt;/p&gt;
&lt;p&gt;For example, he struggled to understand where a tree began and ended. When seeing a plane in the sky, he could not immediately understand how something could appear small while actually being far away. Skyscrapers seemed difficult to comprehend because he did not yet understand how such large structures could remain standing.&lt;/p&gt;
&lt;p&gt;What was missing was not vision itself, but the conceptual framework that gives visual experience meaning.&lt;/p&gt;
&lt;p&gt;The same applies to philosophy. Western philosophy is an ongoing conversation that began with the pre-Socratics and has continued for thousands of years. Each philosopher responds to previous thinkers, inherits their problems, and develops their ideas within an existing intellectual framework.&lt;/p&gt;
&lt;p&gt;Idealism should therefore be understood within this tradition. If we remove it from its philosophical context and encounter words such as &lt;em&gt;spirit&lt;/em&gt; or &lt;em&gt;mind&lt;/em&gt; without understanding the problems they are responding to, the position can easily appear meaningless or absurd.&lt;/p&gt;
&lt;p&gt;The initial rejection of idealism may therefore come less from the weakness of its arguments and more from encountering it without the conceptual framework necessary to understand why philosophers were attracted to it in the first place.&lt;/p&gt;
&lt;h2 id="42-why-is-physicalism-so-popular"&gt;4.2 Why Is Physicalism So Popular?&lt;/h2&gt;
&lt;p&gt;Perhaps the previous section explains why idealism can initially seem strange or even absurd. But even if we understand why we have this intuitive reaction, another question remains:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Why is physicalism the dominant worldview today?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Bernardo Kastrup offers one possible historical explanation. According to him, the rise of physicalism is connected to the historical development of modern science and the desire to separate scientific inquiry from religious authority.&lt;/p&gt;
&lt;p&gt;During the Enlightenment, thinkers attempted to establish a method of understanding nature that was independent from theological explanations. However, this created a philosophical problem: everything we directly encounter is ultimately mental.&lt;/p&gt;
&lt;p&gt;The colors we see, the sounds we hear, the textures we feel, and even our concept of an external world are all experiences within consciousness. Anything we know about the world already appears within the mind.&lt;/p&gt;
&lt;p&gt;Kastrup argues that this created a tension. Science wanted to describe a reality independent of the mind, but everything accessible to us seemed to be inseparable from experience itself.&lt;/p&gt;
&lt;p&gt;He describes this problem as follows:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Let us go back to the early Enlightenment years, when members of our budding scientific community needed to carve out some metaphysical ground different from ‘psyche,’ so to avoid persecution by the Church. They were faced with a difficult conundrum for, aside from theoretical abstractions, everything is psychic, experiential, mental, spiritual. Even our perceptions of an external world surrounding us are mental, in the sense of being constituted by experiential qualities such as colors, flavors, scents, textures, etc. Everything touched by the wand of our knowledge—even if only ever so slightly—becomes perforce mental, for our knowledge itself resides in our mind. Anything nonmental is necessarily a conceptual abstraction of our mind, the abstraction itself residing in our mind. We are always cooped up in our
own mentation. If there is anything outside it, then it must be brought inside—and thereby immediately become mental—if we are to know it in any sense of the word. Yet, the survival demand placed on the founders of the Enlightenment was precisely to escape their own mentation—for mentation is psyche, the domain of the Church—while pursuing knowledge. How to perform such a magic trick? One possibility was to appeal to second-hand knowledge: things that are known, but not directly by ourselves. Those things, despite being known, are outside our own mind and therefore objective from our perspective. They do exist—for they are known—but without being touched by the wand of our own knowledge. However, this obviously doesn’t work: known things must still exist in a mind, even if not our own mind; even if not a human mind. As such, they still fall within the scope of the psyche, the domain of the Church. Bishop Berkeley’s Subjective Idealism made this abundantly clear, in claiming that the external world exists in the mind of God.
What was needed to escape the clutches of the Church was a space outside any mind, even the mind of God. But by looking at the world harder, deeper, all we succeed in doing is extending the scope of our own mentation; and our Enlightenment heroes understood this. What was needed was to forfeit the concreteness of experience and reify, instead, some form of abstraction. The claim would be that, even though the abstraction itself was undeniably mental, it could correctly point to something outside itself, which in turn could be said to be non-mental. This non-mental space would thus fall outside the jurisdiction of the Church. And here is where those quantitative descriptions we talked about earlier suddenly came in handy, very handy indeed! The defining characteristic of the mental is its qualitative nature, i.e., what it feels like to know or be acquainted with something. If a semantic dichotomy could be created—invented, made up, conjured into existence—between qualities on the one hand, and quantities on the other, then our descriptions of reality could be said to have a non-mental character insofar as they are purely quantitative. And hence it was claimed that ‘quality = mind’ and ‘quantity = non-mind.’ Presto! This magic trick is, of course, not only entirely arbitrary and merely semantic, but also self-defeating, as quantities are just mental descriptions of the mental. Nonetheless, it is reasonable to assume that it saved the lives or livelihoods of many a scientist. To this day it remains a core part of our inherited, culture-bound intuitions: just ask yourself &amp;gt; hether you don’t find it rather logical that qualities and quantities form a real dichotomy. And so it was that the absurd notion that quantitative descriptions are fundamentally—i.e., metaphysically, ontologically—distinct from the qualitative world described became enshrined in the highest echelons of our culture. This is how magic is done: through language tricks mistaken for real facts, even—perhaps especially—by those who invent the tricks.&lt;/p&gt;
&lt;p&gt;~ Kastrup, &lt;em&gt;Analytic Idealism&lt;/em&gt;, Chapter 3&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Kastrup&amp;rsquo;s argument is that one possible solution was to create a distinction between &lt;strong&gt;qualities&lt;/strong&gt; and &lt;strong&gt;quantities&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;Qualities, such as colors, sounds, tastes, and feelings. were associated with the mind because they are subjective experiences. Quantities, such as measurements, mathematical descriptions, and physical equations, were treated as objective features of reality.&lt;/p&gt;
&lt;p&gt;This created a powerful conceptual distinction:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Quality = mental&lt;/li&gt;
&lt;li&gt;Quantity = non-mental&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;According to Kastrup, this distinction allowed science to describe a world that appeared independent of consciousness. Instead of dealing with the immediate qualities of experience, science focused on mathematical descriptions of reality.&lt;/p&gt;
&lt;p&gt;However, Kastrup argues that this separation may not represent a genuine metaphysical distinction. Quantities are still concepts that exist within consciousness. A mathematical description of reality is itself an experience occurring within the mind.&lt;/p&gt;
&lt;p&gt;Therefore, he argues that the distinction between a mental description and a non-mental reality may have been more of a conceptual tool than a discovery about the fundamental structure of reality.&lt;/p&gt;
&lt;p&gt;This interpretation is controversial, and it is not the only explanation for the success of physicalism. Many philosophers would argue that physicalism became dominant because physical explanations have repeatedly demonstrated enormous predictive and technological success.&lt;/p&gt;
&lt;p&gt;Nevertheless, Kastrup&amp;rsquo;s point highlights an important philosophical question: &lt;strong&gt;Does the success of scientific descriptions prove that the underlying reality is fundamentally non-mental, or does science simply provide an extremely effective description of appearances within experience?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Berkeley makes a similar argument regarding the development of the concept of material substance. He argues that philosophers originally introduced matter because they believed that sensible qualities, such as colors, sounds, and shapes, needed an underlying substance in which they could exist.&lt;/p&gt;
&lt;p&gt;However, once philosophers accepted that certain qualities depended on perception, Berkeley argues that there was no remaining justification for preserving matter as a separate underlying substance.&lt;/p&gt;
&lt;p&gt;He writes:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;It is worth while to reflect a little on the motives which induced men to suppose the existence of material substance; that so, having observed the gradual ceasing and expiration of those motives or reasons, we may proportionably withdraw the assent that was grounded on them.&lt;/p&gt;
&lt;p&gt;First therefore, it was thought that colour, figure, motion, and the rest of the sensible qualities or accidents did really exist without the mind; and for this reason it seemed needful to suppose some unthinking substratum or substance wherein they did exist, since they could not be conceived to exist by themselves.&lt;/p&gt;
&lt;p&gt;Afterwards, in process of time, men being convinced that colours, sounds, and the rest of the sensible secondary qualities had no existence without the mind, they stripped this substratum or material substance of those qualities, leaving only the primary ones, figure, motion, and such like, which they still conceived to exist without the mind, and consequently to stand in need of a material support.&lt;/p&gt;
&lt;p&gt;But it having been shown that none, even of these, can possibly exist otherwise than in a spirit or mind which perceives them, it follows that we have no longer any reason to suppose the being of matter. Nay, that it is utterly impossible there should be any such thing, so long as that word is taken to denote an unthinking substratum of qualities or accidents, wherein they exist without the mind.&lt;/p&gt;
&lt;p&gt;~ Berkeley, &lt;em&gt;Principles of Human Knowledge&lt;/em&gt;, §73&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Berkeley&amp;rsquo;s argument is that matter was initially introduced as a necessary explanation for perceived qualities. But if those qualities already exist within experience, then the additional concept of an unknown material substrate becomes unnecessary.&lt;/p&gt;
&lt;p&gt;In other words, Berkeley argues that philosophers added matter as a hidden foundation behind experience, but when we examine what this foundation actually consists of, we find that it becomes increasingly difficult to define.&lt;/p&gt;
&lt;p&gt;The idealist therefore asks:&lt;/p&gt;
&lt;p&gt;If everything we ever experience is already mental, and if the supposed non-mental substance behind experience cannot itself be experienced or clearly defined, why should we assume that it exists?&lt;/p&gt;
&lt;h2 id="43-are-ordinary-objects-just-ideas"&gt;4.3 Are Ordinary Objects Just Ideas?&lt;/h2&gt;
&lt;p&gt;A common objection to idealism, directly raised against Berkeley, is the following:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;If everything is mental, does this mean that ordinary objects are merely ideas in our minds? And if so, how could this possibly be compatible with science?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;If idealism is true, does that mean that the sun, mountains, trees, houses, and even our own bodies are nothing more than imaginary objects?&lt;/p&gt;
&lt;p&gt;Berkeley responds to this objection by making an important distinction. He does not claim that ordinary objects are illusions or that they exist only as arbitrary creations of our imagination. Rather, he rejects the idea that these objects are made of a separate material substance existing independently of all experience.&lt;/p&gt;
&lt;p&gt;He writes:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;(34.) First then, it will be objected that by the foregoing principles, all that is real and substantial in Nature is banished out of the world; and instead thereof a chimerical scheme of ideas takes place. All things that exist, exist only in the mind, that is, they are purely notional. What therefore becomes of the sun, moon, and stars? What must we think of houses, rivers, mountains, trees, stones; nay, even of our own bodies? Are all these but so many chimeras and illusions on the fancy?&lt;/p&gt;
&lt;p&gt;To all which, and whatever else of the same sort may be objected, I answer, that by the principles premised, we are not deprived of any one thing in Nature. Whatever we see, feel, hear, or anywise conceive or understand, remains as secure as ever, and is as real as ever. There is a rerum natura, and the distinction between realities and chimeras retains its full force. This is evident from sects. 29, 30, and 33, where we have shown what is meant by real things in opposition to chimeras, or ideas of our own framing; but then they both equally exist in the mind, and in that sense are alike ideas.&lt;/p&gt;
&lt;p&gt;(35.) I do not argue against the existence of any one thing that we can apprehend, either by sense or reflection. That the things I see with mine eyes and touch with my hands do exist, really exist, I make not the least question. The only thing whose existence we deny is that which philosophers call matter or corporeal substance. And in doing of this, there is no damage done to the rest of mankind, who, I dare say, will never miss it. The atheist indeed will want the colour of an empty name to support his impiety; and the philosophers may possibly find they have lost a great handle for trifling and disputation.&lt;/p&gt;
&lt;p&gt;~ Berkeley, &lt;em&gt;Principles of Human Knowledge&lt;/em&gt;, Part I, §34–35&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Berkeley&amp;rsquo;s response is that idealism does not remove anything from our experience. The things we see, touch, hear, and interact with remain completely real.&lt;/p&gt;
&lt;p&gt;The only thing Berkeley rejects is what philosophers call &lt;strong&gt;material substance&lt;/strong&gt;: the idea that behind our experiences there exists an entirely separate, mind-independent physical substance that somehow causes those experiences.&lt;/p&gt;
&lt;p&gt;In other words, Berkeley is not saying:&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&amp;ldquo;The tree in front of me is imaginary.&amp;rdquo;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Rather, he is saying:&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&amp;ldquo;The tree in front of me is real, but its reality does not consist in being made of an unknown material substance. Its reality consists in being an experienced object within a mental framework.&amp;rdquo;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;This distinction is crucial. There is a difference between saying that something is mental and saying that something is fictional.&lt;/p&gt;
&lt;p&gt;A dream is mental but not necessarily real in the same sense as the tree outside my window. The difference is not that one is mental and the other is not. The difference is that one is a private construction of my imagination, while the other is a stable and shared experience that does not depend on my individual will.&lt;/p&gt;
&lt;p&gt;For Berkeley, this stability is explained through God. For modern analytic idealists such as Kastrup, it is explained through a broader cosmic consciousness.&lt;/p&gt;
&lt;p&gt;Kastrup summarizes this idea:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&amp;ldquo;In other words, ‘matter’ is what mental states look like when observed from an outside perspective. And that is all there is to it, in all cases, without exception.&amp;rdquo;&lt;/p&gt;
&lt;p&gt;~ Kastrup, &lt;em&gt;Analytic Idealism&lt;/em&gt;, Chapter 6&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Put into my own words: yes, the sun, the stars, the chair you sit on, and the food you eat are mental. However, this does not mean they are imaginary or unreal.&lt;/p&gt;
&lt;p&gt;What appears to us as matter, as something external, solid, and independent, is what experience looks like when it is viewed from the outside rather than accessed through introspection.&lt;/p&gt;
&lt;p&gt;When I look at a chair, I do not experience &amp;ldquo;pure consciousness.&amp;rdquo; I experience an object with a certain shape, texture, weight, and location. From my perspective, it appears as something external to me. Idealism argues that this external appearance is still ultimately grounded in consciousness.&lt;/p&gt;
&lt;p&gt;Importantly, this does not imply that our everyday interactions with the world change.&lt;/p&gt;
&lt;p&gt;I can still sit on a chair. I can still eat food and taste it. I can still conduct experiments, make measurements, and develop scientific theories. Idealism does not deny the regularities that science studies.&lt;/p&gt;
&lt;p&gt;The distinction is not about &lt;strong&gt;how things behave&lt;/strong&gt;, but about &lt;strong&gt;what things ultimately are&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;This article is discussing metaphysics and ontology: the fundamental nature of reality. It is not claiming that we should expect different physical behavior under idealism. Metaphysics comes before science in the sense that it concerns the assumptions about what exists that make scientific inquiry possible.&lt;/p&gt;
&lt;p&gt;Therefore, idealism is not incompatible with science. In fact, an idealist can fully accept the discoveries of modern physics while simply interpreting their metaphysical meaning differently.&lt;/p&gt;
&lt;p&gt;The physical equations, measurements, and predictions remain exactly the same. The disagreement concerns what kind of reality those equations describe.&lt;/p&gt;
&lt;h2 id="44-if-everything-is-mental-why-do-things-remain-consistent-when-i-am-not-experiencing-them"&gt;4.4 If Everything Is Mental, Why Do Things Remain Consistent When I Am Not Experiencing Them?&lt;/h2&gt;
&lt;p&gt;One final objection concerns the apparent stability of the world.&lt;/p&gt;
&lt;p&gt;If everything is mental, and objects only exist as experiences, then why do things continue to exist when I am not perceiving them?&lt;/p&gt;
&lt;p&gt;For example, imagine that I light a candle in a room and then leave. When I return several hours later, the candle will have burned down. But if nobody was observing the candle during that time, what explains the fact that the candle continued to exist and change?&lt;/p&gt;
&lt;p&gt;This objection relies on a particular interpretation of idealism: the idea that reality exists only within &lt;strong&gt;my individual mind&lt;/strong&gt;. However, this is not the form of idealism defended in this article.&lt;/p&gt;
&lt;p&gt;As explained at the beginning, the position discussed here is &lt;strong&gt;cosmic idealism&lt;/strong&gt;. Cosmic idealism does not claim that the external world exists only inside my personal consciousness. Instead, it proposes that reality is grounded in a larger consciousness or mental substrate.&lt;/p&gt;
&lt;p&gt;Different philosophers have described this in different ways. Berkeley speaks of God, Hegel speaks of the Absolute or Spirit, and Kastrup uses terms such as &lt;em&gt;mind at large&lt;/em&gt;. These terms should not necessarily be understood as referring to a human-like being that thinks thoughts in the same way we do.&lt;/p&gt;
&lt;p&gt;Rather, they refer to the fundamental field of experience within which individual experiences occur.&lt;/p&gt;
&lt;p&gt;A useful analogy is the ocean and its waves.&lt;/p&gt;
&lt;p&gt;The ocean is not a separate object observing the waves from outside. Rather, the waves are patterns that exist within the ocean itself. In the same way, individual conscious experiences can be understood as particular patterns within a larger field of consciousness.&lt;/p&gt;
&lt;p&gt;From this perspective, the candle does not stop existing when I leave the room because its existence does not depend on my individual awareness of it. It continues to exist as part of the larger mental reality in which my own consciousness is embedded.&lt;/p&gt;
&lt;p&gt;Therefore, the consistency of the world is not a problem for cosmic idealism. The world is not recreated every time an individual mind observes it; rather, individual minds are participating in a larger reality that exists beyond their personal perspective.&lt;/p&gt;












&lt;figure style="display: block; margin: 0 auto; width: 80%; "&gt;
 &lt;img
 src="https://monkemanx.github.io/attachments/1675596633698.jpg"
 loading="lazy"
 width=""
 height=""
 alt="Image"
 style="display: block; width: 100%; height: 100%; object-fit: contain; "
 &gt;
 
&lt;/figure&gt;

&lt;h2 id="5-possible-advantages-of-idealism-for-other-problems"&gt;5. Possible Advantages of Idealism for Other Problems&lt;/h2&gt;
&lt;p&gt;So far, we have looked at what idealism is, arguments in favor of it, and possible objections against it. However, I want to strengthen the argument a little further by presenting some possible advantages that adopting this worldview might have.&lt;/p&gt;
&lt;p&gt;Naturally, whether these are considered advantages is subjective and depends on one&amp;rsquo;s interpretation. A consequence only counts as an advantage if one finds that consequence desirable. Nevertheless, these are interesting implications of idealism that are worth considering.&lt;/p&gt;
&lt;h3 id="51-skepticism"&gt;5.1 Skepticism&lt;/h3&gt;
&lt;p&gt;One possible advantage idealism has over competing theories such as physicalism is that it avoids a collapse into radical skepticism. Why might this be the case?&lt;/p&gt;
&lt;p&gt;Let us first examine how we typically arrive at radical skepticism within a physicalist worldview. We notice that our senses sometimes deceive us. Furthermore, we realize that we cannot provide an argument that guarantees that our senses are not always deceiving us.&lt;/p&gt;
&lt;p&gt;René Descartes famously illustrated this problem through his thought experiment of the evil demon: imagine a powerful being that systematically deceives us about everything we experience. Perhaps everything we see, hear, and feel is merely an illusion created by this demon. If this possibility cannot be ruled out, then how can we know anything about the external world?&lt;/p&gt;
&lt;p&gt;From this, Descartes arrived at the famous insight &lt;em&gt;cogito, ergo sum&lt;/em&gt; (“I think, therefore I am”). Even if everything else is an illusion, the very act of doubting proves that there must be something that is doubting. Therefore, Descartes concluded that his own existence was certain.&lt;/p&gt;
&lt;p&gt;However, Descartes did not stop there. It was not enough for him to establish that he himself existed; he also wanted to prove that the external world existed. To achieve this, he proposed an argument based on the existence of God: God exists, God is perfectly good, and therefore God would not systematically deceive us.&lt;/p&gt;
&lt;p&gt;Naturally, many philosophers reject this argument today, but the important point is that Descartes had to struggle to establish that anything beyond his own mind existed.&lt;/p&gt;
&lt;p&gt;Idealism does not face the same problem in the same way because it considers the mental to be fundamental. We have direct access to experience itself. Even if we are mistaken about the external interpretation of our experiences, we cannot be mistaken about the fact that we are experiencing something. The existence of experience does not require an additional proof; it is immediately given.&lt;/p&gt;
&lt;p&gt;Berkeley expresses this idea as follows:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Colour, figure, motion, extension and the like, considered only as so many sensations in the mind, are perfectly known, there being nothing in them which is not perceived. But if they are looked on as notes or images, referred to things or archetypes existing without the mind, then are we involved all in scepticism. We see only the appearances, and not the real qualities of things. What may be the extension, figure, or motion of anything really and absolutely, or in itself, it is impossible for us to know, but only the proportion or the relation they bear to our senses. Things remaining the same, our ideas vary, and which of them, or even whether any of them at all represent the true quality really existing in the thing, it is out of our reach to determine. So that, for aught we know, all we see, hear, and feel, may be only phantom and vain chimera, and not at all agree with the real things, existing in rerum natura. All this scepticism follows, from our supposing a difference between things and ideas, and that the former have a subsistence without the mind, or unperceived.&lt;/p&gt;
&lt;p&gt;~ Berkeley, &lt;em&gt;Principles of Human Knowledge&lt;/em&gt;, §87&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Berkeley&amp;rsquo;s argument is that skepticism arises specifically because we assume there is a distinction between our experiences and a separate external reality that exists independently of them. If we believe that our perceptions are merely representations of something hidden behind experience, then we can always ask whether those representations accurately correspond to the hidden reality.&lt;/p&gt;
&lt;p&gt;Idealism removes this gap. The experienced world is not a copy of something completely separate from experience; rather, experience itself is the fundamental reality.&lt;/p&gt;
&lt;h3 id="52-the-existence-of-god"&gt;5.2 The Existence of God&lt;/h3&gt;
&lt;p&gt;For Christians and other religious traditions that face uncertainty about the existence of God, idealism can offer a possible foundation for a spiritual worldview.&lt;/p&gt;
&lt;p&gt;The cosmic mind, whether called the &lt;em&gt;Weltgeist&lt;/em&gt;, &lt;em&gt;Weltseele&lt;/em&gt;, &amp;ldquo;mind at large,&amp;rdquo; or something else, can be identified with God. This is the position taken by Berkeley, who is a cosmic idealist: he argues that the cosmic entity in which all mental, spiritual, and experiential states exist is the Christian God.&lt;/p&gt;
&lt;p&gt;Of course, idealism does not prove the existence of God. Rather, it provides a metaphysical framework in which the existence of a divine mind is more natural than in a purely materialist worldview.&lt;/p&gt;
&lt;h3 id="53-less-cosmic-worship-or-more-worship"&gt;5.3 Less Cosmic Worship or More Worship?&lt;/h3&gt;
&lt;p&gt;Berkeley proposes the following argument against the worship of natural objects:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;The existence of matter, or bodies unperceived, has not only been the main support of atheists and fatalists, but on the same principle doth idolatry likewise in all its various forms depend. Did men but consider that the sun, moon, and stars, and every other object of the senses, are only so many sensations in their minds, which have no other existence but barely being perceived, doubtless they would never fall down, and worship their own ideas, but rather address their homage to that eternal invisible Mind which produces and sustains all things.&lt;/p&gt;
&lt;p&gt;~ Berkeley, &lt;em&gt;Principles of Human Knowledge&lt;/em&gt;, §94&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Berkeley argues that if people understood that objects such as the sun, moon, and stars are not independent material substances but rather experiences sustained by a greater mind, then they would not worship these objects themselves. Instead, they would direct their worship toward the eternal mind responsible for sustaining them.&lt;/p&gt;
&lt;p&gt;However, one could also interpret this differently. Since the sun and stars are still expressions within the cosmic mind, they could be understood as manifestations or &amp;ldquo;avatars&amp;rdquo; of this greater mind, similar to certain interpretations found in Hinduism. Nevertheless, under idealism, the sun and stars would not have a fundamentally privileged status compared to a chair, a banana, or any other object. They are all expressions of the same underlying reality.&lt;/p&gt;
&lt;h3 id="54-easier-christian-resurrection"&gt;5.4 Easier Christian Resurrection&lt;/h3&gt;
&lt;p&gt;Berkeley proposes another consequence of idealism regarding the Christian doctrine of resurrection:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;The same absurd principle, by mingling itself with the articles of our faith, hath occasioned no small difficulties to Christians. For example, about the resurrection, how many scruples and objections have been raised by Socinians and others? But do not the most plausible of them depend on the supposition, that a body is denominated the same, with regard not to the form or that which is perceived by sense, but the material substance which remains the same under several forms? Take away this material substance, about the identity whereof all the dispute is, and mean by body what every plain ordinary person means by that word, to wit, that which is immediately seen and felt, which is only a combination of sensible qualities, or ideas: and then their most unanswerable objections come to nothing.&lt;/p&gt;
&lt;p&gt;~ Berkeley, &lt;em&gt;Principles of Human Knowledge&lt;/em&gt;, §95&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;I will not comment further on this argument, but it may be an interesting implication for Christian philosophers.&lt;/p&gt;
&lt;h3 id="55-theory-of-time"&gt;5.5 Theory of Time&lt;/h3&gt;
&lt;p&gt;One final possible advantage concerns the philosophical problem of time. The nature of time is an extremely complex topic in philosophy. A famous distinction is between A-theory and B-theory of time.&lt;/p&gt;
&lt;p&gt;Very roughly, A-theory views time as having an objective flow: the present moment is fundamentally different from the past and the future. B-theory, in contrast, views time as a static structure where past, present, and future events all exist equally, and the feeling of temporal flow is a feature of consciousness rather than reality itself.&lt;/p&gt;
&lt;p&gt;These two views create difficult philosophical problems, and I will not go into detail here. For anyone interested, McTaggart&amp;rsquo;s argument for the unreality of time is a famous starting point.&lt;/p&gt;
&lt;p&gt;One possible solution is eternalism: the view that all moments of time exist equally. Under eternalism, the universe can be understood as a four-dimensional structure in which past, present, and future events all exist.&lt;/p&gt;
&lt;p&gt;Eternalism fits naturally with idealism because time itself can be understood as a feature of experience rather than a fundamental property of reality.&lt;/p&gt;
&lt;p&gt;Kastrup gives an interesting example to illustrate this point. As a child, he observed his father playing chess against himself, a common training technique before computerized chess engines. His father would make a move with the white pieces, rotate the board by 180 degrees, then make a move with the black pieces.&lt;/p&gt;
&lt;p&gt;The interesting question is: what would happen if we could alter his perception of time so that all experiences from the white side were connected into one continuous stream, while all experiences from the black side were connected into another? His father would then have a continuous memory of playing one game as white and another game as black, believing that two different players had participated.&lt;/p&gt;
&lt;p&gt;From the perspective of each stream of experience, the other side of the game would appear to belong to another person. The fact that both perspectives belong to the same person would not be directly accessible from within either perspective.&lt;/p&gt;
&lt;p&gt;Kastrup describes a similar phenomenon from his own experience with anesthesia:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;A few years ago, I had to undergo a simple, short, but very painful medical procedure. So instead of pumping me full of opioids, the doctors decided to give me a fairly small dose of a general anesthetic, which would knock me out for about 15 minutes. I figured that this would be a fantastic opportunity for an experiment: I would try to focus my attention introspectively and fight the effects of the drug for as long as I could, so to observe the subjective effects of the anesthetic. [&amp;hellip;]&lt;/p&gt;
&lt;p&gt;The drug had altered my perception of time in a very specific and surprising way. If we visualize subjective time as a string from where particular experiences—or, rather, the memories thereof—hang in sequence, the drug had not only distorted or eliminated access to some of those memories, but also cut off a segment of the string and tied the two resulting ends together, so as to produce the impression that the string was still continuous and uninterrupted.&lt;/p&gt;
&lt;p&gt;~ Kastrup, &lt;em&gt;Analytic Idealism&lt;/em&gt;, Chapter 8&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;The point Kastrup draws from this is that subjective time is not necessarily a direct reflection of an external physical timeline. Our experience of time can be manipulated without leaving any noticeable trace from within consciousness itself.&lt;/p&gt;
&lt;p&gt;Under analytic idealism, this is expected: the physical world is not the fundamental reality but rather the representation of reality from a particular perspective. Therefore, space and time themselves are features of the perceptual interface rather than fundamental properties of existence.&lt;/p&gt;
&lt;h2 id="6-why-i-believe-the-argument-does-not-quite-go-through"&gt;6. Why I believe the argument does not quite go through&lt;/h2&gt;
&lt;p&gt;One of the strongest arguments in favour of idealism concerns epistemology. The argument begins with an apparent asymmetry: our knowledge of the external world is always mediated through our senses, and we know from experience that our senses can deceive us. In contrast, our knowledge of our own mind appears to be direct and immediate. I do not discover my thoughts, emotions, and experiences through observation in the same way that I discover external objects; they seem to be given to me directly. From this, thinkers such as Schopenhauer, Bernardo Kastrup, and Philip Goff argue that consciousness occupies a privileged epistemological position and therefore should be regarded as fundamental.&lt;/p&gt;
&lt;p&gt;However, I am somewhat suspicious of the assumption that we have completely direct access to our own mind. This assumption seems to rely on a traditional picture of the mind as a unified inner observer that simply receives and observes its own contents. Modern cognitive science gives us reasons to doubt this picture.&lt;/p&gt;
&lt;p&gt;For example, in &lt;em&gt;Why Buddhism Is True&lt;/em&gt;, Robert Wright discusses the idea that the mind is not a single unified entity but rather a collection of different cognitive systems, each with its own goals, desires, and evolutionary functions. One system may be responsible for seeking social status, another for hunger, another for reproduction, another for avoiding danger, and so on. These different systems can compete with each other, and what we experience as a unified self may actually be the result of many interacting processes.&lt;/p&gt;
&lt;p&gt;If this picture is correct, then we must ask: what exactly is the thing that supposedly has direct access to the mind? If the mind itself is composed of many different processes, then the relationship between the observer and the observed becomes much less straightforward. Perhaps there is no single inner subject that simply perceives mental states, but rather a complex system continuously constructing an interpretation of itself.&lt;/p&gt;
&lt;p&gt;A related example comes from split-brain experiments. In these experiments, researchers found that when the two hemispheres of the brain are separated, one hemisphere can initiate an action while the speaking hemisphere, which lacks access to the true cause of the action, often produces a plausible explanation afterwards. Rather than admitting ignorance, the mind appears to generate a coherent narrative explaining behaviour that was not actually consciously initiated by that part of the brain.&lt;/p&gt;
&lt;p&gt;One possible interpretation of this is that the ego functions partly as a kind of “public relations system.” Humans are social creatures, and in a social environment it is valuable to be able to explain and justify our actions. A person whose behaviour appears completely random is difficult to trust because their future actions become unpredictable. A coherent self-narrative therefore has an important social function: it allows both ourselves and others to understand our behaviour within a framework of reasons, goals, and values.&lt;/p&gt;
&lt;p&gt;This raises a problem for the epistemological argument from idealism. If our own mental life is not simply transparent to ourselves, but is instead constantly interpreted and reconstructed by different cognitive systems, then the contrast between “direct knowledge of the mind” and “indirect knowledge of the external world” becomes less clear.&lt;/p&gt;
&lt;p&gt;Consider a simple example: imagining a triangle. It may seem that there is a single subject that directly observes the mental image of the triangle. However, from the perspective of cognitive science, this experience may instead arise from the interaction of many different neural processes responsible for memory, visual imagination, attention, language, and interpretation. The experience feels immediate, but the mechanisms producing it are highly complex and hidden from introspection.&lt;/p&gt;
&lt;p&gt;We can observe something similar in everyday perception. The meaning and significance of an object can change depending on our emotional state, memories, expectations, or current goals. A person we perceive as threatening in one context may appear harmless in another. A place associated with painful memories may feel completely different from the same place experienced under different circumstances. Our experience of the world is therefore not merely a passive reception of reality, but an active process of construction and interpretation.&lt;/p&gt;
&lt;p&gt;This does not prove physicalism. The fact that consciousness depends on complex cognitive processes does not automatically show that consciousness is reducible to matter. The hard problem of consciousness remains: explaining why physical processes should give rise to subjective experience at all. However, modern cognitive science does challenge a simpler form of idealist reasoning that assumes consciousness is immediately and transparently accessible to itself.&lt;/p&gt;
&lt;p&gt;The more we understand about the mind, the less plausible the traditional image of a unified inner observer becomes. Instead, we find a dynamic system of interacting processes that continuously construct our experience of ourselves and the world. Therefore, while idealism may still provide a possible metaphysical framework, the epistemological argument based on privileged access to the mind may not be as decisive as it first appears.&lt;/p&gt;
&lt;h2 id="7-why-the-question-is-not-so-important"&gt;7. Why the question is not so important&lt;/h2&gt;
&lt;p&gt;In the end, I do not think the question of idealism versus physicalism matters as much as people often assume. Metaphysical positions can have certain consequences or provide different ways of interpreting reality, but most of these consequences are not, in my view, significant enough to justify treating metaphysical debates as the central questions of human existence.&lt;/p&gt;
&lt;p&gt;Furthermore, there is a fundamental difficulty in doing metaphysics: our language evolved to describe everyday human experiences within the world, not to describe the ultimate structure of reality. When we attempt to talk about something beyond our ordinary categories, we inevitably run into problems. Our concepts may simply not be adequate for describing whatever reality ultimately is. In addition to this limitation of language, there are also limitations inherent in human cognition itself. Just as a dog cannot understand calculus because of the limits of its cognitive architecture, there may be aspects of reality that humans are simply not equipped to fully comprehend.&lt;/p&gt;
&lt;p&gt;However, the most important point is a practical one. Regardless of whether idealism, physicalism, dualism, or another metaphysical theory is correct, most people ultimately want similar things: to be happy, to reduce suffering, to live meaningful lives, and to understand how they should act. For these goals, practical wisdom and psychological insight seem far more important than theoretical speculation about the fundamental nature of reality.&lt;/p&gt;
&lt;p&gt;This might seem contradictory, given that most articles on this website are theoretical in nature. However, I see these philosophical investigations as a foundation. I have several more theoretical articles planned, because I want to complete this philosophical framework, but the purpose of such a framework is ultimately practical. Philosophy should not merely be an intellectual exercise; it should influence how we understand ourselves and how we live.&lt;/p&gt;
&lt;p&gt;I am also not particularly emotionally invested in the idealism versus physicalism debate. I am certainly more interested in it than the average person, simply because I have spent a lot of time studying it, but I do not have a strong attachment to either side. If tomorrow convincing evidence showed that physicalism was correct, or that idealism was correct, I would not feel personally threatened by either conclusion. The original motivation for writing this article was not a desire to defend idealism at all costs, but rather a reaction to the arrogance of the professor mentioned at the beginning of the article: his complete certainty about his worldview, his lack of doubt, and his dismissive attitude towards philosophical questions that he did not understand.&lt;/p&gt;
&lt;p&gt;A story from Buddhism illustrates this attitude well:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;It&amp;rsquo;s just as if a man were wounded with an arrow thickly smeared with poison. His friends &amp;amp; companions, kinsmen &amp;amp; relatives would provide him with a surgeon, and the man would say, &amp;lsquo;I won&amp;rsquo;t have this arrow removed until I know whether the man who wounded me was a noble warrior, a priest, a merchant, or a worker.&amp;rsquo; He would say, &amp;lsquo;I won&amp;rsquo;t have this arrow removed until I know the given name &amp;amp; clan name of the man who wounded me&amp;hellip; until I know whether he was tall, medium, or short&amp;hellip; until I know whether he was dark, ruddy-brown, or golden-colored&amp;hellip; until I know his home village, town, or city&amp;hellip; until I know whether the bow with which I was wounded was a long bow or a crossbow&amp;hellip; until I know whether the bowstring with which I was wounded was fiber, bamboo threads, sinew, hemp, or bark&amp;hellip; until I know whether the shaft with which I was wounded was wild or cultivated&amp;hellip; until I know whether the feathers of the shaft with which I was wounded were those of a vulture, a stork, a hawk, a peacock, or another bird&amp;hellip; until I know whether the shaft with which I was wounded was bound with the sinew of an ox, a water buffalo, a langur, or a monkey.&amp;rsquo; He would say, &amp;lsquo;I won&amp;rsquo;t have this arrow removed until I know whether the shaft with which I was wounded was that of a common arrow, a curved arrow, a barbed, a calf-toothed, or an oleander arrow.&amp;rsquo; The man would die and those things would still remain unknown to him.[1]&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;The point of this story is not that questions about reality are meaningless. Rather, it is a warning that intellectual curiosity can become a distraction when it replaces attention to the problems immediately in front of us. Understanding the ultimate nature of reality may be interesting, but it does not automatically make us wiser, kinder, or happier.&lt;/p&gt;
&lt;p&gt;If one nevertheless feels the need for a metaphysical framework, one possibility I find particularly interesting is process philosophy, especially the work of Alfred North Whitehead. Process philosophy begins with a simple observation: everything we encounter is constantly changing. Nothing in experience appears to be a completely static, unchanging substance. From this starting point, Whitehead develops a metaphysics in which processes, events, and relations are more fundamental than permanent objects.&lt;/p&gt;
&lt;p&gt;Compared with traditional substance-based metaphysics, this approach seems intuitively closer to the reality we actually experience. The world does not appear to us as a collection of fixed things that occasionally undergo change; rather, it appears as an ongoing process of becoming. Whether process philosophy is ultimately correct is another question, but it offers a valuable perspective: perhaps reality is not something made of things that change, but something fundamentally composed of change itself.&lt;/p&gt;
&lt;p&gt;Perhaps the most important philosophical lesson is not discovering the final substance behind reality, but recognizing the limits of our certainty and remaining open to the possibility that reality is stranger than our intuitions suggest.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="resources"&gt;Resources&lt;/h2&gt;
&lt;h3 id="books"&gt;Books&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;René Descartes — &lt;em&gt;Meditations on First Philosophy&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;Bernardo Kastrup — &lt;em&gt;Analytic Idealism&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;George Berkeley — &lt;em&gt;A Treatise Concerning the Principles of Human Knowledge&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;Robert Wright — &lt;em&gt;Why Buddhism Is True&lt;/em&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="papers"&gt;Papers&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;David Chapman — &lt;em&gt;Idealism and the Mind-Body Problem&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;Thomas Nagel — &lt;em&gt;What Is It Like to Be a Bat?&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;J. E. McTaggart — &lt;em&gt;The Unreality of Time&lt;/em&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="talks"&gt;Talks&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Philip Goff — &lt;em&gt;Why I Am a Heretical Christian&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;Bernardo Kastrup — &lt;em&gt;Why Materialism Is Complete Nonsense&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;Keith Frankish — &lt;em&gt;Could Consciousness Be an Illusion?&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;Sam Harris — &lt;em&gt;Spirituality for Atheists&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;Swami Sarvapriyananda — &lt;em&gt;Hinduism, Consciousness and Advaita Vedanta&lt;/em&gt;&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>Existence Before Essence: What the Slogan Actually Means</title><link>https://monkemanx.github.io/articles/existence_before_essence/</link><pubDate>Thu, 02 Jul 2026 16:00:00 +0000</pubDate><author>monkeman@cock.li (MonkeMan)</author><guid>https://monkemanx.github.io/articles/existence_before_essence/</guid><description>&lt;h2 id="1-introduction"&gt;1. Introduction&lt;/h2&gt;
&lt;p&gt;&amp;ldquo;Existence is prior to essence&amp;rdquo; is a common slogan of existentialists&lt;sup id="fnref:1"&gt;&lt;a href="#fn:1" class="footnote-ref" role="doc-noteref"&gt;1&lt;/a&gt;&lt;/sup&gt;. What it means differs from philosopher to philosopher, but I want to try to give one interpretation of this frame and to show why getting clear on it resolves a deeper confusion running through much of my own recent writing.&lt;/p&gt;
&lt;p&gt;In my last few articles, I identified various problems with contemporary analytic philosophical debate. I think I was correct in identifying these problems, but I now think I was identifying symptoms rather than the root cause or at best, second-order causes. What I want to do here is push deeper.&lt;/p&gt;
&lt;h2 id="2-what-i-got-right-the-symptoms"&gt;2. What I Got Right: The Symptoms&lt;/h2&gt;
&lt;p&gt;In &lt;a href="https://monkemanx.github.io/articles/on_language_and_definitions/"&gt;&lt;em&gt;On Language and Definitions&lt;/em&gt;&lt;/a&gt;, I argued that philosophical debates about &amp;ldquo;what is&amp;rdquo; questions go wrong because we try to systematize something that cannot be fully systematized. Meaning, I claimed, arises from a loose set of associations, not from strict rules. We build elaborate theories around single intuitions, ignoring the messiness of how words actually work. I identified the cause as language itself.&lt;/p&gt;
&lt;p&gt;In &lt;a href="https://monkemanx.github.io/articles/where_the_eiffel_tower_is_is_not_obejctive/"&gt;&lt;em&gt;The Eiffel Tower is NOT in Paris!&lt;/em&gt;&lt;/a&gt;, I argued that even seemingly objective statements like &amp;ldquo;The Eiffel Tower is in Paris&amp;rdquo; contain elements of subjectivity, in how they are expressed, how they are interpreted, and even in the underlying spatial concepts that depend on &lt;em&gt;Dasein&lt;/em&gt; for their meaning.&lt;/p&gt;
&lt;p&gt;In &lt;a href="https://monkemanx.github.io/articles/against_essentialism/"&gt;&lt;em&gt;Stop Asking What Things Are&lt;/em&gt;&lt;/a&gt;, I rejected essentialism entirely. I argued that concepts do not have an inner essence waiting to be discovered, and that papers like &lt;em&gt;On Bullshit&lt;/em&gt; or &lt;em&gt;Is Justified True Belief Knowledge?&lt;/em&gt; proceed as if there were a single thing called &amp;ldquo;bullshit&amp;rdquo; or &amp;ldquo;knowledge&amp;rdquo; whose ultimate nature we could uncover. I called myself a non-essentialist.&lt;/p&gt;
&lt;p&gt;In &lt;a href="https://monkemanx.github.io/articles/argument_for_veganism/"&gt;&lt;em&gt;An Argument for Veganism and an Argument for Amoralism&lt;/em&gt;&lt;/a&gt;, I traced the problem with morality to normative force: morality binds us only as strongly as we desire it to. We can opt out. The authority of morality depends on a desire that can be changed.&lt;/p&gt;
&lt;p&gt;All of these analyses are, I think, not wrong. But they are incomplete. They identify mechanisms: language, subjectivity, anti-essentialism and desire, without identifying what drives the whole machine.&lt;/p&gt;
&lt;h2 id="3-what-i-missed-the-root-cause"&gt;3. What I Missed: The Root Cause&lt;/h2&gt;
&lt;p&gt;Here is what I now think is actually going on.&lt;/p&gt;
&lt;p&gt;The problem is not that things lack essence or meaning. In fact, we rely on essence and meaning constantly. Without them, value judgments, conversation, and much more would become impossible. The problem is that we have the direction of dependence backwards.&lt;/p&gt;
&lt;p&gt;We assume that &lt;strong&gt;essence comes before existence&lt;/strong&gt;. Here is how this assumption plays out: we see particular objects in the world, different trees, for instance, and we develop a word to refer to this collection of particulars: &amp;ldquo;tree.&amp;rdquo; Then we start arguing over what constitutes &amp;ldquo;treeness,&amp;rdquo; or what makes a tree a tree. We behave as if there is some thing (call it a Platonic idea, though the mechanism is broader than that) and the many particular trees are merely instances of it, or constitute it in some way. We then try, through investigation of these particulars, to discover what this essence &lt;em&gt;really is&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;This is the mistake that runs through all of the problems I identified earlier. It is, to borrow a phrase from &lt;a href="https://en.wikipedia.org/wiki/Max_Stirner"&gt;Max Stirner&lt;/a&gt;, a &lt;em&gt;spook&lt;/em&gt;, a mental abstraction that has taken on a life of its own and now haunts us.&lt;/p&gt;
&lt;p&gt;Consider the seminar on Augustine I am currently participating in. The topic of grace came up, and the group was asked to characterize grace. To answer the question &amp;ldquo;What is grace?&amp;rdquo; Various answers were given. Some said the definition involves someone more powerful than you granting something that is not societal expected. Then the argument turned on whether grace necessarily involves some kind of moral wrongdoing on the part of the recipient. One side argued it did; the other argued it did not.&lt;/p&gt;
&lt;p&gt;From my perspective, the whole argument was going wrong from the start. It is not that we &lt;em&gt;cannot&lt;/em&gt; give an account of the essence of grace, we can, we humans are perfectly capable of creating definitions. The problem is that there is not, and will never be, a definition that is completely objective and universal. Not because our language is imprecise, not because we are bad at thinking, but because the meaning of grace is subject to constant negotiation. It changes over time, across cultural periods, and between communities. The essence of the word is not fixed, it is being created and recreated as we speak.&lt;/p&gt;
&lt;h2 id="4-existence-before-essence-a-creation-story-of-meaning"&gt;4. Existence Before Essence: A Creation Story of Meaning&lt;/h2&gt;
&lt;p&gt;So what should we think instead?&lt;/p&gt;
&lt;p&gt;The other way around. The particulars are primary. We, to use a Heideggerian term, are thrown &lt;a href="https://en.wikipedia.org/wiki/Thrownness"&gt;into this world&lt;/a&gt;, condemned to being-in-the-world. We see many particular things and we ask ourselves: what do they have in common? What value do they have? What meaning is behind them? And because there was none, we &lt;em&gt;created&lt;/em&gt; the meaning to make sense of the world.&lt;/p&gt;
&lt;p&gt;If I were to tell a small creation story of meaning, it would go something like this:&lt;/p&gt;
&lt;p&gt;First, there was the world. Then came the human, thrown into it. These humans saw many particular things and asked themselves what they had in common, what value they had, what meaning lay behind them. And because there was none, they created meaning to make sense of their world.&lt;/p&gt;
&lt;p&gt;Essence, in other words, comes after existence. We create the ideas: the Platonic ideas, the universals, the essences of things. They do not pre-exist us.&lt;/p&gt;
&lt;h2 id="5-working-through-the-examples"&gt;5. Working Through the Examples&lt;/h2&gt;
&lt;h3 id="51-morality"&gt;5.1 Morality&lt;/h3&gt;
&lt;p&gt;In my amoralism article, I argued that morality&amp;rsquo;s normative force depends on our desire to be moral, and that this desire can be changed. I said that if the desire disappears, we effectively opt out of the system of morality.&lt;/p&gt;
&lt;p&gt;But that analysis, while not incorrect, identified the symptom rather than the underlying cause. What is actually happening when moral talk seems confused or goes nowhere is not that we &lt;em&gt;can&lt;/em&gt; opt out of morality. It is that morality is a human invention: a way we, as humans, decided to make sense of actions around us.&lt;/p&gt;
&lt;p&gt;We saw humans acting in ways we did not understand, being cruel, for instance, in the natural world. The human mind started wondering: what is the meaning behind this action? Why is this happening? In order to understand, we created a system of rules and forced people to comply with it. Through this, the actions of others now made sense again: there are actions that are moral and actions that are immoral. Why is this person being cruel? Because he is doing something immoral, and thus he is evil.&lt;/p&gt;
&lt;p&gt;The system of morality was created to provide meaning, to understand the actions of others, but also to push human action inside the system.&lt;/p&gt;
&lt;p&gt;This connects directly to what I have been reading in &lt;em&gt;Active Inference: The Free Energy Principle in Mind, Brain, and Behavior&lt;/em&gt;&lt;sup id="fnref:2"&gt;&lt;a href="#fn:2" class="footnote-ref" role="doc-noteref"&gt;2&lt;/a&gt;&lt;/sup&gt;:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Active Inference is a normative framework to characterize Bayes-optimal behavior and cognition in living organisms. Its normative character is evinced in the idea that all facets of behavior and cognition in living organisms follow a unique imperative: minimizing the surprise of their sensory observations.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;And:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Instead, a fundamental insight of Active Inference is that both perception and action serve the very same objective. As a first approximation, this common objective of perception and action can be formulated as a minimization of the discrepancy between the model and the world.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;We see humans acting in ways we do not understand, being cruel, or what we now call immoral. We want to minimize the surprise in our world model, the discrepancy between what we expect and what we observe. We do this in the two ways Active Inference describes: we change our mind (perception) and we change the world (action). The invention of the story of good and evil is a change of mind, we now &lt;em&gt;understand&lt;/em&gt; the cruel action, it fits in our model. And the enforcement of moral rules on others is a change of the world, we push people toward compliance.&lt;/p&gt;
&lt;h3 id="52-the-eiffel-tower-and-language"&gt;5.2 The Eiffel Tower and Language&lt;/h3&gt;
&lt;p&gt;In my article on the Eiffel Tower, I argued that the sentence is not purely objective because language and spatial concepts are grounded in &lt;em&gt;Dasein&lt;/em&gt;. And in &lt;em&gt;Stop Asking What Things Are&lt;/em&gt;, I argued that essentialism is the problem. But these too are symptoms.&lt;/p&gt;
&lt;p&gt;The deeper issue is that we assume there is a fixed referent, &amp;ldquo;Paris,&amp;rdquo; &amp;ldquo;the Eiffel Tower,&amp;rdquo; &amp;ldquo;morality&amp;rdquo;, some stable essence of the thing that the word points to. We then treat philosophical disagreement as a disagreement &lt;em&gt;about&lt;/em&gt; this pre-existing essence. But there &lt;em&gt;is&lt;/em&gt; no pre-existing essence. There is only the ongoing process of creating and negotiating meaning.&lt;/p&gt;
&lt;h3 id="53-negotiation-of-meaning"&gt;5.3 Negotiation of Meaning&lt;/h3&gt;
&lt;p&gt;As argued in the paper &lt;a href="https://monkemanx.github.io/articles/paper-summary/disagreements_semantics_of_normative_terms/"&gt;&lt;em&gt;Disagreement and the Semantics of Normative and Evaluative Terms&lt;/em&gt;&lt;/a&gt;, a constant process of negotiation occurs whenever we use evaluative language. But this is not limited to values, it applies to &lt;em&gt;all&lt;/em&gt; essences. Every time we use a term like &amp;ldquo;tree,&amp;rdquo; &amp;ldquo;grace,&amp;rdquo; &amp;ldquo;morality,&amp;rdquo; or &amp;ldquo;Paris,&amp;rdquo; we participate in the creation and modification of its essence.&lt;/p&gt;
&lt;p&gt;Consider: someone points to a shrub and calls it a tree. Someone else says: &amp;ldquo;No, that is not a tree, you are wrong.&amp;rdquo; What is happening here is not that there is some essence of &amp;ldquo;treeness&amp;rdquo; and one person is right while the other is wrong. Rather, they are negotiating what the term means. They are in the process of creating meaning.&lt;/p&gt;
&lt;p&gt;And this process has no endpoint. Essences are not fixed, they are constantly being renegotiated through use, through disagreement, through cultural change.&lt;/p&gt;
&lt;h2 id="6-conclusion"&gt;6. Conclusion&lt;/h2&gt;
&lt;p&gt;So where does this leave us?&lt;/p&gt;
&lt;p&gt;The slogan &amp;ldquo;existence is prior to essence&amp;rdquo; is not just a metaphysical claim. It is a methodological one. It tells us that when we encounter philosophical confusion, whether about morality, language, knowledge, or grace, we should not ask &amp;ldquo;What is the true essence of X?&amp;rdquo; We should instead ask: &amp;ldquo;How did the concept of X arise? What work is it doing? How is it being negotiated?&amp;rdquo;&lt;/p&gt;
&lt;p&gt;The problems I identified in my earlier articles, the imprecision of language, the subjectivity of seemingly objective statements, the contingency of moral authority, are real. But they are downstream of a more fundamental error: the assumption that essence precedes existence, that there is something &lt;em&gt;there&lt;/em&gt; to be discovered rather than something &lt;em&gt;being created&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;Once we flip the direction, the picture changes. The word comes after the thing. The essence comes after the particular. Meaning comes after the human. And if we keep this in mind, we might stop arguing about what things &lt;em&gt;really are&lt;/em&gt;, and start paying attention to the much more interesting question: how do we participate in shaping the world we inhabit?&lt;/p&gt;


&lt;figure style="display: flex; justify-content: center; gap: 10px;" height="387px"&gt;
 &lt;img loading="lazy" style="width: 50%;" src="https://monkemanx.github.io/attachments/how_i_sleep_knowing_nothing.png"&gt;
 &lt;img loading="lazy" style="width: 50%;" src="https://monkemanx.github.io/attachments/1686746093002311.jpg"&gt;
&lt;/figure&gt;


&lt;div class="footnotes" role="doc-endnotes"&gt;
&lt;hr&gt;
&lt;ol&gt;
&lt;li id="fn:1"&gt;
&lt;p&gt;Gordon R. Lewis. &amp;ldquo;Augustine and Existentialism.&amp;rdquo; &lt;em&gt;Journal of the Evangelical Theological Society&lt;/em&gt;, vol. 8, no. 1, 1965, pp. 13–22.&amp;#160;&lt;a href="#fnref:1" class="footnote-backref" role="doc-backlink"&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li id="fn:2"&gt;
&lt;p&gt;Thomas Parr, Giovanni Pezzulo, Karl J. Friston. &lt;em&gt;Active Inference: The Free Energy Principle in Mind, Brain, and Behavior&lt;/em&gt;. The MIT Press, 2022.&amp;#160;&lt;a href="#fnref:2" class="footnote-backref" role="doc-backlink"&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;</description></item><item><title>On Language and Definitions</title><link>https://monkemanx.github.io/articles/on_language_and_definitions/</link><pubDate>Fri, 01 May 2026 10:00:00 +0000</pubDate><author>monkeman@cock.li (MonkeMan)</author><guid>https://monkemanx.github.io/articles/on_language_and_definitions/</guid><description>&lt;h2 id="0-introduction"&gt;0. Introduction&lt;/h2&gt;
&lt;p&gt;Language is a fundamental part of human nature. Some would even say it is what differentiates us from animals. We use it every day: whether through reading, hearing, or speaking. We use it to create beautiful art such as stories and music, but it can also be used in destructive ways, to hurt or to demean.&lt;/p&gt;
&lt;p&gt;Yet, even though it is so important, we understand very little about it and often make very basic mistakes when using it. In this article, I want to focus on one of these mistakes, show how it can happen, why it happens, and how we can avoid it in the future.&lt;/p&gt;
&lt;h2 id="1-shared-meaning"&gt;1. Shared Meaning&lt;/h2&gt;
&lt;p&gt;But in order to do that, we first need to understand certain things about language. First and foremost: what is the goal of language, and how can we achieve this goal? The goal of language, to put it plainly, is to communicate with each other. For this communication to be possible, it is essential that we share meanings for words. This means that when I speak a certain word, I evoke in you roughly the same images as the ones I have in my head; otherwise, communication becomes impossible.&lt;/p&gt;
&lt;p&gt;For example, if I say, “Can you buy an apple for me?” and what I understand by “apple” is a round fruit that is red, slightly sour but also sweet, while the other person understands it as a yellow, sweet, long, and curved fruit (commonly known as a banana), then they will buy that fruit for me. I will be surprised and will not have what I wanted, communication has failed. The shared meaning we have for words is exactly what allows us to avoid this failure.&lt;/p&gt;
&lt;p&gt;But with that, the question becomes: how does this shared meaning develop? How can we be sure that it develops properly and that our understanding of words does not diverge?&lt;/p&gt;
&lt;p&gt;In practice, this shared meaning is already embedded in society, and as we grow up, it is slowly passed on to us. In this way, we become part of a web of shared meaning. This may still sound abstract, so how does this actually work?&lt;/p&gt;
&lt;p&gt;As we grow, from toddlers, to children, to teenagers, to adults, we are constantly exposed to language. Whether through our parents speaking to us as toddlers, reading children’s books when we are young, or later through newspapers and everyday communication, the same process is always happening. Words appear in certain contexts, and initially we have no idea what they mean. But over time, as a word is repeated again and again in similar contexts, for example, the word “apple” appearing whenever a red, round fruit is present, we develop associations with that word.&lt;/p&gt;
&lt;p&gt;These associations are roughly similar within a culture because we acquire them from our parents and the media. As we grow up, we participate in this shared web of meaning by communicating and by using words when the same associations arise. So the reason we have shared meaning is that we associate certain things with words, and these associations are, within a society, relatively homogeneous.&lt;/p&gt;
&lt;p&gt;However, these associations are not universal; they differ from society to society. Each society has a slightly different understanding of words. This does not mean we cannot communicate across societies, we can use translation to map words from one language to another, but this translation will always be imperfect. Because of differences in history and culture, different societies associate different things with what may seem like the same concept.&lt;/p&gt;
&lt;p&gt;To make this more concrete, consider the English word “home” and its German counterpart “Heimat.” Although they appear to have the same meaning, there are important differences. Because Germany was not unified for a long time, poets used the word “Heimat” to advocate for German unification, and this gave the word associations that do not exist in English, where this historical process did not occur.&lt;/p&gt;
&lt;h2 id="2-the-what-is-questions-and-the-problem-of-systemization"&gt;2. The &amp;lsquo;What is&amp;rsquo; Questions and the Problem of Systemization&lt;/h2&gt;
&lt;p&gt;Let’s switch tracks for a moment. In philosophy, we encounter many questions that are debated extensively, with philosophers taking vastly different, and often mutually exclusive, positions. Just to name a few: nominalism vs. realism, moral emotivism vs. moral realism, Platonic realism vs. idealism, and many more. All of these debates are framed around questions of the form “What is X?”, for example, what are categories? What is morality? What is the thing that holds the world together at its deepest level?&lt;/p&gt;
&lt;p&gt;But how is it possible that we arrive at such mutually exclusive positions when we are using common words? Shouldn’t our shared meanings lead us to relatively similar conclusions?&lt;/p&gt;
&lt;p&gt;The problem is as follows: in philosophy, when we ask a “what is” question, we often begin with an intuition that pulls us in a certain direction. From there, we try to systematize this intuition by constructing a theory, a set of rules that is internally coherent, i.e., free of contradictions. The problem is that we are trying to systematize something that cannot be fully systematized.&lt;/p&gt;
&lt;p&gt;Why can we not develop complete systems for the meanings of words?&lt;/p&gt;
&lt;p&gt;There are several reasons. First, humans do not understand words through strict systems or sets of rules. Rather, meaning arises from a loose set of associations. We are therefore trying to systematize something that is, by its nature, not fully systematizable. How do you turn a web of associations into a rigid system?&lt;/p&gt;
&lt;p&gt;Second, as discussed earlier, these associations differ from society to society. Even if it were possible to construct such a system, it would have to vary across cultures.&lt;/p&gt;
&lt;p&gt;Third, shared meaning is not static. It changes over time. In different historical periods, we have different understandings of words. For example, with the rise of modern medicine, our understanding of what it means to be “dead” has changed drastically. Nowadays, we often say someone is dead when they are brain dead, that is when no brain activity can be detected. In ancient times, people believed someone was dead when their “pneuma,” or breath of life, had left them; later, death was associated with the heart stopping. This is just one example of how meanings evolve.&lt;/p&gt;
&lt;p&gt;In fact, within our society, there is a constant process of negotiation over the meanings of words. If I say, “My friend is tall,” and someone else replies, “He is only 1.70 m, that is not tall,” we are negotiating what “tall” means. Both people have different conceptions of the word and try to convince each other that their conception is correct. This process of renegotiation happens continuously, gradually shifting meanings over time.&lt;/p&gt;
&lt;p&gt;A more modern example is the word “computer,” which used to refer to any calculating device, including very simple ones. Nowadays, most people think of a desktop or personal computer when they hear the word. This is a natural shift in meaning.&lt;/p&gt;
&lt;p&gt;Fourth, and perhaps most importantly, our sets of associations often include contradictory elements. When people try to systematize the meaning of a word, they tend to select one element and ignore the rest. Around this single element, they then build an elaborate theory. But this leads to problems down the line: the theory is challenged, and a new, more complex theory must be constructed to address these issues. This process continues, with theories becoming more intricate and refined, until they begin to feel strange and disconnected from the world they were meant to describe.&lt;/p&gt;
&lt;h2 id="3-examples-of-systemization"&gt;3. Examples of Systemization&lt;/h2&gt;
&lt;p&gt;Let’s ground this a bit more. In particular, I want to focus on the fourth aspect and combine it with an explanation of the previously raised question: how is it possible that we arrive at contradictory philosophical positions when answering “what is” questions? To do this, I will look at two examples: time and morality.&lt;/p&gt;
&lt;h3 id="31-time"&gt;3.1 Time&lt;/h3&gt;
&lt;p&gt;In his famous paper &lt;em&gt;The Unreality of Time&lt;/em&gt;, McTaggart differentiates between two theories of time called the A-series and the B-series. The A-series describes statements like “I am eating an apple,” “In the future I will eat an apple,” and “In the past I ate an apple.” This series is, in other words, categorical: events are classified as present, past, or future. The B-series, by contrast, is relational. It includes statements like “9/11 happened after World War II” or “The Queen dies before the year 2026.” Here, time is described in terms of relations and events are ordered relative to one another using terms like “before” and “after.”&lt;/p&gt;
&lt;p&gt;There is one important difference between the two: in the B-series, change is impossible. If one event is before another, it will always be before that event. In the A-series, however, change is possible: an event can be present and later become past.&lt;/p&gt;
&lt;p&gt;McTaggart then makes the following argument: for time to exist, change is essential. Only the A-series allows for change, so the A-series is necessary for time. However, the A-series is contradictory. Therefore, time does not exist.&lt;/p&gt;
&lt;p&gt;I do not want to elaborate on his argument in full detail here; if you are interested, you can read the original paper or my paper summary of it. But to give an intuition: a time event cannot simultaneously be in the present and in the past. Yet we can say, “I am now eating an apple,” and the next day, “Yesterday I ate an apple.” How do we explain this shift?&lt;/p&gt;
&lt;p&gt;One way is to introduce a meta-time, a time about time. We move from “I am now eating an apple” to “Yesterday, I said ‘I am now eating an apple.’” But now change occurs at the level of this meta-time as well, which would require a meta-meta-time, and so on. This leads to an infinite regress. From this, McTaggart concludes that the concept of time is contradictory and therefore unreal.&lt;/p&gt;
&lt;p&gt;But the argument itself is not what matters here. What matters is what just happened. Let’s take a step back. We tried to explain time by constructing two rivalry systems, the A-series and the B-series, each driven by a different intuition: that time is categorical and that time is relational. These intuitions pull us in different directions, and from each we build a theory. These theories then conflict or lead to contradictions. Each has its own problems (e.g., no change in the B-series, contradiction in the A-series), and to resolve these problems we must make our theories more complex or introduce additional assumptions.&lt;/p&gt;
&lt;p&gt;This is exactly the process described earlier. We start with a set of associations tied to a word, extract particular intuitions, and then build systems around them. But the problem did not arise at the level of argumentation or conclusion, it arose at the very first step: we tried to systematize something that cannot be fully systematized.&lt;/p&gt;
&lt;h3 id="32-morality"&gt;3.2 Morality&lt;/h3&gt;
&lt;p&gt;Let me provide a second example, this time from morality, more precisely meta-ethics, the field that investigates questions like “What is morality?” or “What is its nature?”&lt;/p&gt;
&lt;p&gt;There are many theories that attempt to answer this question. I will focus on two: emotivism and realism. Emotivism roughly states that moral judgments are not statements of fact but expressions of the speaker’s feelings. When we say, “You acted wrongly in stealing that money,” we are not stating a fact beyond “You stole that money.” Rather, we are expressing disapproval.&lt;/p&gt;
&lt;p&gt;This contrasts sharply with moral realism, which holds that moral statements are statements of fact. According to this view, when I say “You stole that money,” I am not expressing an emotion but referring to a moral fact or rule that has been violated.&lt;/p&gt;
&lt;p&gt;This difference has consequences. In emotivism, contradictory moral positions can coexist because people have different feelings. In realism, if two people make contradictory moral claims, at most one can be correct.&lt;/p&gt;
&lt;p&gt;Both positions face serious problems. Emotivism encounters the Frege–Geach problem, which pushes it toward abandoning truth-based logic in favor of coherence-based approaches. Realism, on the other hand, struggles to explain how moral facts interact with the world, how we could possibly perceive or access them.&lt;/p&gt;
&lt;p&gt;Once again, the question arises: how do we end up with such radically different positions?&lt;/p&gt;
&lt;p&gt;The answer mirrors the case of time. What we understand by “morality,” like any word, is a set of associations. Different theorists select different intuitions from this set and build their theories around them, leaving others aside.&lt;/p&gt;
&lt;p&gt;For example, someone might focus on the immediate emotional response we feel when seeing a homeless person being beaten, an instinctive sense that something is wrong. From this intuition, emotivism emerges: morality is rooted in emotion. Another person might focus on cases where we are unsure whether something is morally wrong and must deliberate before reaching a conclusion. This slower, reflective process seems more rational than emotional, leading to the idea that morality involves discovering truths, hence realism.&lt;/p&gt;
&lt;p&gt;But just as in the case of time, building a system around a single intuition is a mistake. By doing so, we ignore other important aspects of our understanding. The resulting theories are incomplete, and this incompleteness generates problems that require increasingly strange solutions.&lt;/p&gt;
&lt;p&gt;It is like trying to assemble a puzzle where the pieces do not quite fit. Instead of reconsidering the overall picture, we start cutting the pieces to force them into place.&lt;/p&gt;
&lt;h2 id="4-the-game-of-bitter-pill-swallowing-and-constitution-of-concepts"&gt;4. The Game of Bitter Pill Swallowing and Constitution of Concepts&lt;/h2&gt;
&lt;p&gt;I like to call this “the game of bitter pill swallowing.” What we are doing, even though we claim to be searching for truth, is constructing worldviews that minimize the problems we personally find most troubling. It becomes a competition to adopt the theory that requires us to swallow the fewest “bitter pills”, whether that means abandoning truth for coherence in emotivism, or positing mysterious faculties to perceive moral facts in realism. To a certain extent, adopting different philosophical positions reveals more about ourselves than about the nature of reality; rather than accepting the position that is closest to the truth, we tend to accept the one that fits us best.&lt;/p&gt;
&lt;p&gt;There is another way of understanding what is happening, besides the “set of associations” framework I have used so far. We can instead say that we have certain concepts: like time, morality (or identity), that are not singular, unified entities, but are constituted by many different phenomena.&lt;/p&gt;
&lt;p&gt;Take time as an example. When we talk about time, we are actually referring to several distinct phenomena. One of them is &lt;strong&gt;change&lt;/strong&gt;: we observe how things around us transform, leaves turn from green to brown and fall from trees, food spoils, objects decay. We group these observations under the concept of time. But there is also another phenomenon: &lt;strong&gt;memory&lt;/strong&gt;. We can remember things we did in the past, like the apple we ate yesterday or playing in the sand as a child. This too is a phenomenon we associate with time, yet it is clearly distinct from change.&lt;/p&gt;
&lt;p&gt;The same applies to morality. It is not a single, unified thing but is composed of multiple phenomena: the emotional response we feel when someone is unjustly harmed, the rational deliberation about whether something is right or wrong, and so on. These are different elements that together constitute what we call “morality.”&lt;/p&gt;
&lt;p&gt;What we humans do is observe these different phenomena and group them together under one term. So concepts that appear unified are, in reality, composites of many distinct parts.&lt;/p&gt;
&lt;p&gt;One way to avoid the problems with models discussed earlier is to stop focusing on these high-level terms like “time” or “morality” and instead focus on the underlying phenomena themselves, as suggested in the paper &lt;em&gt;The Unimportance of Identity&lt;/em&gt;. Instead of speaking about time and building models around it, we speak about change and memory. Instead of speaking about morality, we speak about emotion and deliberation.&lt;/p&gt;
&lt;p&gt;This has two advantages. First, it simplifies our models, we have fewer “bitter pills” to swallow. Second, we do not lose anything in doing so. Whenever we would talk about the broader concept, we can instead refer to the specific phenomenon that is relevant in that context. This makes our thinking more precise and less confusing.&lt;/p&gt;
&lt;h2 id="5-the-role-of-models-in-understanding-the-world"&gt;5. The Role of Models in Understanding the World&lt;/h2&gt;
&lt;p&gt;So where does this leave us?&lt;/p&gt;
&lt;p&gt;Models and definitions of words are not useless, far from it. They help us understand the world and make sense of it. But they are always only partial perspectives on a concept, never the full picture. They are lenses through which we view reality, imperfect representations that can never fully capture it, partly because our concepts themselves contain tensions and even contradictions that cannot be completely expressed in pure logical systems.&lt;/p&gt;
&lt;p&gt;For this reason, we should aim to hold multiple models or perspectives of a concept in mind when investigating it. Each model provides a different viewpoint, and together they can give us a clearer picture. There is a well-known story that illustrates this:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;A group of blind men heard that a strange animal, called an elephant, had been brought to the town, but none of them were aware of its shape and form. Out of curiosity, they said: “We must inspect and know it by touch, of which we are capable.” So they sought it out, and when they found it they groped about it. The first person, whose hand landed on the trunk, said, “This being is like a thick snake.” Another, whose hand reached its ear, said it seemed like a fan. As for another, whose hand was upon its leg, said the elephant is like a pillar, like a tree trunk. The blind man who placed his hand upon its side said the elephant “is like a wall.” Another who felt its tail described it as a rope. The last felt its tusk, stating the elephant is something hard, smooth, and like a spear.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Models, then, have their proper use and should not be abandoned. But we should also avoid focusing too narrowly on a single model. A healthy plurality of perspectives gives the best picture of reality. And if we remain aware of the limitations of models, as discussed in this article, they can be extremely valuable tools for understanding the world more clearly.&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;Source:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://monkemanx.github.io/paper-summary/unimportance_of_identity/"&gt;The Unimportance of Identity&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://monkemanx.github.io/paper-summary/the_unreality_of_time/"&gt;The Unreality of Time&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://monkemanx.github.io/paper-summary/disagreements_semantics_ofnormative_terms/"&gt;Disagreement and the Semantics of Normative and Evaluative Terms&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;My thoughts&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>An Argument for Veganism and an Argument for Amoralism</title><link>https://monkemanx.github.io/articles/argument_for_veganism/</link><pubDate>Fri, 10 Apr 2026 08:00:00 +0000</pubDate><author>monkeman@cock.li (MonkeMan)</author><guid>https://monkemanx.github.io/articles/argument_for_veganism/</guid><description>&lt;h2 id="part-0-structure-of-this-article"&gt;Part 0: Structure of this Article&lt;/h2&gt;
&lt;p&gt;This article is essentially about two topics that are not obviously connected with each other, brought together in a single piece. Why not write two separate articles? Because I use the first topic as a jumping-off point for the second.&lt;/p&gt;
&lt;p&gt;The first topic is an argument for veganism. To be more precise, it is somewhat weaker: it does not argue against all animal products, but only against the consumption of animal meat. This limitation is not due to a lack of strength in the argument. I think that, with a few additional premises and a slightly longer argument, it would be fairly straightforward to extend the conclusion to a more general vegan position. The reason I have not done this here is that I am less interested in the practical conclusion and more in the theoretical, i.e., the metaphysical, assumptions underlying the argument. Nonetheless, I will refer to it as a “veganism argument” for two reasons: (1) convenience, and (2) because it naturally leads toward a vegan position.&lt;/p&gt;
&lt;p&gt;After introducing the argument, I will explain each step in the reasoning and then present some possible “escapes” from this argumentative structure. This will constitute Part 1 of the article.&lt;/p&gt;
&lt;p&gt;Part 2 will then focus on one premise of the veganism argument, namely that “morality is normatively binding.” I will argue that this binding force is limited and can be rejected. The result of such a rejection would be the “destruction” of morality for an individual, followed by the need to rebuild it, a reconstruction in a Nietzschean sense.&lt;/p&gt;
&lt;h2 id="part-1-a-veganism-argument"&gt;Part 1: A Veganism Argument&lt;/h2&gt;
&lt;h3 id="11-the-argument-in-a-nutshell"&gt;1.1 The Argument in a Nutshell&lt;/h3&gt;
&lt;p&gt;I want to present an argument for veganism that I think, once one grants its premises, which are not too controversial, fairly easily leads to the conclusion.&lt;/p&gt;
&lt;p&gt;Without much further ado, let’s jump directly into the argument, which goes like this:&lt;/p&gt;
&lt;ol start="0"&gt;
&lt;li&gt;Morality is a set of rules or guiding principles on how to behave toward things that are morally worth considering.&lt;/li&gt;
&lt;li&gt;Morality is real.&lt;/li&gt;
&lt;li&gt;Morality is normatively binding, i.e., it has strong normative force.&lt;/li&gt;
&lt;li&gt;There are things (objects or subjects) that are morally worth considering.&lt;/li&gt;
&lt;li&gt;If a thing is morally worth considering, then whenever one performs an action that explicitly or implicitly involves it, the consequences of that action for that thing must be considered morally.&lt;/li&gt;
&lt;li&gt;Humans are morally worth considering.&lt;/li&gt;
&lt;li&gt;It is morally wrong to cause unnecessary suffering to another human, or we may only cause suffering to another human if not doing so would result in significantly greater harm to ourselves.&lt;/li&gt;
&lt;li&gt;Whatever principle, line, factor, or combination of factors one uses to define “human” without excluding certain individuals (e.g., mentally or physically disabled people) either also applies to animals or is not morally relevant.&lt;/li&gt;
&lt;li&gt;Causing unnecessary suffering to animals is morally wrong.&lt;/li&gt;
&lt;li&gt;Consuming animal meat causes unnecessary suffering; all the nutrients we need can be obtained without animal products, and the only benefit is taste, which is outweighed by the suffering caused by mass factory farming.&lt;/li&gt;
&lt;li&gt;It is morally wrong to eat animal meat.&lt;/li&gt;
&lt;li&gt;One must not eat animal meat.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;One might have various questions about certain premises or steps in this argument, and even objections. For this reason, I now want to take a closer look at the argument.&lt;/p&gt;
&lt;h3 id="12-a-deeper-look-into-the-argument"&gt;1.2 A Deeper Look into the Argument&lt;/h3&gt;
&lt;p&gt;The 0th step is basically just a working definition of morality so that everyone is clear on what I am talking about. I am not strongly committed to this definition; it is somewhat ad hoc. Even if one is unhappy with it, as long as it remains roughly in the same ballpark, it should not hinder the argument.&lt;/p&gt;
&lt;p&gt;The next premise (step 1) is that morality is real. By this, I mean that morality exists in some sense. I do not mean the standard realism vs. anti-realism distinction; rather, I mean that morality exists in some form, whether realist or anti-realist. It could be law-like, human-created, based on desires, written into the universe, or explained in many other ways. Even fictionalist accounts would be acceptable. What this excludes is the total rejection of morality.&lt;/p&gt;
&lt;p&gt;That morality is normatively binding (step 2) should not be too controversial. This is also sometimes expressed by saying that morality has “strong normative force,” meaning it has authority over us and binds our actions to some extent. If morality were not normatively binding, there would be no reason to follow it, it would be inert. One way to imagine this is to consider a set of laws that exist but are never specified to apply to anyone: they exist, but they have no force.&lt;/p&gt;
&lt;p&gt;In step 3, I posit the existence of things that are morally worth considering. This follows from morality being real and binding: morality must apply to something, otherwise it would be an empty concept. Importantly, things that are morally worth considering are not the same as moral agents. A stone or a leaf is not morally worth considering, meaning we do not need to consider the consequences of our actions for them. This is not the case for humans. A moral agent, by contrast, is something that can be morally culpable i.e., capable of acting against moral norms. For example, we blame a human for killing another human, but we do not blame a machine that causes death. However, not everything that is morally considerable is a moral agent. For example, a tree in a neighbor’s garden may be morally relevant (indirectly), but the tree itself is not a moral agent.&lt;/p&gt;
&lt;p&gt;Step 4 clarifies the relationship between morally considerable beings, actions, and morality.&lt;/p&gt;
&lt;p&gt;That humans are morally worth considering (step 5) should also be clear, as morality is most often applied to them. The justification for this stems from moral intuition.&lt;/p&gt;
&lt;p&gt;Step 6 may be the first controversial point. Initially, it seems intuitive that one should not cause unnecessary suffering, where “unnecessary” means suffering inflicted for trivial reasons, such as gaining a minor benefit while causing significantly greater harm to another. This involves a kind of utilitarian reasoning, which might exclude Kantian or virtue-ethical systems. However, the argument can still proceed within other ethical frameworks, though the conclusion may change slightly. For example, under a strict rule-based system, the premise may be replaced by “It is morally wrong to kill another human,” and step 9 would change accordingly to something like “Consuming animal meat involves the unjustified killing of an animal.”&lt;/p&gt;
&lt;p&gt;Step 7 is where the real controversy begins. However, even if one rejects it, the premise could be replaced by a version of Peter Singer’s argument from &lt;em&gt;all animals are equal&lt;/em&gt;, which replaces &lt;em&gt;similarity criteria&lt;/em&gt; with &lt;em&gt;equal consideration of like interests&lt;/em&gt;. This is essentially a &lt;strong&gt;“name the trait”&lt;/strong&gt; argument.&lt;/p&gt;
&lt;p&gt;Let us consider possible criteria for distinguishing humans from animals:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Intelligence&lt;/strong&gt;: Some humans (e.g., those with severe cognitive disabilities) may have lower intelligence than certain animals. If intelligence were the criterion, we would have to exclude such humans or reject the criterion.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Language&lt;/strong&gt;: Some humans cannot use language, while some animals demonstrate limited linguistic abilities.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Physical characteristics&lt;/strong&gt;: Humans vary widely in bodily form (e.g., amputations), making this an implausible moral criterion.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Species membership&lt;/strong&gt;: It is unclear why belonging to a species should be morally relevant, and thought experiments (e.g., uploaded consciousness) challenge this idea. Additionally, this risks begging the question: how do we define species without again appealing to some underlying trait?&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Social participation&lt;/strong&gt;: Animals are clearly part of human social structures (pets, agriculture, laws, industries).&lt;/li&gt;
&lt;/ul&gt;
&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Plausible Criterion&lt;/summary&gt;
 
 A plausible criterion for what is &lt;strong&gt;morally worth considering&lt;/strong&gt; is the &lt;strong&gt;capacity to suffer&lt;/strong&gt;. This is morally relevant and aligns with how we often think about moral action. However, animals clearly meet this criterion.
 
&lt;/details&gt;


&lt;p&gt;If this step is accepted, then step 8 follows: since we cannot draw a morally relevant distinction, and unnecessary suffering is wrong in humans, it should also be wrong for animals.&lt;/p&gt;
&lt;p&gt;Finally, step 9 concludes that eating animals for pleasure is unnecessary suffering. Since we can obtain all required nutrients from plant-based diets, the only benefit is taste, which is outweighed by the suffering caused by industrial farming. From step 8, it follows in step 10 that eating animal meat is morally wrong. And since morality is normatively binding (step 2), we are obligated not to eat animal meat.&lt;/p&gt;
&lt;h3 id="13-possible-escapes"&gt;1.3 Possible Escapes&lt;/h3&gt;
&lt;p&gt;There are two possible “escapes” that I think exist that diminish the strength of the argument. I still think the argument goes through, but its consequences are weakened.&lt;/p&gt;
&lt;p&gt;The first is to argue that, yes, animals may be capable of suffering, experiencing pain, and being conscious, but there is still a morally relevant difference between animals and humans: humans have a desire to continue existing, whereas animals do not. The idea is that humans, due to their intellect, understand what it means not to exist, we grasp the significance of death through introspection. This may not be true for animals, which may lack this reflective awareness and therefore do not have the same desire to continue their existence.&lt;/p&gt;
&lt;p&gt;This does not invalidate the entire argument. Causing unnecessary suffering to animals would still be wrong, for example, factory farming would remain morally unacceptable. However, it might allow for killing animals and then eating them, as long as this does not produce suffering. But even under this view, most meat consumption in modern society, which relies heavily on factory farming, would still be wrong.&lt;/p&gt;
&lt;p&gt;The second argument is that morality applies only to the human species. The key question here is whether this distinction is morally relevant.&lt;/p&gt;
&lt;p&gt;To clarify what I mean by moral relevance, consider the following: suppose we claimed that people with long hair are not morally worth considering, while people with short hair are. Here we would have a clear distinguishing feature, hair length, but no one would accept it as morally relevant. The same question applies to species: why should species membership be morally important?&lt;/p&gt;
&lt;p&gt;One possible response is that morality has developed organically through evolution and culture to help humans live together, to enable a functioning society. On this view, morality applies only to humans because it was created for human social life.&lt;/p&gt;
&lt;p&gt;In other words, animals are excluded not because of some fundamental ethical principle, but because morality is a constructed phenomenon that was not designed to protect them.&lt;/p&gt;
&lt;p&gt;This view has some plausibility, but it also has issues. Just because morality currently functions in a certain way does not mean it ought to remain that way. When we discuss what is morally relevant, we are not only describing what &lt;em&gt;is&lt;/em&gt;, but also arguing about what &lt;em&gt;should be&lt;/em&gt;. From this perspective, one could argue that we should care about animal suffering.&lt;/p&gt;
&lt;p&gt;The question then becomes: why care about animal suffering? A possible answer, consistent with a Humean view, is that what has normative force over us is what we care about and we do, in fact, care about animal suffering.&lt;/p&gt;
&lt;p&gt;There are various other “escapes” that are often invoked, but which I do not find plausible. A short list includes: nutritional necessity, appeals to nature, the idea that there are bigger issues, causal inefficacy, denial of animal consciousness, denial of animal rights, and the problem of animal deaths during crop harvesting. For a discussion of these, see this video:
&lt;a href="https://youtu.be/JuGSJ8ta5Z0?si=txFOtcImgQ-QTsTI"&gt;https://youtu.be/JuGSJ8ta5Z0?si=txFOtcImgQ-QTsTI&lt;/a&gt;&lt;/p&gt;
&lt;h2 id="part-2-morality-and-normative-force"&gt;Part 2: Morality and Normative Force&lt;/h2&gt;
&lt;p&gt;Up to this point, I have argued that veganism follows from a fairly standard moral framework. However, this argument is conditional: it assumes that morality has a certain amount of normative force.&lt;/p&gt;
&lt;p&gt;In the following section, I want to step back and question this very assumption. This does not invalidate the previous argument, but rather reframes it: its force depends on whether one accepts morality or not.&lt;/p&gt;
&lt;h3 id="21-the-problem-with-normative-force"&gt;2.1 The Problem with Normative Force&lt;/h3&gt;
&lt;p&gt;If you recall step 2 of the argument, I claimed that morality is normatively binding, which is crucial for the argument to work. However, I am highly suspicious of this claim. To understand why, let us take a closer look at what this supposed normative force is.&lt;/p&gt;
&lt;p&gt;When I said that morality is normatively binding, I meant that it has strong normative force. In other words, what we must or are obligated to do is determined by moral rules. Morality, in this sense, holds a certain authority over us: we cannot simply do whatever we want, but are compelled in some way to act morally.&lt;/p&gt;
&lt;p&gt;To better understand what normative binding would amount to, consider the following thought experiment. Imagine you are walking through a shopping mall and see an arcade machine. You have the option to walk past it or to sit down, insert a coin, and start playing. Notice that you are not forced to do either; in this sense, playing the arcade machine is not binding.&lt;/p&gt;
&lt;p&gt;Now imagine a different scenario: instead of freely walking around, you are kidnapped, chained to the arcade machine, and only released if you play a game. Here, you are clearly bound, you are compelled to act.&lt;/p&gt;
&lt;p&gt;We can now ask: is morality more like the first case or the second? It seems obvious that it is more like the first. Even in trivial situations, people often choose not to act morally. If you are faced with a moral decision, what compels you to act one way rather than another? You can, in principle, opt out of the system of morality entirely and adopt an attitude of not caring about it. What stops you? In principle nothing, except your own desire to be moral. But if that desire disappears, then there is no normative force compelling you to act morally.&lt;/p&gt;
&lt;p&gt;One problem with this notion of normative binding is its strictness. A reasonable question is: what would actually satisfy such a criterion? As I have defined it, almost nothing would. Consider eating: eating is necessary for survival, but if I no longer care about surviving, if I lose the desire to live, then nothing compels me to continue eating. I could, as a result, starve. Would we then say that eating is not binding?&lt;/p&gt;
&lt;p&gt;This seems counterintuitive. If something is supposed to be binding i.e., to have authority over us, should it not at least include our continued survival?&lt;/p&gt;
&lt;p&gt;Perhaps a better notion is that of &lt;strong&gt;normative force&lt;/strong&gt; rather than strict normative binding. We can imagine normative force as a sliding scale: from very weak (where a system has little authority over us) to very strong (which we might call binding).&lt;/p&gt;
&lt;p&gt;Any system, laws of a country, personal rules for interacting with others, or morality, can fall somewhere on this scale. Some exert more force on us than others.&lt;/p&gt;
&lt;p&gt;At the strongest end, normative binding would mean absolute inescapability, like physical laws. At weaker levels, morality provides something like &lt;strong&gt;reason-giving authority&lt;/strong&gt;: even if it is not inescapable, it gives us strong reasons to act in certain ways.&lt;/p&gt;
&lt;p&gt;However, there is still a problem. Since morality is not strictly binding, as argued above, it seems that we can escape from it. What does it mean &amp;ldquo;to escape morality&amp;rdquo;? To explore this, I want to provide a plausible genealogy, that is a history, of morality.&lt;/p&gt;
&lt;h3 id="22-genealogy-of-morality"&gt;2.2 Genealogy of Morality&lt;/h3&gt;
&lt;p&gt;Humans are social creatures, and we have always been social. What has changed over time is the &lt;em&gt;degree&lt;/em&gt; of sociality. Today, many people live in large metropolitan areas with millions of inhabitants, but early humans lived in small tribes of perhaps a few dozen individuals.&lt;/p&gt;
&lt;p&gt;Even then, what made humans unique compared to other animals was their cognitive ability. A single human could not outrun a deer, but a group working together could hunt one. This required cooperation, and cooperation, in turn, required rules governing behavior within the group.&lt;/p&gt;
&lt;p&gt;It was therefore evolutionarily advantageous for a tribe to develop something like morality. If we imagine two tribes, one with moral norms and one without, the former would likely have an advantage. Moral norms foster harmony, enable trust, and create shared expectations about behavior.&lt;/p&gt;
&lt;p&gt;This likely led, relatively early in human history, to the development of a kind of proto-morality: a simple, coarse-grained system of basic rules.&lt;/p&gt;
&lt;p&gt;Over time, as tribes grew into villages, and villages into cities, moral systems became more complex and fine-grained. In large societies, individuals can no longer know everyone personally, so trust must be maintained through shared norms rather than personal relationships.&lt;/p&gt;
&lt;p&gt;This led to the organic development of morality from these earlier proto-systems. People within these societies effectively developed a kind of social contract, though not one that was ever explicitly written down. Instead, it emerged implicitly and continues to evolve through ongoing social interaction. This renegotiation takes place through the use of moral language.&lt;/p&gt;
&lt;p&gt;Over time, this process gave rise to the moral systems we recognize today.&lt;/p&gt;
&lt;h3 id="23-bringing-genealogy-of-morality-and-normative-force-together"&gt;2.3 Bringing Genealogy of Morality and Normative Force Together&lt;/h3&gt;
&lt;p&gt;If this picture is correct, then morality is a construct: a system shaped by evolutionary pressures and human social needs to help us live together. It is not some mystical or metaphysical force that compels us independently of our motivations.&lt;/p&gt;
&lt;p&gt;Returning to normative force: as argued earlier, morality is not strictly binding. It does not compel us in the way physical laws do. Instead, it pushes us in certain directions. The question is: what is this “push”?&lt;/p&gt;
&lt;p&gt;The answer, I suggest, is &lt;strong&gt;desire&lt;/strong&gt; (in a Humean sense). We desire to be moral, and because of this, morality has authority over us.&lt;/p&gt;
&lt;p&gt;Why do we have this desire? Partly because of evolutionary pressures, we want others to see us as moral, which brings social benefits. And partly because of social expectations: those who are perceived as immoral are often condemned or ostracized.&lt;/p&gt;
&lt;p&gt;But this leads to a problem.&lt;/p&gt;
&lt;p&gt;If we follow morality only because we desire to do so, then the strength of morality’s authority depends entirely on the strength of that desire. Morality has only as much force as we allow it to have. If the desire to be moral disappears, then we effectively opt out of the system of morality.&lt;/p&gt;
&lt;p&gt;This raises a deeper question: do we want to want to be moral? Should we have a second-order desire (in the sense discussed by Harry Frankfurt) to be moral or not?&lt;/p&gt;
&lt;h3 id="24-pros-and-cons-of-moralism-and-amoralism"&gt;2.4 Pros and Cons of Moralism and Amoralism&lt;/h3&gt;
&lt;p&gt;The answer is not clear-cut. It depends on what one wants. Both moralism and amoralism have advantages and disadvantages.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Moralism&lt;/strong&gt;: Morality provides a set of rules for how to treat others. As moralists, we have an existing framework that guides our interactions. When we are uncertain, we can draw on centuries of philosophical reflection on ethical questions. However, this also limits us: there are things we are simply not allowed to do because we have committed ourselves to this system.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Amoralism&lt;/strong&gt;: The amoralist, by contrast, is not bound by moral rules. This allows complete freedom in how one interacts with others. However, this freedom comes at a cost: one must construct one’s own framework for interacting with others. This is difficult and isolating, there are no guiding traditions or established answers to rely on.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="25-the-argument-for-amoralism"&gt;2.5 The Argument for Amoralism&lt;/h3&gt;
&lt;p&gt;A clarification is needed: being an amoralist does not mean being cruel. An amoralist, like anyone else, has people they care about and may wish to treat them well. Rejecting morality does not imply brutality.&lt;/p&gt;
&lt;p&gt;In fact, one might argue the opposite: the amoralist has complete freedom to act with as much kindness and love as possible, unconstrained by external rules.&lt;/p&gt;
&lt;p&gt;This raises a natural question: why be an amoralist at all? Does this not just recreate morality in a different form?&lt;/p&gt;
&lt;p&gt;The argument for amoralism is that morality, as a system of rules, can corrupt the purity of our intentions. Instead of acting out of genuine care, we may act out of fear: fear of punishment, fear of judgment, or simple rule-following. In this sense, we become reactive rather than truly autonomous.&lt;/p&gt;
&lt;p&gt;Pure kindness and love, by contrast, are not motivated by fear or obligation. They are not instrumental. They arise spontaneously, without expectation of reward. When one is filled with such care, one cannot help but act in ways that express it, like a spring that overflows.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;“Boundless compassion for all living beings is the surest and most certain guarantee of pure moral conduct…”&lt;/p&gt;
&lt;p&gt;— Arthur Schopenhauer&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;It is important to emphasize that this reconstruction is not universal. Once morality is abandoned, there is no longer a single framework that applies to everyone. Each individual must reconstruct their way of relating to others for themselves. But, the view described above, offers one possible reconstruction path.&lt;/p&gt;
&lt;p&gt;A final question remains: how would this look in practice?&lt;/p&gt;
&lt;p&gt;One way to understand this is through the concept of &lt;em&gt;skillful means&lt;/em&gt; in Buddhism. An enlightened being may act in ways that appear immoral, but are in fact guided by compassion and wisdom.&lt;/p&gt;
&lt;p&gt;The following story illustrates this idea. It should not be taken literally, but as an example of how such a view might be understood in practice:&lt;/p&gt;
&lt;blockquote&gt;
&lt;ol start="132"&gt;
&lt;li&gt;
&lt;p&gt;Then the Lord again addressed the bodhisattva Jñanottara:
“Son of the family: Once upon a time, long before the Thus-Come-One, the Worthy, the fully
perfected Buddha Dīpaṁkara, there were five hundred merchants who set sail on the high seas in
search of wealth. Among the company was a doer of dark deeds, a doer of evil deeds, a robber well-
trained in the art of weaponry, who had come on board that very ship. He thought, ‘I will kill all these
merchants when they have completed their business and done what they set out to do, take all their
possessions and go to Jambu Continent.’
“Son of the family: Then the merchants completed their business and set about to depart. No
sooner had they done so, than that deceitful person thought: ‘Now I will kill all these merchants, take
all their possessions and go to Jambu Continent. The time has come.’&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;“At the same time, among the company on board was a captain named Great
Compassionate (sārthavāha mahākāruṇika). While Captain Great Compassionate slept on one
occasion, the deities who dwelt in that ocean showed him this in a dream:
“ ‘Among this ship’s company is a person named so and so, of such and such sort of physique,
of such and such garb, complexion and shape—a robber, mischievous, a thief of others’ property. He is
thinking, “I will kill all these merchants, take all their possessions and go to Jambu Continent.” To kill
these merchants would create formidable evil karma for that person. Why so? These five hundred
merchants are all progressing toward supreme, right and full awakening. If he should kill these
bodhisattvas, the fault—the obstacle caused by the deed—would cause him to burn in the great hells
for as long as it takes each one of these bodhisattvas to achieve supreme, right and full awakening,
consecutively. Therefore, Captain, think of some skill in means to prevent this person from killing the
five hundred merchants and going to the great hells because of the deed.’&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;“Son of the family: Then the captain Great Compassionate awoke. He considered what
means there might be to prevent that person from killing the five hundred merchants and going to the
great hells. Seven days passed with a wind averse to sailing to Jambu Continent. During those seven
days he plunged deep into thought, not speaking to anyone.
“He thought, ‘There is no means to prevent this man from slaying the merchants and going to the great
hells, but to kill him.’
“And he thought, ‘If I were to report this to the merchants, they would kill and slay him with
angry thoughts and all go to the great hells themselves.’
“And he thought, ‘If I were to kill this person, I would likewise burn in the great hells for one
hundred-thousand eons because of it. Yet I can bear to experience the pain of the great hells, that this
person not slay these five hundred merchants and develop so much evil karma. I will kill this person
myself.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Son of the family: Accordingly, the captain Great Compassionate protected those five
hundred merchants and protected that person from going to the great hells by deliberately stabbing and
slaying that person who was a robber with a spear, with great compassion and skill in means. And all
among the company completed their business and each went to his own city.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;“Son of the family. At that time, in that life I was none other than the captain Great
Compassionate. Have no second thoughts or doubt on this point. The five hundred merchants on board
are the five hundred bodhisattvas who are to nirvāṇize to supreme, right and full awakening in this
Auspicious Eon.
“Son of the family: For me, saṁsāra was curtailed for one hundred-thousand eons because of
that skill in means and great compassion. And the robber died to be be reborn in a world of paradise.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;“Son of the family, what do you think of this? Can curtailing birth and death for one
hundred-thousand eons with that skill in means and that great compassion be regarded as the
Bodhisattva’s obstacle caused by past deeds? Do not view it in that way. It should be regarded as his
very skill in means.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;~ Upāyakauśalya Sūtra, Murder with Skill in Means: the Story of the Compassionate Ship’s Captain&lt;/p&gt;
&lt;/blockquote&gt;
&lt;hr&gt;
&lt;p&gt;Summary:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The normative force that morality has over you, that is the power morality has to motivate you to do (or not do) certain things, is determined by your desire to be moral.&lt;/li&gt;
&lt;li&gt;This desire to be moral can be changed. You can have a second-order desire not to be moral (i.e., the desire not to desire to be moral).&lt;/li&gt;
&lt;li&gt;There is no objective criterion for why one should be moral, that is there is no norm for choosing norms.&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>My 10-Day Vipassana Retreat at Dhamma Sampatti (Black Forest)</title><link>https://monkemanx.github.io/articles/meditation_vipassana_01_goenka_trip/</link><pubDate>Wed, 18 Mar 2026 08:00:00 +0000</pubDate><author>monkeman@cock.li (MonkeMan)</author><guid>https://monkemanx.github.io/articles/meditation_vipassana_01_goenka_trip/</guid><description>&lt;style&gt;
 .info {
 background-color: #e6f7ff; 
 padding: 15px; 
 border-radius: 5px; 
 margin-bottom: 15px; 
 }

 .info-title {
 font-size: 20px; 
 margin-bottom: 10px; 
 color: #000080; 
 font-weight: bold; 
 }
&lt;/style&gt;

&lt;div class="info"&gt;
 &lt;div class="info-title"&gt;Info&lt;/div&gt;
 &lt;p&gt;This article is meant to be a report of the 10-day Goenka meditation course. It does not cover any meditation techniques or the theory behind them.&lt;/p&gt;
&lt;/div&gt;

&lt;style&gt;
 .warning {
 background-color: #ffe4e1; 
 padding: 15px; 
 border-radius: 5px; 
 margin-bottom: 15px; 
 }

 .warning-title {
 font-size: 20px; 
 margin-bottom: 10px; 
 color: #8b0000; 
 font-weight: bold; 
 }
&lt;/style&gt;

&lt;div class="warning"&gt;
 &lt;div class="warning-title"&gt;Warning&lt;/div&gt;
 &lt;p&gt;&lt;p&gt;Before registering for a course like this, understand what this course is and what it isn’t. This is a 10-day course where you will be meditating every day for 5–10 hours, and you will not do much else besides taking care of your physical needs. You will also not be talking to anyone else.&lt;/p&gt;
&lt;p&gt;If you think you cannot occupy yourself only with yourself for hours upon hours, be it because of past traumas or difficult states of mind you find yourself in, this course is not for you. If you have any mental illness, such as depression, schizophrenia, bipolar disorder, and so on, this course is not for you, talk with your therapist.&lt;/p&gt;
&lt;p&gt;The people at the meditation center are trained in the meditation technique, not as professional mental health practitioners. If you have some sort of episode, they will not be able to properly help you, they will give you suggestions based on their meditation framework. Know yourself best.&lt;/p&gt;
&lt;p&gt;Otherwise, things like &lt;a href="https://www.tagesschau.de/investigativ/br-recherche/vipassana-meditation-kurse-gefahren-100.html"&gt;this can happen&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Also, this is a meditation retreat, not a therapy session. If you think participating in one of these retreats will solve all your mental problems, you are mistaken, again talk with your therapist.&lt;/p&gt;
&lt;p&gt;Neither is this an adventure holiday where you go just because you want to challenge yourself.&lt;/p&gt;
&lt;p&gt;The purpose of the course is one thing and one thing only: learning the Vipassana meditation technique as taught by Goenka and becoming better at it.&lt;/p&gt;
&lt;/p&gt;
&lt;/div&gt;

&lt;h2 id="0-background-how-did-i-come-to-meditation"&gt;0. Background: How did I come to meditation&lt;/h2&gt;
&lt;p&gt;Skip this section if you are not interested in how I came to meditation and then to this 10-day course.&lt;/p&gt;
&lt;p&gt;The first time I became aware (no pun intended) of meditation was probably when I was a child. During a car drive with my family, one of my siblings meditated. This was completely confusing to me, wait you just sit around and do nothing? When you could instead read something or play on the Nintendo? That must be boring. But alongside this rejection, there was also curiosity on my part: why would anyone do this? How could someone sit still for so long (relatively speaking, for a child)?&lt;/p&gt;
&lt;p&gt;After this, I occasionally thought about it but never seriously looked into it. My next contact with it was in my early teenage years, by complete accident. There were no fantasy books at home anymore for me to read, and the next trip to the library was days away, so I picked up a copy of &lt;em&gt;Sophie&amp;rsquo;s World&lt;/em&gt; from my parents’ bookshelf.&lt;/p&gt;
&lt;p&gt;This introduced me to philosophy, and I began buying and reading philosophical works. I still remember exactly which ones: Plato’s &lt;em&gt;Symposium&lt;/em&gt;, Sam Harris’ &lt;em&gt;Free Will&lt;/em&gt;, Plato’s &lt;em&gt;Republic&lt;/em&gt;, and Kierkegaard’s &lt;em&gt;Either/Or&lt;/em&gt;. I only read the first three, and only really understood the first two. After that, I stopped, philosophy seemed too complicated, and my interest moved on.&lt;/p&gt;
&lt;p&gt;However, I began listening to Sam Harris, and anyone who has listened to him knows how much he loves talking about meditation. This renewed my interest, and I bought the book &lt;em&gt;The Mind Illuminated: A Complete Meditation Guide Integrating Buddhist Wisdom and Brain Science for Greater Mindfulness&lt;/em&gt;. I started meditating with it, but never seriously, and because I didn’t see any real improvement in my ability to focus on the breath, I eventually gave up.&lt;/p&gt;
&lt;p&gt;My third wave of interest in meditation started about a year ago. I took a philosophy course at university, and my interest was renewed. I began reading again, and one pivotal book was Sam Harris’ &lt;em&gt;Waking Up: A Guide to Spirituality Without Religion&lt;/em&gt;. In it, he described long meditation retreats, up to three months, and how he learned to enter states of bliss at will. This sounded almost fantastical to me.&lt;/p&gt;
&lt;p&gt;But then I thought: you only live once. At least once in my life, I want to do a longer retreat; simply to know what it is like, and maybe finally find out whether meditation is really something worthwhile that I can progress in.&lt;/p&gt;
&lt;p&gt;So I started looking for Vipassana retreats in Germany, and one of the first things that came up was dhamma.org, which offers courses in the style of Goenka around the world. As luck would have it, there was a center near me, only about three hours away, newly opened. Additionally, everything was donation-based, which made me, as a student with limited resources, very happy.&lt;/p&gt;
&lt;p&gt;So I made the plan that after finishing my bachelor’s degree and switching to my master’s in computer science, I would have more time and could do this retreat. And that is how I came to this course.&lt;/p&gt;
&lt;p&gt;At this point, it might be useful to list my goals for this meditation retreat:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Simply for the experience: I wanted to do a longer retreat once in my life, to know what it is like&lt;/li&gt;
&lt;li&gt;I wanted to know if I could make progress in meditation&lt;/li&gt;
&lt;li&gt;I wanted to see if I could reach interesting states of mind, like those described by Sam Harris or Robert Wright in &lt;em&gt;Why Buddhism Is True&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;I wanted to know whether one can have direct access to consciousness (see Philip Goff on transparent vs. opaque, Bernardo Kastrup on analytical idealism, and Schopenhauer’s &lt;em&gt;The World as Will and Representation&lt;/em&gt;)&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="1-registration"&gt;1. Registration&lt;/h2&gt;
&lt;p&gt;If you have decided to take part in one of these courses, you can register via &lt;a href="https://www.dhamma.org/de/schedules/schsampatti"&gt;this link&lt;/a&gt;, which shows all the different courses offered throughout the year.&lt;/p&gt;
&lt;p&gt;They offer different types of courses, but for new students, those who have never attended a Vipassana course in the Goenka tradition, only the 10-day courses are relevant. These courses are structured in such a way that they teach you the entire technique, with each day building upon the previous one.&lt;/p&gt;
&lt;p&gt;Only after successfully completing a 10-day course will you be considered an “old student,” meaning you have properly learned the technique. Only then can you participate in shorter courses (like 3-day courses), longer courses, or serve as a volunteer. The same applies to being a service helper, you must first complete a 10-day course.&lt;/p&gt;
&lt;p&gt;Now, let’s say you find a course that fits your schedule. It is important to know that these courses are very popular and fill up quickly. If you want a place, be there at the exact time registration opens. Registration may only remain open for an hour or two before everything is full.&lt;/p&gt;
&lt;p&gt;They may reopen registration in the following days, but you will most likely end up on the waiting list, meaning you depend on others canceling. Registration typically opens 1–3 months before the course begins.&lt;/p&gt;
&lt;p&gt;In my case, I missed the initial registration and only signed up the next morning, which put me on the waiting list. Only two weeks before the course started did I receive confirmation that I was accepted.&lt;/p&gt;
&lt;p&gt;So if you need to plan ahead, make sure to register on time.&lt;/p&gt;
&lt;p&gt;Besides the Dhamma Sampatti center where I registered, there are &lt;a href="https://www.dhamma.org/en/locations/directory"&gt;centers all around the world&lt;/a&gt;, so if you don’t get into one, you can try another. Officially, I think you are not supposed to register for multiple courses at once, but I met someone who applied to around ten courses across Europe at the same time because they needed a specific date and it worked out for them. They didn’t receive any reprimand, but I still wouldn’t recommend doing this.&lt;/p&gt;
&lt;h2 id="2-arriving-at-the-center"&gt;2. Arriving at the Center&lt;/h2&gt;
&lt;p&gt;The center (Dhamma Sampatti) is near the village of Seebachwald in the Black Forest. It is located in the former Hotel Hohritt, which was acquired by the Vipassana organization and modified into a meditation center. The history of the building is quite interesting, if at the end of the course, they offer a tour, I highly recommend participating.&lt;/p&gt;
&lt;p&gt;The hotel was originally built in the 1930s and was used by German soldiers. Later, it burned down in what became the largest Fachwerkhaus fire in Germany. It was then rebuilt and eventually sold to the Vipassana organization.&lt;/p&gt;












&lt;figure style="display: block; margin: 0 auto; width: 100%; "&gt;
 &lt;img
 src="https://monkemanx.github.io/attachments/Drohe_ThomasDolddji_fly_20250804_204728_0077_1754333486825_photo-1-1400x788.jpg"
 loading="lazy"
 width=""
 height=""
 alt="Image"
 style="display: block; width: 100%; height: 100%; object-fit: contain; "
 &gt;
 
 &lt;figcaption style="text-align: center; margin-top: 0.5rem;"&gt;The Meditation Center. Credit: de.dhamma.org&lt;/figcaption&gt;
 
&lt;/figure&gt;

&lt;p&gt;How do you get to the center, Dhamma Sampatti? The easiest way is by car. Germany has (mostly) excellent roads, and there is a road that goes directly up to the center.&lt;/p&gt;
&lt;p&gt;If you do not have the luxury of owning a car or don’t want to use a taxi (which can get expensive quickly), public transportation is an excellent option. It depends on where you are coming from, but typically you would first go to Karlsruhe, then take a regional train to Achern. From the station, you can take either bus 400 or bus 423. The 423 runs somewhat irregularly, while the 400 is more reliable and takes about 20 minutes. You can get off at the stop “Seebachwald, von Hohritt.”&lt;/p&gt;
&lt;p&gt;From there, you will need to walk up a hill through the forest, which takes around 15 minutes. At the top, there are three buildings: a church, a long house, and a large house. The large house is where you want to go, and there should also be signs pointing the way.&lt;/p&gt;












&lt;figure style="display: block; margin: 0 auto; width: 100%; "&gt;
 &lt;img
 src="https://monkemanx.github.io/attachments/osm_hohritt2.jpg"
 loading="lazy"
 width=""
 height=""
 alt="Image"
 style="display: block; width: 100%; height: 100%; object-fit: contain; "
 &gt;
 
 &lt;figcaption style="text-align: center; margin-top: 0.5rem;"&gt;Schematic of Meditation Center. Credit: de.dhamma.org&lt;/figcaption&gt;
 
&lt;/figure&gt;

&lt;h2 id="3-the-0th-day"&gt;3. The 0th Day&lt;/h2&gt;
&lt;p&gt;After you arrive in the main hall, people are separated based on gender. Men register in the male dining hall, while women register in the female dining hall.&lt;/p&gt;
&lt;p&gt;In the dining hall, you will need to read and fill out a form. This form outlines a number of rules (e.g., the Five Precepts, not attending with serious mental illness, etc.) and asks questions about things like drug use, prior meditation experience, and your general mental state.&lt;/p&gt;
&lt;p&gt;Some of these questions might feel quite intrusive, and you will need to officially sign the form, agreeing to things like staying for the full ten days. It can feel a bit like a sect at first.&lt;/p&gt;
&lt;p&gt;As far as I can tell, the form serves several purposes:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;It emphasizes seriousness. Like the warning at the beginning of this article, they want to make sure you understand what you are getting into, that this is something intense and not just a casual activity.&lt;/li&gt;
&lt;li&gt;The act of signing reinforces &lt;em&gt;Adhiṭṭhāna&lt;/em&gt; (strong determination). It is a commitment to yourself: “No matter what happens, I will stay for the full 10 days.”&lt;/li&gt;
&lt;li&gt;The rules themselves exist to support the practice. Overall they seem sensible and helpful for Vipassana meditation, they are partly explaiend in the evening discoursed durign the retreat.&lt;/li&gt;
&lt;li&gt;It helps filter participants. People who are mentally very unstable, recently experienced severe trauma, or have substance abuse issues may be excluded. This is because Vipassana should be practiced with a relatively stable and tranquil mind.&lt;/li&gt;
&lt;li&gt;It provides context for the teacher. During the course, you will have time to ask questions about the technique. The form can help the teacher understand your background. For example, before attending the retreat, I practiced using &lt;em&gt;The Mind Illuminated&lt;/em&gt;, which involves counting breaths. Since this is not done in Goenka-style meditation, I had difficulty letting go of that habit, something that was useful for the teacher to know.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;After you have signed the form and handed it in, they will ask you to turn off your phone and give it to them. All phones are stored in one place and returned at the end of the retreat. So make sure to finish anything important beforehand and inform family or loved ones that you will not be reachable.&lt;/p&gt;
&lt;p&gt;They will also ask you to hand in anything that could entertain you, such as books or other distractions. Like your phone, you will get these back at the end of the course.&lt;/p&gt;
&lt;p&gt;It is important to note that they will not search your bags. This rule is based on trust. If you secretly keep something like a book and are seen using it, they will likely talk to you about it and might even ask you to leave. Technically, nothing prevents you from sneaking something in, but that would miss the point of the retreat.&lt;/p&gt;
&lt;p&gt;If you feel the urge to bring something like a book because you are afraid of being bored, you should ask yourself whether this is really the right course for you. The purpose is to give the technique a fair chance, which requires complete focus. If you want a less intensive experience, there are many alternatives, but if you choose a Goenka-style retreat, you are choosing intensity, and that includes accepting the rules.&lt;/p&gt;
&lt;p&gt;Afterward, they will give you a key to your room, and you are free until dinner. You can use this time to explore the grounds and, if you have a roommate, discuss practical matters like heating, ventilation, and alarm times.&lt;/p&gt;
&lt;p&gt;After dinner, you will have your first meditation session, which lasts about an hour. Then it is already time to go to bed.&lt;/p&gt;
&lt;p&gt;From the next day onward, “noble silence” begins, meaning you should not talk to other participants. However, if you need anything practical, you can speak to the course manager, and if you have questions about the technique, you can ask the teacher during designated Q&amp;amp;A times.&lt;/p&gt;
&lt;h2 id="4-schedule-of-the-rest-of-the-days"&gt;4. Schedule of the Rest of the Days&lt;/h2&gt;
&lt;p&gt;The rest of your time at the retreat follows a &lt;a href="https://www.dhamma.org/en-US/about/code"&gt;strict schedule&lt;/a&gt;. This schedule only changes slightly on the 4th day (when a new meditation technique is introduced) and on the 10th day, when noble silence is lifted and students can share their experiences.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Daily schedule:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;4:00 am — Morning wake-up bell&lt;/li&gt;
&lt;li&gt;4:30–6:30 am — Meditate in the hall or in your room&lt;/li&gt;
&lt;li&gt;6:30–8:00 am — Breakfast break&lt;/li&gt;
&lt;li&gt;8:00–9:00 am — Group meditation in the hall&lt;/li&gt;
&lt;li&gt;9:00–11:00 am — Meditate in the hall or in your room according to the teacher’s instructions&lt;/li&gt;
&lt;li&gt;11:00–12:00 pm — Lunch break&lt;/li&gt;
&lt;li&gt;12:00–1:00 pm — Rest (and interviews with the teacher)&lt;/li&gt;
&lt;li&gt;1:00–2:30 pm — Meditate in the hall or in your room&lt;/li&gt;
&lt;li&gt;2:30–3:30 pm — Group meditation in the hall&lt;/li&gt;
&lt;li&gt;3:30–5:00 pm — Meditate in the hall or in your room according to the teacher’s instructions&lt;/li&gt;
&lt;li&gt;5:00–6:00 pm — Tea break&lt;/li&gt;
&lt;li&gt;6:00–7:00 pm — Group meditation in the hall&lt;/li&gt;
&lt;li&gt;7:00–8:15 pm — Teacher’s discourse in the hall&lt;/li&gt;
&lt;li&gt;8:15–9:00 pm — Group meditation in the hall&lt;/li&gt;
&lt;li&gt;9:00–9:30 pm — Question time in the hall&lt;/li&gt;
&lt;li&gt;9:30 pm — Retire to your room (lights out)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;At 4:00 am and again at 4:30 am, a staff member walks through the dormitory ringing a bell to wake everyone up. This gives you time between 4:00 and 4:30 for your morning routine, like brushing your teeth. From 4:30 to 6:30, you can either meditate in the hall with others or in your room.&lt;/p&gt;
&lt;p&gt;A few important notes: nobody checks whether you wake up on time. These sessions are not “mandatory” in a strict enforcement sense, but it is expected that you follow the schedule. Personally, I often went back to sleep and only attended a few of these early sessions.&lt;/p&gt;
&lt;p&gt;That said, I would recommend participating at least occasionally. First, if you wake up early enough, you will meditate through the transition from night to day, which feels very special, a monastic experience. Second, only during these morning sessions is your meditation accompanied by chanting. While that might not sound appealing at first, after many days of repetition, even small variations like this can be refreshing.&lt;/p&gt;
&lt;p&gt;From 6:30 to 8:00 is breakfast. Depending on the center, actual eating time may be shorter (for me it was about 45 minutes), as the remaining time is used by staff to clean and prepare for the next session. Fasting during the retreat is not recommended.&lt;/p&gt;
&lt;p&gt;From 8:00 to 9:00 is the first mandatory group session. Attendance is expected, and if you are missing, they may come looking for you. From 9:00 to 11:00, you can again meditate either in the hall or in your room.&lt;/p&gt;
&lt;p&gt;In general, there are three types of meditation sessions:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Mandatory group sessions&lt;/strong&gt; — You are expected to be in the hall.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Flexible sessions (“hall or room”)&lt;/strong&gt; — You can choose where to meditate.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Teacher-directed sessions&lt;/strong&gt; — The teacher may ask specific groups (e.g., men or women) to stay for guidance or questions.&lt;/li&gt;
&lt;/ol&gt;












&lt;figure style="display: block; margin: 0 auto; width: 100%; "&gt;
 &lt;img
 src="https://monkemanx.github.io/attachments/20251019_162007-2.jpg"
 loading="lazy"
 width=""
 height=""
 alt="Image"
 style="display: block; width: 100%; height: 100%; object-fit: contain; "
 &gt;
 
 &lt;figcaption style="text-align: center; margin-top: 0.5rem;"&gt;The Meditation Hall. Credit: de.dhamma.org&lt;/figcaption&gt;
 
&lt;/figure&gt;

&lt;p&gt;Meditating in the hall provides structure and accountability, the group atmosphere helps focus. Meditating in your room gives you more freedom, for example to lie down briefly if needed. I recommend trying both; personally, I preferred the group sessions.&lt;/p&gt;
&lt;p&gt;There is also a difference in strictness. During mandatory sessions, you are expected to remain seated for the full hour. In non-mandatory sessions, you can take breaks, leave the hall walk around briefly, and return. Both have advantages: mandatory sessions are quieter and more stable, while flexible sessions help you build equanimity toward distractions.&lt;/p&gt;
&lt;p&gt;You might notice that there is no “dinner,” only a “tea break.” This is because there are essentially only two full meals per day. New students may eat some fruit during the tea break, while old students (those who have already completed a course) typically only drink tea. I’m not entirely sure of the reasoning behind this, but that is how it is structured.&lt;/p&gt;
&lt;p&gt;In the evening, there is a discourse. These are recordings of Goenka (who has since passed away) and are available in different languages. They explain both the technique and the theory behind it.&lt;/p&gt;
&lt;p&gt;Personally, I found many of these talks quite sensible, especially Goenka’s pragmatic approach: he emphasizes not blindly believing anything, but instead verifying everything through your own experience. He also explicitly says that you do not need to accept parts that seem too mystical. If you critically evaluate the discourses and take what is useful, they can be quite helpful in understanding the practice.&lt;/p&gt;
&lt;h2 id="5-miscellaneous"&gt;5. Miscellaneous&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Food:&lt;/strong&gt;
The food is simple and vegetarian. If you have allergies, they try to accommodate you as best as possible. During lunch, there is usually a salad bar with different dressings and various toppings like nuts, which is a nice touch. Overall, the food is decent, not amazing, but not bad either. That said, they had the best marinated tofu I’ve ever eaten.&lt;/p&gt;












&lt;figure style="display: block; margin: 0 auto; width: 100%; "&gt;
 &lt;img
 src="https://monkemanx.github.io/attachments/25_11_22_10Tage-Kurs_ThomasDold146A3646-1-1400x934.jpg"
 loading="lazy"
 width=""
 height=""
 alt="Image"
 style="display: block; width: 100%; height: 100%; object-fit: contain; "
 &gt;
 
 &lt;figcaption style="text-align: center; margin-top: 0.5rem;"&gt;Male Dining Hall. Credit: de.dhamma.org&lt;/figcaption&gt;
 
&lt;/figure&gt;

&lt;p&gt;&lt;strong&gt;Hygiene and laundry:&lt;/strong&gt;
Showering and washing clothes should be done during break times (early morning, breakfast, lunch, or tea break). Laundry must be done by hand, so it’s best to bring enough clothes to avoid frequent washing.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Free time:&lt;/strong&gt;
When you are not meditating, eating, listening to lectures, or taking care of hygiene, you can walk around the property. There is forest right next to the center with some nice walking paths. However, you are not allowed to leave the property.&lt;/p&gt;
&lt;h2 id="6-experience"&gt;6. Experience&lt;/h2&gt;
&lt;p&gt;For me personally, the hardest thing was the food. Normally at home I eat lunch and dinner and skip breakfast, but here it’s the opposite: eating breakfast and lunch while skipping dinner. The first few days, my stomach really didn’t like it. I had to force the food down, particularly during breakfast. But after a few days, this stabilized.&lt;/p&gt;
&lt;p&gt;The same was true for the sleeping rhythm. I am used to waking up at around 8 am and going to bed at midnight, whereas here it was waking up at 4 or 6 am. This also took some time to get used to.&lt;/p&gt;
&lt;p&gt;Now to the actual meditation. I rarely felt bored, because what is boredom? It comes from being unoccupied and lacking interest in doing anything. But meditation is not doing nothing. It is doing something: observing either the breath or the body. So during meditation, I didn’t really get bored, especially during body scans. And since you are meditating most of the time or following a strict schedule, there is almost always something to do.&lt;/p&gt;
&lt;p&gt;What also helped is that you are not doing the exact same technique every day. Like a regular boot camp, the techniques evolve over time. With each day, you progress, and the practice develops further, which made me curious about what would come next.&lt;/p&gt;
&lt;p&gt;As for the experience of meditation itself, I never had any mystical experiences or feelings of bliss, ecstasy, or strong elation. Some meditation sessions felt frustrating, but in most I just felt relaxed. The biggest difference I noticed in my state of mind was after meditation sessions: my mind felt empty. The constant stream of thoughts was reduced, and I felt more present.&lt;/p&gt;
&lt;p&gt;One small, somewhat funny moment: after one session, when we went outside for a break, the sun was shining on a particular field. About ten of us just stood there in a row, facing the sun, silently enjoying it. It was a strangely memorable image.&lt;/p&gt;
&lt;p&gt;I also felt that the long sessions really helped with making progress. One reason I think I didn’t improve much when practicing with &lt;em&gt;The Mind Illuminated&lt;/em&gt; was that I only did short daily sessions (around 20 minutes). Doing much longer sessions here seemed to accelerate progress.&lt;/p&gt;
&lt;p&gt;One negative experience I had was near the end of the retreat. During the last two days, after longer meditation sessions, I developed something like a headache. It felt quite uncomfortable, and in retrospect, I think I was trying too hard—over-concentrating.&lt;/p&gt;
&lt;p&gt;From what I’ve said so far, it might sound like my experience was mostly just relaxation, and not much more. But I am probably not the norm. When I talked to other people, they described much more transformative experiences, working through past memories or even traumas.&lt;/p&gt;
&lt;p&gt;For example, one person told me that during body scans, different emotions and memories were associated with different parts of the body. Scanning the chest brought up past relationships, scanning the legs brought up memories related to sports, and so on.&lt;/p&gt;
&lt;p&gt;I experienced none of this. No particular emotions or memories came up, and no past issues resurfaced. I think I might be more of an exception here, and there could be several reasons:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;My life has been relatively uneventful in that sense of having no major traumas or particularly negative experiences.&lt;/li&gt;
&lt;li&gt;I am generally not a very emotional person and don’t tend to ruminate much on past memories.&lt;/li&gt;
&lt;li&gt;There may also be a kind of expectation effect: I approached meditation in a more “scientific” mindset, focused on training attention and building habits, and didn’t expect anything deep or emotional to arise.&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id="7-final-thoughts"&gt;7. Final Thoughts&lt;/h2&gt;
&lt;p&gt;You get out of this retreat what you put into it. You can choose to goof off and relax the whole time, but that will likely become boring. Or you can take the schedule seriously and fully engage with the experience.&lt;/p&gt;
&lt;p&gt;In the end, it helps to think of this like any other kind of intensive training or bootcamp. For example, at a running camp, you run a lot to improve quickly. At a chess retreat, you play chess all day. Here, you meditate.&lt;/p&gt;
&lt;p&gt;Nobody is forcing you to be there, you chose it. And the time you get there, free from distractions and separated from the outside world, is extremely valuable. You can use it as focused training.&lt;/p&gt;
&lt;p&gt;Meditation, in this sense, is just a skill like any other. There is no need to make it overly mystical or to accept any religious framework if you don’t want to.&lt;/p&gt;
&lt;p&gt;To summarize, I think that if one is mentally healthy enough, this is a worthwhile endeavor. Don’t expect anything mystical or transformative to happen, but also don’t rule out the possibility entirely. The center where I stayed was nice: good food, a beautiful landscape and view, a calm atmosphere, and friendly people. The technique itself was not overly religious and was well explained. I especially liked Goenka’s pragmatic “see for yourself” approach.&lt;/p&gt;
&lt;p&gt;I would do it again.&lt;/p&gt;</description></item><item><title>Stop Asking What Things Are</title><link>https://monkemanx.github.io/articles/against_essentialism/</link><pubDate>Sun, 04 Jan 2026 10:00:00 +0000</pubDate><author>monkeman@cock.li (MonkeMan)</author><guid>https://monkemanx.github.io/articles/against_essentialism/</guid><description>&lt;style&gt;
 .info {
 background-color: #e6f7ff; 
 padding: 15px; 
 border-radius: 5px; 
 margin-bottom: 15px; 
 }

 .info-title {
 font-size: 20px; 
 margin-bottom: 10px; 
 color: #000080; 
 font-weight: bold; 
 }
&lt;/style&gt;

&lt;div class="info"&gt;
 &lt;div class="info-title"&gt;Info&lt;/div&gt;
 &lt;p&gt;&lt;p&gt;I am finally back writing an article. How long has it been, three months? Four months? Anyway, a long time. I didn’t even plan to write this article; it was meant to be a small note, but it kept getting longer. I sacrificed working on my bachelor’s thesis for this, even though tomorrow I have a meeting with my supervisors. This might not have been the smartest idea, but I have never been known as the smartest guy.&lt;/p&gt;
&lt;p&gt;Anyway, this article is pretty involved and a synthesis of many previous things I’ve read and thoughts I’ve had, so I don’t necessarily recommend reading it without the background, though it would make me happy.&lt;/p&gt;
&lt;p&gt;Anyway, happy New Year 2026 to whoever is reading this in time.&lt;/p&gt;
&lt;/p&gt;
&lt;/div&gt;

&lt;p&gt;I finally realized what my problem is with many questions in philosophy.&lt;/p&gt;
&lt;p&gt;For a long time, whenever we read papers in my philosophy seminar that were of the form &lt;em&gt;“What is X?”&lt;/em&gt;, for example: &lt;em&gt;What is morality? What is identity? What is knowledge?&lt;/em&gt;.
I felt deeply irritated by the answers these papers provided, yet I could never quite put my finger on why.&lt;/p&gt;
&lt;p&gt;Part of this dissonance came from the fact that many papers never make their aim sufficiently clear. Are they purely &lt;strong&gt;descriptive&lt;/strong&gt;, i.e. describing how people actually use a term? Or are they &lt;strong&gt;prescriptive&lt;/strong&gt;, i.e. telling us how the term &lt;em&gt;should&lt;/em&gt; be used?&lt;/p&gt;
&lt;p&gt;The former always felt unsatisfying to me because, as Wittgenstein famously stated, &lt;em&gt;meaning is use&lt;/em&gt;. The meaning of our language arises from how we use it, and people never use language rigidly. We use terms slightly differently, or imagine different things under them. One illuminating paper in this regard is &lt;em&gt;“Disagreement and the Semantics of Normative and Evaluative Terms,”&lt;/em&gt; which argues that whenever we argue about terms, there is a kind of &lt;strong&gt;negotiation&lt;/strong&gt; happening over what we want the term to do.&lt;/p&gt;












&lt;figure style="display: block; margin: 0 auto; width: 50%; "&gt;
 &lt;img
 src="https://monkemanx.github.io/attachments/1711428440250890.webp"
 loading="lazy"
 width=""
 height=""
 alt="Image"
 style="display: block; width: 100%; height: 100%; object-fit: contain; "
 &gt;
 
 &lt;figcaption style="text-align: center; margin-top: 0.5rem;"&gt;&lt;b&gt;Figure 1:&lt;/b&gt; Plato Gaming&lt;/figcaption&gt;
 
&lt;/figure&gt;

&lt;p&gt;Another paper that strengthened this conviction is &lt;em&gt;&lt;a href="https://monkemanx.github.io/paper-summary/unimportance_of_identity/"&gt;The Unimportance of Identity&lt;/a&gt;&lt;/em&gt;. It argues, that the term &lt;em&gt;identity&lt;/em&gt; is not important in itself, since many different things can be meant by it. Instead, we should talk about the underlying characteristics: bodily continuity, psychological continuity, personality continuity, and so on. So instead of asking, for example, &lt;em&gt;“Will I still be the same person if I take this medication?”&lt;/em&gt; one should ask more precise questions: &lt;em&gt;Will my body remain continuous?&lt;/em&gt; (Most likely yes, I have not yet heard of a medicine that will make one loose a limb.) &lt;em&gt;Will my personality remain the same?&lt;/em&gt; (Possibly not, if the medication affects it e.g. mood stabilizer drugs) These questions already exhaust everything we reasonably want to know about “identity”, further questions along the lines of &amp;ldquo;What is identity?&amp;rdquo; do not provide any additional information or are helpful in any way.&lt;/p&gt;
&lt;p&gt;All of these question from the beginning concerns metaphysics, so could it be that the problem I have is with metaphysics itself? But this cannot be. In fact, I love metaphysics, and I find papers like Carnap’s &lt;em&gt;&lt;a href="https://monkemanx.github.io/paper-summary/the_elimination_of_metaphysics_through_logical_analysis_language/"&gt;The Elimination of Metaphysics Through Logical Analysis of Language&lt;/a&gt;&lt;/em&gt; atrocious.&lt;/p&gt;
&lt;p&gt;So what &lt;em&gt;is&lt;/em&gt; my issue?&lt;/p&gt;
&lt;p&gt;I think the papers mentioned above already pushed me in the right direction. My problem with papers like &lt;em&gt;&lt;a href="https://monkemanx.github.io/paper-summary/jtb_knowledge/"&gt;Is Justified True Belief Knowledge?&lt;/a&gt;&lt;/em&gt; or &lt;em&gt;&lt;a href="https://monkemanx.github.io/paper-summary/on_bullshit/"&gt;On Bullshit&lt;/a&gt;&lt;/em&gt; is that they all heavily rely on a single assumption, one that I wholeheartedly reject, and yet this assumption is never even attempted to be justified.&lt;/p&gt;
&lt;p&gt;That assumption is &lt;strong&gt;essentialism&lt;/strong&gt;: the view that objects or concepts have some inner essence, an intrinsic core that makes them what they are. Plato would have called this an &lt;em&gt;Idea&lt;/em&gt; or &lt;em&gt;Form&lt;/em&gt;. According to essentialism, this inner essence is what a concept really is. Papers like &lt;em&gt;On Bullshit&lt;/em&gt; or &lt;em&gt;Is Justified True Belief Knowledge?&lt;/em&gt; proceed as if there were a single thing called &lt;em&gt;bullshit&lt;/em&gt; or &lt;em&gt;knowledge&lt;/em&gt; waiting to be discovered, and that if we only look deeply enough and argue carefully enough, we will uncover its ultimate nature.&lt;/p&gt;
&lt;p&gt;I reject this notion completely. One could call me a &lt;strong&gt;non-essentialist&lt;/strong&gt;. This is not surprising, given how central anti-essentialism is in Heidegger’s thought and how much I have written about him, but framing my position explicitly in these terms made it much clearer to me what I actually believe.&lt;/p&gt;
&lt;p&gt;I do not want to give an exhaustive argument here for why I think essences do not exist. I have already written about this from a Heideggerian perspective in &lt;em&gt;&lt;a href="https://monkemanx.github.io/articles/where_the_eiffel_tower_is_is_not_obejctive/"&gt;The Eiffel Tower Is NOT in Paris!&lt;/a&gt;&lt;/em&gt;. Beyond that, meditation or psychedelic experiences can provide an &lt;em&gt;empirical&lt;/em&gt; (rather than purely rational) route to this insight. Similar ideas also appear in other philosophical traditions, most notably in Buddhism, where the concept of &lt;em&gt;&lt;a href="https://en.wikipedia.org/wiki/%C5%9A%C5%ABnyat%C4%81"&gt;Śūnyatā, or emptiness&lt;/a&gt;&lt;/em&gt;, expresses precisely the idea that objects and concepts lack an inner essence or hidden ultimate reality.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;According to the theory of emptiness, any belief in an objective reality grounded in the assumption of intrinsic, independent existence is simply untenable.
All things and events, whether &amp;lsquo;material&amp;rsquo;, mental or even abstract concepts like time, are devoid of objective, independent existence &amp;hellip; [T]hings and events are &amp;rsquo;empty&amp;rsquo; in that they can never possess any immutable essence, intrinsic reality or absolute &amp;lsquo;being&amp;rsquo; that affords independence.&lt;/p&gt;
&lt;p&gt;~ 14th Dalai Lama&lt;/p&gt;
&lt;/blockquote&gt;












&lt;figure style="display: block; margin: 0 auto; width: 50%; "&gt;
 &lt;img
 src="https://monkemanx.github.io/attachments/chudda.webp"
 loading="lazy"
 width=""
 height=""
 alt="Image"
 style="display: block; width: 100%; height: 100%; object-fit: contain; "
 &gt;
 
 &lt;figcaption style="text-align: center; margin-top: 0.5rem;"&gt;&lt;b&gt;Figure 2:&lt;/b&gt; A so called Chuddha.&lt;/figcaption&gt;
 
&lt;/figure&gt;

&lt;p&gt;But if objects and concepts cannot be understood in terms of essence, how are we meant to do philosophy at all? Do we need to get rid of all &lt;em&gt;“What is X?”&lt;/em&gt; questions? And if so, what remains?&lt;/p&gt;
&lt;p&gt;The problem with &lt;em&gt;“What is X?”&lt;/em&gt; questions is that they suggest there is some static thing that can be fully described as &lt;em&gt;X&lt;/em&gt;. But I do not believe this. Human language is far too dynamic and context-sensitive. Often people do not even know what they themselves mean, as illustrated in a thought experiment of the paper &lt;em&gt;&lt;a href="https://monkemanx.github.io/paper-summary/many_almost_one/"&gt;Many, but Almost One&lt;/a&gt;&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;Consider the example: you have a house with a detached garage. How many houses are there? One could answer &lt;em&gt;one&lt;/em&gt;, viewing the garage and house as a single unit; or &lt;em&gt;two&lt;/em&gt;, viewing them separately. Is there a correct answer? Not really, it depends on what the questioner meant by “house.” And if we asked them to clarify, they might not even know themselves what they meant. This illustrates that speakers often lack a fully determinate meaning even in their own minds.&lt;/p&gt;
&lt;p&gt;Concepts and words, then, do not have a fixed form. Consider morality as another example.&lt;/p&gt;
&lt;p&gt;When asked &lt;em&gt;“&lt;a href="https://monkemanx.github.io/articles/what_is_morality/"&gt;What is morality?&lt;/a&gt;”&lt;/em&gt; my immediate reaction is: &lt;em&gt;What do you mean by morality?&lt;/em&gt; Depending on what is meant, I could see many different theories as &lt;a href="https://monkemanx.github.io/articles/metaethical_position/"&gt;appropriate&lt;/a&gt;. If morality is supposed to have objective normative force, error theory might be true. If objective normativity is not required, contractualism becomes plausible. Emotivism also seems compelling, since when we see someone kicking a puppy, we often have an immediate knee-jerk like reaction which is aking to expressing an emotional response. At other times, moral claims feel less emotional and more like appeals to an existing social contract e.g. &lt;em&gt;don’t do this, or there will be consequences&lt;/em&gt;. I could even accept fictionalist accounts of morality: morality as a useful story we tell to keep society functioning. And yet, given our evolutionary history, traits like kindness seem deeply suited to us, which tempts us to say morality is in some sense &lt;em&gt;real&lt;/em&gt;. But even that can be challenged: why should I care about what evolution has disposed me to value?&lt;/p&gt;
&lt;p&gt;What this shows is that the answer to &lt;em&gt;“What is morality?”&lt;/em&gt; depends entirely on what the asker means by &lt;em&gt;morality&lt;/em&gt;. Much moral philosophy goes wrong by pretending that there is one thing called &lt;em&gt;morality&lt;/em&gt; and one correct metaphysics for it. Instead, different theories correctly describe &lt;strong&gt;different layers&lt;/strong&gt; of the phenomenon.&lt;/p&gt;
&lt;p&gt;At least two modes of moral judgment can be distinguished:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Immediate, affective, world-disclosing responses&lt;/strong&gt;
(“That’s disgusting.” “That’s cruel.” “That’s wrong.”)&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Reflective, institutional, justificatory discourse&lt;/strong&gt;
(“This violates norms we’ve agreed upon, and here’s why that matters.”)&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Emotivism describes the first well. Contractualism describes the second well. Neither is &lt;em&gt;better&lt;/em&gt; than the other; they describe different phenomena. Likewise, virtue ethics, error theory, and fictionalism illuminate other aspects of morality.&lt;/p&gt;
&lt;p&gt;So how should we answer &lt;em&gt;“What is X?”&lt;/em&gt; if we reject essences? One approach is to illuminate the various aspects, relations, and consequences associated with the concept as I have done just now with morality. Another is to ask the questioner what they mean by &lt;em&gt;X&lt;/em&gt;. For example with morality again: If they are interested in the emotional dimension of morality, emotivism may be appropriate; if they are interested in its social function, contract theory may be the right tool.&lt;/p&gt;
&lt;p&gt;This is closely related to what Heidegger means when he wants to move away from &lt;strong&gt;ontology&lt;/strong&gt; (the study of what things &lt;em&gt;are&lt;/em&gt;) toward &lt;strong&gt;ontics&lt;/strong&gt; (how things show up in lived experience). Essence, for Heidegger, is disclosed through Dasein. Sartre famously captures this with the slogan: &lt;em&gt;existence precedes essence&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;Pragmatism provides another helpful lens. In &lt;em&gt;&lt;a href="https://monkemanx.github.io/paper-summary/what_pragmatism_is/"&gt;What Pragmatism Is&lt;/a&gt;&lt;/em&gt;, Peirce characterizes truth as what would be arrived at through an indefinitely careful, honest, and rigorous inquiry, given our phenomenological limits. Under this view, asking &lt;em&gt;“What is morality?”&lt;/em&gt; becomes: What picture of morality would we converge on if we investigated our moral experience as carefully and honestly as possible, over time?&lt;/p&gt;
&lt;p&gt;We would not arrive at some hidden essence of morality, but at a network of observations, relations, and explanations. We cannot step outside experience to validate experience. As Heidegger would say, Dasein limits what we can understand, know, and value. This explains how morality can be &lt;em&gt;objectively true&lt;/em&gt; without there being an objective moral substance “out there.” It is objective because this is where honest inquiry within our shared world leads us.&lt;/p&gt;
&lt;p&gt;Thus, to understand what something is, we must understand it &lt;strong&gt;relationally&lt;/strong&gt;, as part of a web of beliefs and practices, as argued in &lt;em&gt;&lt;a href="https://monkemanx.github.io/paper-summary/two_dogmas_of_empiricism/"&gt;Two Dogmas of Empiricism&lt;/a&gt;&lt;/em&gt;, &lt;em&gt;&lt;a href="https://monkemanx.github.io/paper-summary/rational_animals/"&gt;Rational Animals&lt;/a&gt;&lt;/em&gt;, and &lt;em&gt;&lt;a href="https://monkemanx.github.io/paper-summary/do_animals_have_beliefs/"&gt;Do Animals Have Beliefs?&lt;/a&gt;&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;What remains of philosophy if we reject essentialism? Surprisingly, almost everything. Anti-essentialism only denies that things have intrinsic, context-independent natures that determine what they are in all possible worlds. It does not deny that things exist or matter. Instead, things are what they are in virtue of relations, roles, practices, and structures.&lt;/p&gt;
&lt;p&gt;We can still talk about qualia or phenomenal consciousness, but not as possessing a fixed “&lt;a href="https://monkemanx.github.io/tangled_thoughts/quotes_being_and_becoming/"&gt;Is-ness&lt;/a&gt;.” What something is depends on embodiment, form of life, capacities, contrasts, attention, and framing. Nagel’s claim in &lt;em&gt;&lt;a href="https://monkemanx.github.io/paper-summary/what_it_is_like_to_be_a_bat/"&gt;What Is It Like to Be a Bat?&lt;/a&gt;&lt;/em&gt; still holds: there is something it is like to be a bat, but this “something” is not an isolable essence. It is &lt;a href="https://en.wikipedia.org/wiki/World_disclosure"&gt;disclosed through being-in-the-world&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The same holds for metaphysics. It does not disappear; it changes its questions:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Instead of &lt;em&gt;What is X really?&lt;/em&gt; → &lt;em&gt;How does X arise?&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;Instead of &lt;em&gt;What are X’s necessary and sufficient conditions?&lt;/em&gt; → &lt;em&gt;What relations does X sustain?&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;Instead of &lt;em&gt;What is X’s underlying substance?&lt;/em&gt; → &lt;em&gt;Under what conditions does X appear as X?&lt;/em&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Finally, some philosophers, Edward Feser being a notable example, have argued that anti-essentialism is not only logically untenable but also psychologically impossible.&lt;/p&gt;












&lt;figure style="display: block; margin: 0 auto; width: 50%; "&gt;
 &lt;img
 src="https://monkemanx.github.io/attachments/1762029920707567.webp"
 loading="lazy"
 width=""
 height=""
 alt="Image"
 style="display: block; width: 100%; height: 100%; object-fit: contain; "
 &gt;
 
 &lt;figcaption style="text-align: center; margin-top: 0.5rem;"&gt;&lt;b&gt;Figure 3:&lt;/b&gt; Being ambushed.&lt;/figcaption&gt;
 
&lt;/figure&gt;

&lt;p&gt;The logical objection is usually framed like this: If you say ‘the universe essentially has no essence,’ you are already ascribing an essence to the universe, namely having no essence. That is self-contradictory and violates the Law of Non-Contradiction.&lt;/p&gt;
&lt;p&gt;There are a few points to consider here:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Doubt about the Law of Non-Contradiction:&lt;/strong&gt; Some philosophers, particularly &lt;a href="https://en.wikipedia.org/wiki/Dialetheism"&gt;dialetheists&lt;/a&gt;, question whether the law of non-contradiction is universally feasible. So even if the argument would go through (which it does not), it is not immediate disqualifying.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Category mistake: ontology vs. meta-ontology:&lt;/strong&gt; The Feser objection assumes that anti-essentialism is making an ontological claim (about the actual world). But anti-essentialism is better understood as a meta-ontological claim, i.e. The concept of ‘essence’ does not apply in the way you think it does.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;If anti-essentialism were interpreted this way, it is not self-contradictory, because it is no longer asserting that the universe has or lacks an essence, it is stating that our explanatory framework does not require or license essence-talk. Feser’s error is to conflate the two levels: he treats a meta-ontological claim as if it were ontological. This is akin to saying “is the color red the number five or the number three?” this is nonsensical, just like this setence misapplies the category of numbers to colors, so does freser missaply the category of ontology to meta-ontology.&lt;/p&gt;
&lt;ol start="3"&gt;
&lt;li&gt;&lt;strong&gt;Psychological impossibility objection:&lt;/strong&gt; Feser also claims that anti-essentialism is psychologically impossible because humans allegedly require grasping essences to think coherently. This is flatly incorrect. Buddhist philosophy has operated with the concept of &lt;a href="https://en.wikipedia.org/wiki/%C5%9A%C5%ABnyat%C4%81"&gt;emptiness (Śūnyatā)&lt;/a&gt; for nearly 2,000 years. Heidegger rejects essence entirely. Wittgenstein also denies fixed essences. These are clear counterexamples showing that humans can think coherently without presupposing essentialist structures.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;In sum, anti-essentialism is logically coherent and psychologically possible, but only if you reject the assumption of essentialism in the first place. Feser’s arguments succeed only if you accept essentialism, but I reject that assumption entirely.&lt;/p&gt;
&lt;p&gt;Anti-essentialism, far from ending philosophy, reframes it. It replaces the hunt for hidden realities with a careful examination of relations, practices, disclosures, and lived meaning.&lt;/p&gt;
&lt;p&gt;I want to end with the following dialogue&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Plato to Nietzsche:&lt;/strong&gt; And is that your final word? An atheist and nothing but an atheist, a nihilist and nothing but a nihilist.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Nietzsche:&lt;/strong&gt; I said earlier that I would be the first nihilist, but I must add: I am one who has already lived nihilism to its end within himself.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Plato:&lt;/strong&gt; So nihilism is only an intermediate state for you?&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Nietzsche:&lt;/strong&gt; It depends decisively on the resolution of nihilism.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Plato:&lt;/strong&gt; So in the end, something positive?&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Nietzsche:&lt;/strong&gt; Yes, eventually we need new values.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Plato:&lt;/strong&gt; And what new values are those supposed to be?&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Nietzsche:&lt;/strong&gt; &lt;em&gt;Everything depends on a revaluation of all values. This revaluation will ultimately completely replace nihilism.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Plato:&lt;/strong&gt; And who is to bring about this replacement?&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Nietzsche:&lt;/strong&gt; &lt;em&gt;The philosopher.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Plato:&lt;/strong&gt; But what should the new values look like, and what about the new goal?&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Nietzsche:&lt;/strong&gt; Until now, all values of morality have been hostile to life; therefore, it is decisive that through the new values, life is affirmed.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Plato:&lt;/strong&gt; Which life, could you be more specific?&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Nietzsche:&lt;/strong&gt; The inner essence of being, the will to power. This is precisely the fundamental principle of my new revaluation of values.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Plato:&lt;/strong&gt; And the spirit? What do you intend to do with the spirit?&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Nietzsche:&lt;/strong&gt; The spirit must serve life.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Plato:&lt;/strong&gt; I think life must serve the spirit. There is no reconciliation here.&lt;/p&gt;
&lt;p&gt;~ Platon und Nietzsche Un-Zeitgenossen im Gespräch, 3 Sat/Von Wilhelm Weischedel&lt;/p&gt;
&lt;/blockquote&gt;
&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;What has this dialogue to do with the article?&lt;/summary&gt;
 
 &lt;p&gt;What is the relevance of this dialogue?
In this article, we have been discussing the idea that there is no essence to things. Plato, however, is foremost among those who deeply believed in essence. He held that there exists a realm of Ideas or Forms, where the essences of all things are gathered together in a perfect and eternal domain. Nietzsche rejects this view entirely and denies that things possess any such essence.&lt;/p&gt;
&lt;p&gt;Plato then asks: if there is no essence to things, what is left for philosophy? What, then, are philosophers supposed to do? Here we arrive at Nietzsche’s pivotal answer. The task of philosophy is not to discover hidden meanings or underlying realities. Instead, its task is to construct, to build, new systems of values.&lt;/p&gt;
&lt;p&gt;Just as the search for the essence of morality is misguided, because such an essence does not exist, philosophy should turn away from this illusion. Rather, it should aim to develop life, affirming philosophical systems, systems that help me, you, and all of humankind navigate and understand the world without appealing to the false comfort of essence.&lt;/p&gt;

 
&lt;/details&gt;

</description></item><item><title>Numerical Methods for Computer Scientist</title><link>https://monkemanx.github.io/articles/numerical_methods/</link><pubDate>Sun, 21 Sep 2025 09:00:00 +0000</pubDate><author>monkeman@cock.li (MonkeMan)</author><guid>https://monkemanx.github.io/articles/numerical_methods/</guid><description>&lt;p&gt;The following is a sheet of numerical problems and their solutions. It is a mix of problems taken from old exams and practice sheets from the &lt;a href="https://www.kit.edu/english/"&gt;KIT&lt;/a&gt; &lt;em&gt;&amp;quot;&lt;a href="https://www.math.kit.edu/ianm3/edu/numinfing2022s/de"&gt;Numerische Mathematik für die Fachrichtungen Informatik&lt;/a&gt;&amp;quot;&lt;/em&gt; lecture.
This is similar to the article &lt;a href="https://monkemanx.github.io/articles/optimization_problems/"&gt;Optimization Problem&lt;/a&gt;, but for numerical problems instead.&lt;/p&gt;
&lt;h2 id="problems-with-confirmed-solution"&gt;Problems with Confirmed Solution&lt;/h2&gt;
&lt;p&gt;This section contains only problems with official solutions.&lt;/p&gt;
&lt;h3 id="problem-1-floating-point-arithmetic"&gt;Problem 1: Floating Point Arithmetic&lt;/h3&gt;
&lt;p&gt;We consider for a given base \( B \geq 2 \), a minimum exponent \( E^{-} \), and lengths \( M \) and \( E \), the finite set of normalized floating-point numbers \(\text{FL}\).&lt;/p&gt;
\[
\text{FL} := \left\{ \pm B^e \sum_{l=1}^M a_l B^{-l} : e = E^{-} + \sum_{k=0}^{E-1} c_k B^k, a_l, c_k \in \{0, \ldots, B - 1\}, a_1 \neq 0 \right\} \cup \{0\}
\]&lt;p&gt;Let \( E^{+} \) be the maximum exponent, \( m \neq 0 \) the mantissa, \( \max \text{FL} \) the largest number of the set, and \( \min \text{FL}_+ \) the smallest positive number of the set.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;a)&lt;/strong&gt; Show that:&lt;/p&gt;
&lt;p&gt;(i) \( E^+ = E^{-} + B^E - 1 \)
(ii) \( B^{-1} \leq |m| &lt; 1 \)
(iii) \( \max \text{FL} = -\min \text{FL} = B^{E^+}(1 - B^{-M}) \)
(iv) \( \min \text{FL}_+ = B^{E^{-} - 1} \)&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;b)&lt;/strong&gt; Calculate for the IEEE Standard of&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;single precision&lt;/strong&gt; \((B = 2, E^{-} = -126, M = 23, E = 8)\)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;double precision&lt;/strong&gt; \((B = 2, E^{-} = -1022, M = 52, E = 11)\)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;the values for \( E^+ \), \( \max \text{FL} \), \( \min \text{FL}_+ \), and the machine epsilon \( \varepsilon \).&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;c)&lt;/strong&gt; Reformulate&lt;/p&gt;
\[
f(x) = \sqrt{x + \frac{1}{x}} - \sqrt{x - \frac{1}{x}} \quad \text{for } |x| \gg 1
\]&lt;p&gt;in such a way that cancellation is avoided.
Determine the absolute condition number of \( f \) at the point \( x = 100 \) before and after the transformation.
&lt;strong&gt;Hint:&lt;/strong&gt; &lt;em&gt;For evaluating the derivatives, we recommend using digital tools.&lt;/em&gt;&lt;/p&gt;
&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution a)&lt;/summary&gt;
 
 &lt;p&gt;(i)
&lt;/p&gt;
$$
\begin{align*}
e_{max} &amp;= e_{min} + \sum_{i = 0}^{L_e -1 } (B-1) B^l \\
&amp;= e_{min} + (B-1) \sum_{i = 0}^{L_e -1 } B^l \\
&amp;= e_{min} + (B-1) \frac{1-B^L_e}{1 - B} \\
&amp;= e_{min} - (B-1) \frac{1-B^L_e}{B - 1} \\
&amp;= e_{min} - (1-B^L_e) \\
&amp;= e_{min} + B^{L_e} - 1
\end{align*}
$$&lt;p&gt;(ii)
&lt;/p&gt;
$$
\begin{align*}
|m| &amp;= |\sum_{l = 1}^{M} a_l B^{-l}| \\
&amp;\geq | 1 \cdot B^{-1}| \\
&amp;\geq B^{-1} \\
\\
|m| &amp;= |\sum_{l = 1}^{M} a_l B^{-l}| \\
&amp;\leq (B -1 ) \sum_{l = 1}^{M} B^{-l} \\
&amp;= (B -1 ) \sum_{l = 0}^{M-1} B^{-1} B^{-l} \\
&amp;= (B - 1) (B^{-1}) \frac{1 - B^{-M}}{1 - B} \\
&amp;= (B - 1) (B^{-1}) \frac{1 - B^{-M}}{-(B-1)} \\
&amp;= \frac{1 - B^{-M}}{-B} \\
&amp;\leq 1
\end{align*}
$$&lt;p&gt;(iii)
&lt;/p&gt;
$$
\begin{align*}
-minFL = maxFL =^{(ii)} B^{E^+}(B^{-M} - 1)
\end{align*}
$$&lt;p&gt;(iv)
&lt;/p&gt;
$$
\begin{align*}
minFL_+ = B^{e_{min}}B^{-1} = B^{e_{min} - 1}
\end{align*}
$$
 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution b)&lt;/summary&gt;
 
 &lt;p&gt;For &lt;code&gt;eps&lt;/code&gt; we have:
&lt;/p&gt;
$$
eps = \frac{B^{1-M}}{2}
$$&lt;p&gt;For single precision:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;\(E^+ = -126 + 2^8 -1 = 129\)&lt;/li&gt;
&lt;li&gt;\(maxFL = 2^{129}(1 - 2^{-52}) = 6.8 * 10^{38}\)&lt;/li&gt;
&lt;li&gt;\(minFL_+ = 2^{-126 -1} = 5.8 * 10^{-39}\)&lt;/li&gt;
&lt;li&gt;\(eps = 1.10 * 10^{-7}\)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;For double precision:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;\(E^+ = 1025\)&lt;/li&gt;
&lt;li&gt;\(maxFL = 3.6 * 10^{308}\)&lt;/li&gt;
&lt;li&gt;\(minFL_+ = 1.1* 10^{-308}\)&lt;/li&gt;
&lt;li&gt;\(eps = 2.2 * 10^{-16}\)&lt;/li&gt;
&lt;/ul&gt;

 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution c)&lt;/summary&gt;
 
 $$
\begin{align}
f(x) &amp;= \sqrt{x + \frac{1}{x}} - \sqrt{x - \frac{1}{x}} \\
 &amp;= \left(\sqrt{x + \frac{1}{x}} - \sqrt{x - \frac{1}{x}}\right)
 \frac{\sqrt{x + \frac{1}{x}} + \sqrt{x - \frac{1}{x}}}
 {\sqrt{x + \frac{1}{x}} + \sqrt{x - \frac{1}{x}}} \\
 &amp;= \frac{2}{x(\sqrt{x + \frac{1}{x}}) + \sqrt{x + \frac{1}{x}})} \\
 &amp;= \hat{f}(x)
\end{align}
$$&lt;p&gt;We can then calculate the derivative of \(f(x)\) and \(\hat{f}(x)\) the absolute condition number is then the absolute value of the derivative.&lt;/p&gt;
$$
|f'(100)| = 0.000015 = |\hat{f}(100)|
$$
 
&lt;/details&gt;


&lt;h3 id="problem-2-lr-decomposition"&gt;Problem 2: LR-Decomposition&lt;/h3&gt;
&lt;p&gt;Let \(\alpha \in \mathbb{R} \setminus \{0\}\), \(\beta, \gamma, \delta \in \mathbb{R}\) and&lt;/p&gt;
$$
A = \begin{pmatrix} \alpha &amp; \beta \\ \gamma &amp; \delta \end{pmatrix}.
$$&lt;p&gt;a) Derive the LR-decomposition \(A = LR\).&lt;/p&gt;
&lt;p&gt;Now let specifically \(\alpha &gt; 0\), \(\beta = \gamma = 1\) and \(\delta = 0\).&lt;/p&gt;
&lt;p&gt;b) Determine the condition of \(A, L\) and \(R\) with respect to \(\| \cdot \|_1, \| \cdot \|_\infty\) and \(\| \cdot \|_F\) as an estimate of the spectral norm.&lt;/p&gt;
&lt;p&gt;c) Compare how, for an arbitrary right-hand side \(\mathbf{b} \in \mathbb{R}^2\) and \(|\alpha| \ll 1\), the solutions of the equations&lt;/p&gt;
$$
A\mathbf{x}^1 = \mathbf{b}, \quad L R \mathbf{x}^2 = \mathbf{b}
$$&lt;p&gt;react to a relative perturbation of the right-hand side of 10%.&lt;/p&gt;
&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution a)&lt;/summary&gt;
 
 &lt;p&gt;We want to find a matrix \(R\) and \(L\) so that&lt;/p&gt;
$$
A = LR
$$&lt;p&gt;with&lt;/p&gt;
$$
L = \begin{pmatrix} 1 &amp; 0 \\ l_{21} &amp; 1 \end{pmatrix} \quad
R = \begin{pmatrix} r_{11} &amp; r_{12} \\ 0 &amp; r_{22} \end{pmatrix}
$$&lt;p&gt;Thus we get:&lt;/p&gt;
$$
\begin{align}
\alpha &amp;= r_{11} \\
\beta &amp;= r_{12} \\
\gamma &amp;= l_{21} r_{11} \\
\delta &amp;= l_{21} r_{12} + r_{22}
\end{align}
$$&lt;p&gt;which is the same as:&lt;/p&gt;
$$
\begin{align}
\alpha &amp;= r_{11} \\
\beta &amp;= r_{12} \\
\gamma &amp;= l_{21} \alpha \\
\delta &amp;= l_{21} \beta + r_{22}
\end{align}
$$&lt;p&gt;Hence&lt;/p&gt;
$$
\begin{align}
\alpha &amp;= r_{11} \\
\beta &amp;= r_{12} \\
l_{21} &amp;= \frac{\gamma}{\alpha} \\
r_{22} &amp;= \delta - l_{21}\beta = \delta - \frac{\gamma\beta}{\alpha}
\end{align}
$$&lt;p&gt;So our final decomposition is&lt;/p&gt;
$$
L = \begin{pmatrix} 1 &amp; 0 \\ \frac{\gamma}{\alpha} &amp; 1 \end{pmatrix} \quad
R = \begin{pmatrix} \alpha &amp; \beta \\ 0 &amp; \delta - \frac{\gamma\beta}{\alpha}
 \end{pmatrix}
$$
 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution b)&lt;/summary&gt;
 
 &lt;p&gt;We calculate the condition number as follows&lt;/p&gt;
$$
cond(A) := ||A||||A^{-1}||
$$&lt;p&gt;Thus we first calculate the inverse. In generals if we have a matrix \(B\)
&lt;/p&gt;
$$
B = \begin{pmatrix} a &amp; b \\ c &amp; d \end{pmatrix}
$$&lt;p&gt;Then the inverse \(B^{-1}\) is calculated with&lt;/p&gt;
$$
B^{-1} = \frac{1}{ad-bc} \begin{pmatrix} d &amp; -b \\ -c &amp; a \end{pmatrix}
$$&lt;p&gt;Hence&lt;/p&gt;
$$
A^{-1} = \begin{pmatrix} 0 &amp; -1 \\ -1 &amp; \alpha \end{pmatrix} \quad
L^{-1} = \begin{pmatrix} 1 &amp; 0 \\ -\frac{1}{\alpha} &amp; 1 \end{pmatrix} \quad
R^{-1} = \begin{pmatrix} -\frac{1}{\alpha} &amp; -1 \\ 0 &amp; \alpha \end{pmatrix}
$$&lt;p&gt;Thus&lt;/p&gt;
$$
\begin{align}
cond_F(A) &amp;= ||A||_F \cdot ||A^{-1}||_F = \sqrt{2 + \alpha} \cdot \sqrt{2 + \alpha} = 2 + \alpha \\
cond_1(A) &amp;= ||A||_F \cdot ||A^{-1}||_F = (1 + \alpha) \cdot (1 + \alpha) = (1 + \alpha)^2 \\
\\
cond_F(L) &amp;= 2 + \frac{1}{\alpha^2}\\
cond_1(L) &amp;= (1 + \frac{1}{\alpha})^2
\\
cond_F(R) &amp;= 1 + \alpha^2 + \frac{1}{\alpha^2}\\
cond_1(R) &amp;= max\{1+\alpha, \frac{1}{\alpha}\} \cdot max\{\alpha, 1+ \frac{1}{\alpha}\}
\end{align}
$$&lt;p&gt;We get the same results for \(||\cdot||_1\) and \(||\cdot||_\infty\).&lt;/p&gt;

 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution c)&lt;/summary&gt;
 
 &lt;p&gt;We have&lt;/p&gt;
$$
\frac{|Ax^1|}{|x^1|} \leq K(A) \frac{|Ab|}{|b|} = K(A) \frac{|Ab|}{0.1}
$$&lt;p&gt;and&lt;/p&gt;
$$
\frac{|Ax^2|}{|x^2|} \leq K(L)K(R) \frac{|Ab|}{0.1}
$$
 
&lt;/details&gt;


&lt;h3 id="problem-3-qr-decomposition"&gt;Problem 3: QR-Decomposition&lt;/h3&gt;
&lt;p&gt;Calculate the QR decomposition for&lt;/p&gt;
$$A = \begin{pmatrix} 1 &amp; 2 \\ 1 &amp; 2 \\ \frac{1}{\sqrt{2}} &amp; \frac{1}{\sqrt{2}} \end{pmatrix}.$$&lt;p&gt;State all Householder transformations \(Q\) used.&lt;/p&gt;
&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution&lt;/summary&gt;
 
 &lt;style&gt;
 .info {
 background-color: #e6f7ff; 
 padding: 15px; 
 border-radius: 5px; 
 margin-bottom: 15px; 
 }

 .info-title {
 font-size: 20px; 
 margin-bottom: 10px; 
 color: #000080; 
 font-weight: bold; 
 }
&lt;/style&gt;
&lt;div class="info"&gt;
 &lt;div class="info-title"&gt;Recap QR-Decomposition&lt;/div&gt;
 &lt;p&gt;&lt;p&gt;The prerequisite for the QR decomposition is a matrix \(A\) with full rank. The decomposition is then \(A = QR\), with \(Q\) being an orthogonal matrix and \(R = \begin{pmatrix}\hat{R} \\ 0 \end{pmatrix}\), where \(\hat{R}\) is an upper triangular matrix.&lt;/p&gt;
&lt;p&gt;The idea behind it is as follows:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Calculate QR-Decomposition, Q orthogonal, R triangularm atrix&lt;/li&gt;
&lt;li&gt;Solve \(Qc = b\) with \(c = Q^Tb\)&lt;/li&gt;
&lt;li&gt;Solve \(Rx = c\) through backward subsituino.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;We get the decomposition as follows:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;We consider first the first column \(a_1 \in \mathbb{R}^m\) of our matrix \(A \in \mathbb{R}^{m \times n}\) and choose \(v^{(1)} = a_1 + \text{sgn}(a_{11}) \|a_1\|e_1\). This corresponds to \(\text{sgn}(a_{11})\) as the sign of the first entry of the column vector \(a_1\) and \(\|a_1\| = \sqrt{a_1^T a_1}\) as the Euclidean norm of \(a_1\). Furthermore, we set \(\text{sgn}(0) := 1\). With the vector \(v^{(1)} \in \mathbb{R}^m\), we determine the Householder matrix \(H^{(1)} \in \mathbb{R}^{m \times m}\), which, when multiplied by a matrix \(A\), which we call \(A^{(1)} = H^{(1)}A \in \mathbb{R}^{m \times n}\), yields a matrix whose first column is a multiple of the unit vector.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;In the next step, we take this matrix \(A^{(1)}\) and strike its first row and column, so that we obtain a smaller submatrix \(A'^{(1)} \in \mathbb{R}^{(m-1) \times (n-1)}\).&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;We now proceed with \(A'^{(1)}\) exactly as we did with \(A\) in Step 1. Explicitly, this means we reflect its first column \(a'_1\) onto a multiple of the first unit vector \(e_1 \in \mathbb{R}^{m-1}\). To do this, we calculate \(v^{(2)} = a'_1 + \text{sgn}(a'_{11}) \|a'_1\|e_1\), and then use this to calculate the \((m-1) \times (m-1)\)-matrix \(H'^{(2)} = E - 2\frac{p^{(2)}(p^{(2)})^T}{\|p^{(2)}\|^2}\). Subsequently, we define our \(m \times m\)-Householder-Matrix \(H^{(2)}\) by
&lt;/p&gt;
$$
H^{(2)} = \begin{pmatrix} 1 &amp; 0 &amp; \dots &amp; 0 \\ 0 &amp; &amp; &amp; \\ \vdots &amp; &amp; H'^{(2)} &amp; \\ 0 &amp; &amp; &amp; \end{pmatrix}
$$&lt;p&gt;
Now we multiply \(H^{(2)}\) from the left by the previously calculated matrix \(A^{(1)}\). The resulting matrix \(A^{(2)} := H^{(2)}A^{(1)}\) now has zeros below the first two entries in its first column.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;To achieve the same for the remaining columns, we next strike both the first and second rows and columns of \(A^{(2)}\) and perform Step 3. for the submatrix \(A'^{(2)} \in \mathbb{R}^{(m-2) \times (n-2)}\) and extend it to the \((m-2) \times (m-2)\)-matrix \(H'^{(2)}\) as
&lt;/p&gt;
$$
H^{(3)} = \begin{pmatrix} 1 &amp; 0 &amp; \dots &amp; 0 \\ 0 &amp; 1 &amp; \dots &amp; 0 \\ \vdots &amp; &amp; H'^{(2)} &amp; \\ 0 &amp; &amp; &amp; \end{pmatrix}
$$&lt;p&gt;
Now we calculate \(A^{(3)} = H^{(3)}A^{(2)}\).&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;This procedure leads us to obtain an upper triangular matrix when we continue until step \(k = \min(m-1, n)\).&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;We start with the first column vector of the matrix&lt;/p&gt;
$$
a_1 =
\begin{pmatrix}
1 \\
1 \\
\sqrt{2}
\end{pmatrix}
$$&lt;p&gt;Next&lt;/p&gt;
$$
||a_1||_2 = \sqrt{1^2 + 1^2 + \sqrt{2}^2} = 2
$$&lt;p&gt;And calculate the Householder vector&lt;/p&gt;
$$
w^1 = a_1 + |a_1|_2 e_1 =
\begin{pmatrix}
1 \\
1 \\
\sqrt{2}
\end{pmatrix} +
2
\begin{pmatrix}
1 \\
0 \\
0
\end{pmatrix} =
\begin{pmatrix}
3 \\
1 \\
\sqrt{2}
\end{pmatrix}
$$&lt;p&gt;We now calculate the matrix \(Q_1\)&lt;/p&gt;
$$
Q_1 = I - 2\frac{w^1 (w^1)^T}{(w^1)^T w^1} =
\begin{pmatrix}
1 &amp; 0 &amp; 0 \\
0 &amp; 1 &amp; 0 \\
0 &amp; 0 &amp; 1
\end{pmatrix} -
\frac{1}{6}
\begin{pmatrix}
9 &amp; 3 &amp; 3\sqrt{2} \\
3 &amp; 1 &amp; \sqrt{2} \\
3\sqrt{2} &amp; \sqrt{2} &amp; 2
\end{pmatrix} =
\begin{pmatrix}
-1/2 &amp; -1/2 &amp; -\sqrt{2}/2 \\
-1/2 &amp; 5/6 &amp; -\sqrt{2}/6 \\
-\sqrt{2}/2 &amp; -\sqrt{2}/6 &amp; 2/3
\end{pmatrix}
$$&lt;p&gt;Finally&lt;/p&gt;
$$
Q_1 \cdot A =
\begin{pmatrix}
-2 &amp; -3 \\
0 &amp; 1/3 \\
0 &amp; -2\sqrt{2}/3
\end{pmatrix}
$$&lt;p&gt;Now we can proceed with the second column. Remember, to do this we need to remove the first column and the first row of \(Q_1 A\), which we just calculated.&lt;/p&gt;
$$
a_2 =
\begin{pmatrix}
1/3 \\
-2\sqrt{2}/3 \\
\end{pmatrix}
$$&lt;p&gt;Again we need to calculate the absolute value of it&lt;/p&gt;
$$
|a_2| = 1
$$&lt;p&gt;Thus we get&lt;/p&gt;
$$
w^2 = a_2 + |a_2| e_1 = a_2 + e_1 =
\begin{pmatrix}
4/3 \\
-2\sqrt{2}/3 \\
\end{pmatrix}
$$&lt;p&gt;We can now calculate \(Q_2\)&lt;/p&gt;
$$
\hat{Q_2} = I_2 - 3/4
\begin{pmatrix}
16/9 &amp; -8 \sqrt{2}/9 \\
-8 \sqrt{2}/9 &amp; 8/9
\end{pmatrix} =
\begin{pmatrix}
-1/3 &amp; -2 \sqrt{2}/3 \\
2 \sqrt{2}/3 &amp; 1/9
\end{pmatrix}
$$&lt;p&gt;Thus our final matrices are&lt;/p&gt;
$$
R = Q_2 Q_1 A =
\begin{pmatrix}
1 &amp; 0 &amp; 0 \\
0 &amp; Q_2 \\
0 &amp;
\end{pmatrix}
\begin{pmatrix}
-2 &amp; -3 \\
0 &amp; 1/3 \\
0 &amp; -2\sqrt{2}/3
\end{pmatrix} =
\begin{pmatrix}
-2 &amp; -3 \\
0 &amp; -1 \\
0 &amp; 0
\end{pmatrix}
$$&lt;p&gt;and&lt;/p&gt;
$$
Q = Q_1 \cdot Q_2
$$
 
&lt;/details&gt;


&lt;h3 id="problem-4-cholesky--and-qr-decompoaition"&gt;Problem 4: Cholesky- and QR-Decompoaition&lt;/h3&gt;
&lt;p&gt;Here&amp;rsquo;s the transcript of the image in English:&lt;/p&gt;
&lt;p&gt;Let \(A \in \mathbb{R}^{N \times N}\) be an unknown matrix with a decomposition \(A = B^T B\) with a known matrix \(B \in \mathbb{R}^{M \times N}\), \(M \ge N\), given.&lt;/p&gt;
&lt;p&gt;a) Determine the property of \(B\) under which \(A\) is symmetric positive definite (spd).&lt;/p&gt;
&lt;p&gt;Let \(A\) be spd in the following.&lt;/p&gt;
&lt;p&gt;b) State the asymptotic complexity to calculate \(A\) and a Cholesky decomposition of \(A\).&lt;/p&gt;
&lt;p&gt;c) Explain how a Cholesky decomposition of \(A\) can be found from a \(QR\)-decomposition of \(B\) without explicitly calculating \(A\).&lt;/p&gt;
&lt;p&gt;d) Determine the asymptotic complexity of the procedure in c) including the calculation of the \(QR\)-decomposition and compare it with the complexity from subtask b). State which procedure you would prefer.&lt;/p&gt;
&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution a)&lt;/summary&gt;
 
 &lt;p&gt;Lets first check symmetry:&lt;/p&gt;
$$
A^T = (B^TB)^T = B^TB = A
$$&lt;p&gt;Lets check definitness:&lt;/p&gt;
$$
x^TAx = x^TB^TBx = (Bx)^TBx = |Bx|_2^2 \geq 0
$$&lt;p&gt;But we need \(x^TAx \ge 0\), thus \(B\) needs to have full rank, because then \(Bx \neq 0\).&lt;/p&gt;

 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution b)&lt;/summary&gt;
 
 &lt;p&gt;&lt;strong&gt;Recap Cholesky Decomposition&lt;/strong&gt;
The prerequisite for Cholesky decomposition to work is that our matrix \(A\) is symmetric and positive definite. The decomposition is then \(A = L \cdot L^T\), with \(L\) a regular lower triangular matrix.&lt;/p&gt;
&lt;p&gt;The idea behind it is as follows:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Calculate Choleksy Decomposition \(A = L L^T\)&lt;/li&gt;
&lt;li&gt;Solve through forward substitution \(Ly = b\)&lt;/li&gt;
&lt;li&gt;Solve through backward substitution \(L^Tx = y\)&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;We get the decomposition as follows \(L=(l_{ik})\):&lt;/p&gt;
$$
l_{ik} =
\begin{cases}
0, &amp;\text{for } i &lt; k \\
\sqrt{a_{kk} - \sum_{j=1}^{k-1} l_{kj}^2}, &amp;\text{for } i = k \\
\frac{1}{l_{kk}} (a_{ik} - \sum_{j=1}^{k-1} l_{ij}l_{kj}), &amp;\text{for } i &gt; k \\
\end{cases}
$$&lt;p&gt;The first case in the formula is for the upper corner of the triangular matrix, which contains only 0 entries.&lt;/p&gt;
&lt;p&gt;The second case is for the diagonal running from the top-left corner to the bottom-right corner. What we do here is take the entry \(a_{kk}\) that lies on the diagonal of matrix \(A\), subtract from it the squared sum of all the entries in the same row (from the current matrix \(L\)), and then take the square root of the result.&lt;/p&gt;
&lt;p&gt;The third case is for all the entries in the lower half of the matrix that are not on the diagonal. Here, we take the current entry \(a_{ik}\) from matrix \(A\), subtract the sum of the products of the corresponding entries that came before it in the same row and column (from matrix \(L\), and divide the result by the diagonal entry \(l_{kk}\) from the current matrix \(L\).&lt;/p&gt;
&lt;p&gt;An example is in order:&lt;/p&gt;
&lt;style&gt;
 .info {
 background-color: #e6f7ff; 
 padding: 15px; 
 border-radius: 5px; 
 margin-bottom: 15px; 
 }

 .info-title {
 font-size: 20px; 
 margin-bottom: 10px; 
 color: #000080; 
 font-weight: bold; 
 }
&lt;/style&gt;
&lt;div class="info"&gt;
 &lt;div class="info-title"&gt;Cholesky Example&lt;/div&gt;
 &lt;p&gt;&lt;p&gt;We have the following Matrix given&lt;/p&gt;
$$
A =
\begin{pmatrix}
4 &amp; 2 &amp; 6 \\
6 &amp; 2 &amp; 5 \\
6 &amp; 5 &amp; 22 \\
\end{pmatrix}
$$&lt;p&gt;We want to calculate its Cholesky decomposition. For this, we simply follow the algorithm as laid out previously:&lt;/p&gt;
$$
\begin{align}
l_{1,1} &amp;= \sqrt{4} = 2 \\
\\
l_{2,1} &amp;= 2/2 \\
l_{2,2} &amp;= \sqrt{2 - 1^2} = 1 \\
\\
l_{3,1} &amp;= 6/2 = 3 \\
l_{3,2} &amp;= (5 - 3 \cdot 1)/1 = 2 \\
l_{3,3} &amp;= \sqrt{22 - 3^3 - 2^2} = \sqrt{9} = 3
\end{align}
$$&lt;p&gt;Thus we get&lt;/p&gt;
$$
L =
\begin{pmatrix}
2 &amp; 0 &amp; 0 \\
1 &amp; 1 &amp; 0 \\
3 &amp; 2 &amp; 3 \\
\end{pmatrix}
$$&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;Matrix \(A\) is symmetric, so we only need to calculate half of the matrix entries. Therefore, we have \(\frac{1}{2}(N^2 + N)\) entries to compute. The \(+N\) comes from the fact that we also need to calculate the diagonal.&lt;/p&gt;
&lt;p&gt;For each entry, we need to compute a factored sum of \(M\) terms, so in total we have \((N^2 + N) \cdot M\) operations.&lt;/p&gt;
&lt;p&gt;For the Cholesky decomposition itself, we need \(\frac{1}{6}N^3\) operations.&lt;/p&gt;
&lt;p&gt;Thus, in total, to perform the computation we need:&lt;/p&gt;
$$
N^2 \left(M + \frac{1}{3}N \right) + N \cdot M
$$&lt;p&gt;operations.&lt;/p&gt;

 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution c)&lt;/summary&gt;
 
 &lt;p&gt;So we have \(B = QR\), with \(Q\) being orthogonal, and we want a Cholesky decomposition \(A = LL^T\).&lt;/p&gt;
&lt;p&gt;Thus:&lt;/p&gt;
$$
A = B^T B = (QR)^T QR = R^T Q^T Q R = R^T R
$$&lt;p&gt;where \(R = \begin{pmatrix} \hat{R} \\ 0 \end{pmatrix}\), and \(\hat{R}\) is an upper triangular matrix.&lt;/p&gt;
&lt;p&gt;Hence, we can set \(L = \hat{R}^T\) to obtain a Cholesky decomposition from a QR decomposition.&lt;/p&gt;

 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution d)&lt;/summary&gt;
 
 &lt;p&gt;The complexity of (b) is \(N^2(M + \frac{1}{3}N)\).&lt;/p&gt;
&lt;p&gt;The complexity of QR-Algorithm is \(2N^2(M - \frac{1}{3}N)\)&lt;/p&gt;
&lt;p&gt;Now in the case of (c), if \(N &lt; M\) then the complexity is approximately the same. But if \(M &gt;&gt; N\) then QR is much more expensive.&lt;/p&gt;

 
&lt;/details&gt;


&lt;h3 id="problem-5-cholesky-decomposition"&gt;Problem 5: Cholesky-Decomposition&lt;/h3&gt;
&lt;p&gt;Let \(\alpha, \beta \in \mathbb{R}\) and&lt;/p&gt;
$$A = \begin{pmatrix} \alpha &amp; \beta \\ \beta &amp; 1 \end{pmatrix}$$&lt;p&gt;Determine for which \(\alpha\) the matrix \(A\) is &lt;strong&gt;positive definite&lt;/strong&gt; and derive its &lt;strong&gt;Cholesky decomposition&lt;/strong&gt; \(A = LL^T\). Investigate the &lt;strong&gt;stability&lt;/strong&gt; of solving the system of equations \(Ax = b\) for a \(b \in \mathbb{R}^2\) using the Cholesky decomposition with respect to the \(\|\cdot\|_1\) norm.&lt;/p&gt;
&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution&lt;/summary&gt;
 
 &lt;p&gt;First we determine positive definitness:&lt;/p&gt;
$$
\begin{align}
det_1(A) &amp;= \alpha &gt;^! 0 \\
det(A) &amp;= \alpha - \beta^2 &gt;^! 0 \implies \alpha &gt;^! \beta^2
\end{align}
$$&lt;p&gt;From this follows for A to be positive definite \(\alpha &gt; 0\) and \(\alpha &gt; \beta^2\).&lt;/p&gt;
&lt;p&gt;We are now doing with this a cholesky decompotion, that means \(A = LL^T\) with \(L\) a lower triangular matrix.&lt;/p&gt;
$$
A =
LL^T =
\begin{pmatrix}
a &amp; 0 \\
b &amp; c
\end{pmatrix}
\begin{pmatrix}
a &amp; b \\
0 &amp; c
\end{pmatrix} =
\begin{pmatrix}
a^2 &amp; ab \\
ab &amp; b^2 + c^2
\end{pmatrix}
$$&lt;p&gt;From this follows&lt;/p&gt;
$$
a = \sqrt{\alpha}
b = \beta/\sqrt{\alpha}
b^2 + c^2 = 1 \implies c = \sqrt{1 - b^2} = \sqrt{1 - \beta^2/\alpha}
$$&lt;p&gt;Next we want to investigate the stabiltiy, for this we need the inverse:&lt;/p&gt;
$$
A^{-1} = \frac{1}{\alpha-\beta^2}
\begin{pmatrix}
1 &amp; -\beta \\
-\alpha &amp; \beta
\end{pmatrix}
\quad
L^{-1} = \frac{1}{\sqrt{\alpha - \beta^2}}
\begin{pmatrix}
\sqrt{1 - \beta^2/\alpha} &amp; 0 \\
-\beta/\sqrt{\alpha} &amp; \sqrt{\alpha}
\end{pmatrix}
$$&lt;p&gt;With this we can calculate the condition of both matrices to see if using cholesky decomposition introduces additional errors&lt;/p&gt;
$$
\begin{align}
K_1(A) &amp;= ||A||_1 ||A^{-1}||_1 \\
&amp;= (\max\{1, \ \alpha\} + |b|)(\frac{1}{(\alpha - \beta)^2}\max\{\alpha, \ 1\} + |b|) \\
&amp;= \frac{1}{(\alpha - \beta)^2} (\max\{\alpha, \ 1\} + |b|)^2
\end{align}
$$&lt;p&gt;and&lt;/p&gt;
$$
\begin{align}
K_1(L)^2 &amp;= (||L||_1 ||L^{-1}||_1)^2 \\
&amp;= ((\max\{\sqrt{\alpha} + \beta/\alpha, \ \sqrt{1 - \beta^2/\alpha}\})(\frac{1}{\sqrt{\alpha - \beta^2}}\max\{\sqrt{\alpha}, \ |\beta|/\sqrt{\alpha} + \sqrt{1-\beta^2/\alpha}\}))^2 \\
&amp;= \frac{1}{\alpha - \beta^2} \max\{\sqrt{\alpha} + |\beta|/\sqrt{\alpha}, \ \sqrt{1 - \beta^2 / \alpha}\}^2 \cdot \max\{\alpha, \ |\beta|/\sqrt{\alpha} + \sqrt{1 - \beta^2/\alpha}\}^2
\end{align}
$$
 
&lt;/details&gt;


&lt;h3 id="problem-6-hadamard-approximation"&gt;Problem 6: Hadamard Approximation&lt;/h3&gt;
&lt;p&gt;Let \(A \in \mathbb{R}^{N \times N}\) be regular and let \(a_1, \ldots, a_N \in \mathbb{R}^N\) be the columns of \(A\). Show, using the QR-decomposition, Hadamard&amp;rsquo;s inequality:&lt;/p&gt;
$$|\det A| \leq \prod_{n=1}^{N} \|a_n\|_2$$&lt;p&gt;&lt;strong&gt;Hint:&lt;/strong&gt; Show that \(\|a_n\|_2 = \|r_{nn}\|_2\), where \(r_{nn}\) are the diagonal elements of \(R\) with index \(n = 1, \ldots, N\).&lt;/p&gt;
&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution&lt;/summary&gt;
 
 &lt;p&gt;We can rewrite \(det(A)\) using the QR-Decomposition&lt;/p&gt;
$$
\begin{align}
|det(A)| &amp;= |det(QR)| = |det(Q)det(R)| \\
&amp;= |det(Q)||det(R)| = |det(R)| \\
&amp;= \prod_{n=1}^{N} |r_{nn}|
\end{align}
$$&lt;p&gt;Further&lt;/p&gt;
$$
|a_n|_2 = |Ae_n|_2 = |QRe_n|_2 = |Q||Re_n|_2 = |r_n|_2
$$&lt;p&gt;and because \(|r_{nn}| \leq |r_n|_2 \), we have our result.&lt;/p&gt;

 
&lt;/details&gt;


&lt;h3 id="problem-7-qr-decomposition-and-lgs"&gt;Problem 7: QR-Decomposition and LGS&lt;/h3&gt;
&lt;p&gt;Let \(A \in \mathbb{R}^{N \times N}\) be regular and \(\mathbf{b} \in \mathbb{R}^N\). Explain how the linear system of equations \(A\mathbf{x} = \mathbf{b}\) can be solved using the QR-decomposition. Furthermore, state the asymptotic cost of all steps. Examine the procedure for stability with respect to \(\|\cdot\|_2\).&lt;/p&gt;
&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution&lt;/summary&gt;
 
 &lt;p&gt;Solving LGS using QR-Decomposition&lt;/p&gt;
$$
Ax = b \iff QRx = b \iff Rx = Q^Tb
$$&lt;p&gt;Hence&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Calculate QR- Decomposition, Complexity: \(O(N^3)\).&lt;/li&gt;
&lt;li&gt;Calculate \(Q^Tb\), Complexity: \(O(N^2)\)&lt;/li&gt;
&lt;li&gt;Backward subsituion \(Rx = Q^Tb\). Complexity \(O(N^2)\)&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Total Complexity: \(O(N^3)\)&lt;/p&gt;
&lt;p&gt;For the stability/condition: \(K_2(A) = K_2(QR) = K_2(Q)K_2(R)\). Hence the QR -decomposition is stable.&lt;/p&gt;

 
&lt;/details&gt;


&lt;h3 id="problem-8-linear-least-squares-problem"&gt;Problem 8: Linear Least Squares Problem&lt;/h3&gt;
&lt;p&gt;To determine the location of a mobile phone, the directions from which a signal is measured are determined from five transmitting masts. The positions of the transmitting masts in an \((x,y)\)-coordinate system are:&lt;/p&gt;
$$
\begin{array}{|c|c|c|c|c|c|}
\hline
\textbf{Transmitting Mast} &amp; \textbf{M1} &amp; \textbf{M2} &amp; \textbf{M3} &amp; \textbf{M4} &amp; \textbf{M5} \\
\hline
x-Coordinate &amp; 8 &amp; 22 &amp; 36 &amp; 10 &amp; 13 \\
\hline
y-Coordinate &amp; 0 &amp; 7 &amp; 18 &amp; 20 &amp; 10 \\
\hline
\tan \alpha &amp; 1 &amp; -1/2 &amp; 1/2 &amp; -1 &amp; 0 \\
\hline
\end{array}
$$&lt;p&gt;Here, \(\alpha\) is measured in the mathematically positive sense from the positive \(x\)-axis. Find the position of the mobile phone by formulating a linear least squares problem and then solving it. Explicitly state all defining quantities of the linear least squares problem.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Hint: Solve the normal equation to solve the least squares problem.&lt;/em&gt;&lt;/p&gt;
&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution&lt;/summary&gt;
 
 &lt;p&gt;Every transmission mast and its mobile phone together build a line, where the slope of the line is \(m_i = \tan(\alpha)\). For the slope we also have \(m_i = \frac{y - y_i}{x - x_i}\).
The \(x_i, y_i\) we have given, but the \(x, y\) not, we thus want to rewrite it in such a way that the unknown variables are on one side. Hence&lt;/p&gt;
$$
m_i = \frac{y - y_i}{x - x_i} \iff
m_i(x−x_i)=y−yi \iff
m_i x - y = m_i x_i - y_i \iff
m_i x_i - y_i =: b = m_i x - y
$$&lt;p&gt;With this we can now calculate \(b\)&lt;/p&gt;
$$
1 \cdot 8 - 0 = 8 \\
-1/2 \cdot 22 - 7 = -18 \\
1/2 \cdot 36 - 18 = 0 \\
-1 \cdot 10 - 20 = -30 \\
0 \cdot 13 - 10 = -10 \\
$$&lt;p&gt;and our \(A\) matrix we get from \(m_i x - 1 \cdot y\), thus&lt;/p&gt;
$$
A =
\begin{pmatrix}
1 &amp; -1 \\
-1/2 &amp; -1 \\
1/2 &amp; -1 \\
-1 &amp; -1 \\
0 &amp; -1
\end{pmatrix},
\qquad
b =
\begin{pmatrix}
8 \\
-18 \\
0 \\
-30 \\
-10
\end{pmatrix}
$$&lt;p&gt;The least quare problem is now&lt;/p&gt;
$$
||Ax - b ||_2 = min!
$$&lt;p&gt;We can now solve this problem using the normal equation \(A^TAx = A^Tb\):&lt;/p&gt;
$$
A^TA =
\begin{pmatrix}
5/2 &amp; 0 \\
0 &amp; 5
\end{pmatrix}, \qquad
A^Tb =
\begin{pmatrix}
47 \\
50
\end{pmatrix}
$$&lt;p&gt;Hence&lt;/p&gt;
$$
(x,y)^T = A^TA \dot A^Tb =
\begin{pmatrix}
94/5 \\
10
\end{pmatrix}
$$
 
&lt;/details&gt;


&lt;h3 id="problem-9-householder-vs-givens"&gt;Problem 9: Householder vs. Givens&lt;/h3&gt;
&lt;p&gt;Given the matrix&lt;/p&gt;
$$A = \begin{pmatrix} 3 &amp; 0 &amp; 0 &amp; 4 &amp; 0 \\ 0 &amp; 8 &amp; 0 &amp; 0 &amp; 0 \\ 0 &amp; 0 &amp; 12 &amp; 0 &amp; 5 \\ 4 &amp; 0 &amp; 0 &amp; 24 &amp; 0 \\ 0 &amp; 0 &amp; 5 &amp; 0 &amp; 9 \end{pmatrix}$$&lt;p&gt;a) Determine a QR-decomposition of \(A\) using Householder transformations.&lt;/p&gt;
&lt;p&gt;b) Determine a QR-decomposition of \(A\) using Givens rotations.&lt;/p&gt;
&lt;p&gt;c) Explain which of the two methods you would prefer for matrix \(A\) or a general matrix \(B \in \mathbb{R}^{N \times N}\).&lt;/p&gt;
&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution a)&lt;/summary&gt;
 
 &lt;p&gt;We start with&lt;/p&gt;
$$
a_1 =
\begin{pmatrix}
3 \\
0 \\
0 \\
4 \\
0
\end{pmatrix}, \quad
|a_1|_2 = \sqrt{25} = 5
$$&lt;p&gt;and&lt;/p&gt;
$$
w_1 = a_1 + |a_1|e_1 =
\begin{pmatrix}
8 \\
0 \\
0 \\
4 \\
0
\end{pmatrix}, \quad
|w_1|_2^2 = 80
$$&lt;p&gt;With this we can calculate \(Q_1 = I - \frac{2}{|w_1|_2^2} \cdot w_1w_1^T\). Hence&lt;/p&gt;
$$
Q_1 =
\begin{pmatrix}
1 &amp; 0 &amp; 0 &amp; 0 &amp; 0 \\
0 &amp; 1 &amp; 0 &amp; 0 &amp; 0 \\
0 &amp; 0 &amp; 1 &amp; 0 &amp; 0 \\
0 &amp; 0 &amp; 0 &amp; 1 &amp; 0 \\
0 &amp; 0 &amp; 0 &amp; 0 &amp; 1 \\
\end{pmatrix} -
\frac{1}{40}
\begin{pmatrix}
64 &amp; 0 &amp; 0 &amp; 32 &amp; 0 \\
0 &amp; 0 &amp; 0 &amp; 0 &amp; 0 \\
0 &amp; 0 &amp; 0 &amp; 0 &amp; 0 \\
32 &amp; 0 &amp; 0 &amp; 16 &amp; 0 \\
0 &amp; 0 &amp; 0 &amp; 0 &amp; 0 \\
\end{pmatrix} =
\frac{1}{40}
\begin{pmatrix}
-24 &amp; 0 &amp; 0 &amp; -32 &amp; 0 \\
0 &amp; 40 &amp; 0 &amp; 0 &amp; 0 \\
0 &amp; 0 &amp; 40 &amp; 0 &amp; 0 \\
-32 &amp; 0 &amp; 0 &amp; 24 &amp; 0 \\
0 &amp; 0 &amp; 0 &amp; 0 &amp; 40 \\
\end{pmatrix}
$$&lt;p&gt;From this we get&lt;/p&gt;
$$
Q_1 \cdot A =
\begin{pmatrix}
-5 &amp; 0 &amp; 0 &amp; -108/5 &amp; 0 \\
0 &amp; 8 &amp; 0 &amp; 0 &amp; 0 \\
0 &amp; 0 &amp; 12 &amp; 0 &amp; 5 \\
0 &amp; 0 &amp; 0 &amp; 56/5 &amp; 0 \\
0 &amp; 0 &amp; 5 &amp; 0 &amp; 9 \\
\end{pmatrix}
$$&lt;p&gt;The column \(a_2\) is already in the correct form. Thus we can continue with&lt;/p&gt;
$$
\hat{a}_3 =
\begin{pmatrix}
12 \\
0 \\
5
\end{pmatrix}, \quad
|\hat{a}_3|_2 = \sqrt{169} = 13
$$&lt;p&gt;Thus&lt;/p&gt;
$$
w_3 = \hat{a}_3 + |\hat{a}_3|_2 e_1
\begin{pmatrix}
25 \\
0 \\
5
\end{pmatrix}, \quad
|w_3|_2^2 = 650
$$&lt;p&gt;With this we claulcate \(Q_2 = I - \frac{2}{|w_3|_2^2} \cdot w_3w_3^T\). Hence&lt;/p&gt;
$$
Q_2 =
\begin{pmatrix}
1 &amp; 0 &amp; 0 &amp; 0 &amp; 0 \\
0 &amp; 1 &amp; 0 &amp; 0 &amp; 0 \\
0 &amp; 0 &amp; 1 &amp; 0 &amp; 0 \\
0 &amp; 0 &amp; 0 &amp; 1 &amp; 0 \\
0 &amp; 0 &amp; 0 &amp; 0 &amp; 1 \\
\end{pmatrix} -
\frac{1}{325}
\begin{pmatrix}
0 &amp; 0 &amp; 0 &amp; 0 &amp; 0 \\
0 &amp; 0 &amp; 0 &amp; 0 &amp; 0 \\
0 &amp; 0 &amp; 625 &amp; 0 &amp; 125 \\
0 &amp; 0 &amp; 0 &amp; 0 &amp; 0 \\
0 &amp; 0 &amp; 125 &amp; 0 &amp; 25 \\
\end{pmatrix} =
\frac{1}{325}
\begin{pmatrix}
325 &amp; 0 &amp; 0 &amp; 0 &amp; 0 \\
0 &amp; 325 &amp; 0 &amp; 0 &amp; 0 \\
0 &amp; 0 &amp; -300 &amp; 0 &amp; -125 \\
0 &amp; 0 &amp; 0 &amp; 325 &amp; 0 \\
0 &amp; 0 &amp; -125 &amp; 0 &amp; 300 \\
\end{pmatrix}
$$&lt;p&gt;And with that we finally have&lt;/p&gt;
$$
R = Q_2 \cdot Q_1 A =
\begin{pmatrix}
-5 &amp; 0 &amp; 0 &amp; -108/5 &amp; 0 \\
0 &amp; 8 &amp; 0 &amp; 0 &amp; 0 \\
0 &amp; 0 &amp; -13 &amp; 0 &amp; -105/14 \\
0 &amp; 0 &amp; 0 &amp; 56.5 &amp; 0 \\
0 &amp; 0 &amp; 0 &amp; 0 &amp; 83/13 \\
\end{pmatrix}
$$
 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution b)&lt;/summary&gt;
 
 &lt;style&gt;
 .info {
 background-color: #e6f7ff; 
 padding: 15px; 
 border-radius: 5px; 
 margin-bottom: 15px; 
 }

 .info-title {
 font-size: 20px; 
 margin-bottom: 10px; 
 color: #000080; 
 font-weight: bold; 
 }
&lt;/style&gt;
&lt;div class="info"&gt;
 &lt;div class="info-title"&gt;Info&lt;/div&gt;
 &lt;p&gt;&lt;p&gt;A Given rotation is defined as&lt;/p&gt;
$$
\begin{pmatrix}
c &amp; s \\
-s &amp; c
\end{pmatrix}, \quad c^2 + s^2 = 1
$$&lt;p&gt;We calculate its value as follows:&lt;/p&gt;
&lt;p&gt;If \(|x_n| &gt; |x_m|\) then \(\tau = x_m/x_n = c/s\) and \(s = \sqrt{\frac{1}{ 1+ \tau^2}}\) and \(c = \tau s\)&lt;/p&gt;
&lt;p&gt;If \(|x_n| =&lt; |x_m|\) then \(\tau = x_n/x_m = s/c\) and \(c = \sqrt{\frac{1}{ 1+ \tau^2}}\) and \(s = \tau s\)&lt;/p&gt;
&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;We calculate&lt;/p&gt;
$$
\tau_1 = \frac{4}{3}, \quad c_1 169= \sqrt{\frac{1}{1 + 16/9}} = \sqrt{9/25}=3/5, \quad s_1 = \frac{4}{5}
$$&lt;p&gt;And with that we get&lt;/p&gt;
$$
Q_1 \cdot A =
\begin{pmatrix}
3/5 &amp; 0 &amp; 0 &amp; 4/5 &amp; 0 \\
0 &amp; 1 &amp; 0 &amp; 0 &amp; 0 \\
0 &amp; 0 &amp; 1 &amp; 0 &amp; 0 \\
-4/5 &amp; 0 &amp; 0 &amp; 3/5 &amp; 0 \\
0 &amp; 0 &amp; 0 &amp; 0 &amp; 1 \\
\end{pmatrix} \cdot A =169
\begin{pmatrix}
-5 &amp; 0 &amp; 0 &amp; -108/5 &amp; 0 \\
0 &amp; 8 &amp; 0 &amp; 0 &amp; 0 \\
0 &amp; 0 &amp; 12 &amp; 0 &amp; 5 \\
0 &amp; 0 &amp; 0 &amp; 56/5 &amp; 0 \\
0 &amp; 0 &amp; 5 &amp; 0 &amp; 9 \\
\end{pmatrix}
$$&lt;p&gt;We then calculate&lt;/p&gt;
$$
\tau_2 = \frac{12}{5}, \quad s_2 = \sqrt{\frac{1}{1 + 144/25}} =5/13, \quad s_1 = \frac{12}{13}
$$&lt;p&gt;And thus get&lt;/p&gt;
$$
R = Q_2 \cdot Q_1A =
\begin{pmatrix}
1 &amp; 0 &amp; 0 &amp; 0 &amp; 0 \\
0 &amp; 1 &amp; 0 &amp; 0 &amp; 0 \\
0 &amp; 0 &amp; 12/13 &amp; 0 &amp; 5/13 \\
0 &amp; 0 &amp; 0 &amp; 1 &amp; 0 \\
0 &amp; 0 &amp; -5/13 &amp; 0 &amp; 12/13 \\
\end{pmatrix}
\begin{pmatrix}
-5 &amp; 0 &amp; 0 &amp; -108/5 &amp; 0 \\
0 &amp; 8 &amp; 0 &amp; 0 &amp; 0 \\
0 &amp; 0 &amp; 12 &amp; 0 &amp; 5 \\
0 &amp; 0 &amp; 0 &amp; 56/5 &amp; 0 \\
0 &amp; 0 &amp; 5 &amp; 0 &amp; 9 \\
\end{pmatrix}
$$
 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution c)&lt;/summary&gt;
 
 &lt;p&gt;For \(A\) the Givens method is better as we need less Operation than with Householder.&lt;/p&gt;
&lt;p&gt;For \(B\) the Householder method is better as we need less Operation than with Givens method.&lt;/p&gt;
&lt;p&gt;It depens on how many entries the matrix has, what is better, the more netries the matrix has the better is Householder.&lt;/p&gt;

 
&lt;/details&gt;


&lt;h3 id="problem-10-singular-value-decomposition"&gt;Problem 10: Singular Value Decomposition&lt;/h3&gt;
&lt;p&gt;Let \(A \in \mathbb{R}^{M \times N}\) be a matrix with rank \((A) = R \ne N\) and the singular value decomposition \(A = V \Sigma U^T\) (with singular values \(\sigma_1 \ge \sigma_2 \ge \dots \ge \sigma_R &gt; \sigma_{R+1} = \dots = \sigma_N = 0\) and \(b \in \mathbb{R}^M\). We define&lt;/p&gt;
$$\Sigma_k = \text{diag}(\sigma_1, \dots, \sigma_k) \in \mathbb{R}^{k \times k},$$&lt;p&gt;
&lt;/p&gt;
$$A_k = V \begin{pmatrix} \Sigma_k &amp; 0 \\ 0 &amp; 0 \end{pmatrix} U^T = \sum_{r=1}^k \sigma_r v^r (u^r)^T.$$&lt;p&gt;Since \(A\) does not have full rank, the linear least squares problem (LAP)&lt;/p&gt;
$$|Ax - b|_2 = \min!$$&lt;p&gt;has infinitely many solutions (compare script). We further define&lt;/p&gt;
$$x^k = A_k^\dagger b, \quad x^* = x^R, \quad A_k^\dagger = U \begin{pmatrix} \Sigma_k^{-1} &amp; 0 \\ 0 &amp; 0 \end{pmatrix} V^T \in \mathbb{R}^{N \times M},$$&lt;p&gt;
&lt;/p&gt;
$$r^k = b - Ax^k, \quad \Sigma_k^{-1} = \text{diag}(1/\sigma_1, \dots, 1/\sigma_k) \in \mathbb{R}^{k \times k}.$$&lt;p&gt;In the task, it is to be shown that the solution to (LAP) given by \(x^*\) and \(x^k\) approximates the solution by minimal Euclidean norm. It is known from the lecture that \(x^*\) is a solution to (LAP). Now show that&lt;/p&gt;
&lt;p&gt;a) It holds that \(x^k = \sum_{r=1}^k \frac{1}{\sigma_r} (b^T v^r) u^r\).&lt;/p&gt;
&lt;p&gt;b) Determine \(|x^k|_2^2\).&lt;/p&gt;
&lt;p&gt;c) For arbitrary \(k \le l \le R\) it holds that \(|r^k|_2^2 \ge |r^l|_2^2\) and \(|x^k|_2^2 \le |x^l|_2^2\).&lt;/p&gt;
&lt;p&gt;d) For all other solutions \(x\) of (LAP) it holds that \(|x|_2 \ge |x^*|_2\).&lt;/p&gt;
&lt;p&gt;Hint: Represent \(x\) in the form \(x = \sum_{n=1}^N u^n \alpha_n\), where \(u^{R+1}\) to \(u^N\) form an orthonormal basis for the kernel of \(A\).&lt;/p&gt;
&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution a)&lt;/summary&gt;
 
 $$
\begin{align}
x^k = A_k^\dagger b
&amp;=U \sigma_k V^T b \\
&amp;=U \sigma \sum_{m=1}^{R} (v^{m})^T b \\
&amp;=U \text{diag}(1/\sigma_1, \dots, 1/\sigma_k) \sum_{r=1}^{R} (v^{r})^T b \\
&amp;=U \sum_{r=1}^{R} (1/\sigma_r) (v^{r})^T b \\
&amp;=\sum_{r=1}^{R} (1/\sigma_r) (v^{r})^T b u^m \\
\end{align}
$$
 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution b)&lt;/summary&gt;
 
 $$
\begin{align}
|r^k|_2^2 &amp;= |b - Ax^k|_2^2 = |b - A A_k^\dagger b| \\
&amp;= |b - V\sigma_kU^TU\sigma_k^{-1}V^Tb| \\
&amp;=|b - V\sigma_k\sigma_k^{-1}V^Tb| \\
&amp;=|b - V\begin{pmatrix} I &amp; 0 \\ 0 &amp; 0 \end{pmatrix}V^Tb| \\
&amp;=|(I - V\begin{pmatrix} I &amp; 0 \\ 0 &amp; 0 \end{pmatrix})V^T)b| \\
&amp;=|(VIV^T - V\begin{pmatrix} I &amp; 0 \\ 0 &amp; 0 \end{pmatrix})V^T)b| \\
&amp;=|V(I - \begin{pmatrix} I &amp; 0 \\ 0 &amp; 0 \end{pmatrix}))V^Tb|\\
 &amp;=^{\text{V doesnt change length}} |V(\begin{pmatrix} 0 &amp; 0 \\ 0 &amp; I \end{pmatrix}))V^Tb| \\
&amp;= |\begin{pmatrix} 0 &amp; 0 \\ 0 &amp; I \end{pmatrix})V^Tb| \\
&amp;=|V^Tb : {u+ 1 : R}|
\end{align}
$$
 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution c)&lt;/summary&gt;
 
 &lt;p&gt;For \(k = l\) the statement is trivially true.&lt;/p&gt;
&lt;p&gt;Let \(k &lt; l\)&lt;/p&gt;
$$
|r^k|_2^2 - |r^l|_2^2 =^{(b)} |V^Tb : {u+ 1 : R}|_2^2 &gt; 0 \implies |r^k|_2^2 &gt; |r^l|_2^2
$$$$
|x^k|_2^2 - |x^l|_2^2 =^{(a)} - |\sum 1/\sigma (v^r)^Tbu^r| &lt; 0 \implies |x^k|_2^2 &lt; |x^l|_2^2
$$
 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution d)&lt;/summary&gt;
 
 Nope
 
&lt;/details&gt;


&lt;h3 id="problem-11-qr-algorithm-and-inverse-iteration"&gt;Problem 11: QR-Algorithm and Inverse Iteration&lt;/h3&gt;
&lt;p&gt;Given the matrix&lt;/p&gt;
$$
A =
\begin{pmatrix}
8 &amp; \frac{12}{5} &amp; -\frac{9}{5} \\
\frac{12}{5} &amp; \frac{109}{25} &amp; \frac{12}{25} \\
-\frac{9}{5} &amp; \frac{12}{25} &amp; \frac{116}{25}
\end{pmatrix}
$$&lt;p&gt;In this Problem the task is to calculate the Eigenvalues of \(A\).&lt;/p&gt;
&lt;p&gt;a) Transform \(A\) into a Hessian-Matrix.&lt;/p&gt;
&lt;p&gt;b) Do the first step of the \(QR\)-Iteration with Shift.&lt;/p&gt;
&lt;p&gt;c) Do the next Step of the inverse Iteration with Shift with the starting value \(v^0 = e^3\) and \(v^0 = e^2\).&lt;/p&gt;
&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution a)&lt;/summary&gt;
 
 &lt;p&gt;First thing to notice is that \(A\) is symmetrical, thus all Eigenvalues are real and \(H\) is tridiagonal.&lt;/p&gt;
&lt;p&gt;To transform our matrix we can use N-2 householder transformations.&lt;/p&gt;
&lt;p&gt;Hence we start with the first column&lt;/p&gt;
$$
v_1 =
\begin{pmatrix}
\frac{12}{5} \\
-\frac{9}{5}
\end{pmatrix}, \quad
|v_1|_2 = \sqrt{144/25 + 81/25} = 15/5 = 3
$$&lt;p&gt;and&lt;/p&gt;
$$
a_1 = v_1 + |v_1|e_1 =
\begin{pmatrix}
\frac{27}{5} \\
-\frac{9}{5}
\end{pmatrix}, \quad
|a_1|_2^2 = 810/25
$$&lt;p&gt;With this we can calculate \(Q = I - \frac{2}{|a_1|_2^2 a_1a_1^T}\). Hence&lt;/p&gt;
$$
Q =
\begin{pmatrix}
1 &amp; 0 &amp; 0 \\
0 &amp; 1 &amp; 0 \\
0 &amp; 0 &amp; 1
\end{pmatrix} -
\frac{2}{810}
\begin{pmatrix}
0 &amp; 0 &amp; 0 \\
0 &amp; 729 &amp; -243 \\
0 &amp; -243 &amp; 81
\end{pmatrix} =
\frac{1}{405}
\begin{pmatrix}
405 &amp; 0 &amp; 0 \\
0 &amp; -324 &amp; 243 \\
0 &amp; 242 &amp; 324
\end{pmatrix}
$$&lt;p&gt;We can now calculate the Hessian matrix as follows&lt;/p&gt;
$$
H = QAQ =
\begin{pmatrix}
8 &amp; -3 &amp; 0 \\
-3 &amp; 4 &amp; 0 \\
0 &amp; 0 &amp; 5
\end{pmatrix}
$$
 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution b)&lt;/summary&gt;
 
 &lt;style&gt;
 .info {
 background-color: #e6f7ff; 
 padding: 15px; 
 border-radius: 5px; 
 margin-bottom: 15px; 
 }

 .info-title {
 font-size: 20px; 
 margin-bottom: 10px; 
 color: #000080; 
 font-weight: bold; 
 }
&lt;/style&gt;
&lt;div class="info"&gt;
 &lt;div class="info-title"&gt;Info&lt;/div&gt;
 &lt;p&gt;&lt;p&gt;The &lt;em&gt;simple QR-Algorithm&lt;/em&gt; to find out the Eigenvalue works as follows:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Set \(A_0 = A\) and \(k = 0\)&lt;/li&gt;
&lt;li&gt;Decompose \(A_k = Q_kR_k\) (QR-Decompostiton)&lt;/li&gt;
&lt;li&gt;Calculate \(A_{k+1} = R_kQ_k\)&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;To increase convergence speed, we can use shifts:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Set \(H-0 = H\) and \(k=0\)&lt;/li&gt;
&lt;li&gt;Decompose \(H_k - \mu_k I_N = Q_kR_k\)&lt;/li&gt;
&lt;li&gt;Calculate \(H_{k+1} = R_kQ_k + \mu I_n\) increase \(k\) by \(1\) and go to step 2.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;With \(\mu = h^k_{n,n-1}\) if \(\leq \epsilon\) else \(\mu = h^k_{n-1,n-1}\). If \(n=1\) the algorithm stops.&lt;/p&gt;
&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;Because we have not many entries in our matrix we can use the Givens transformation, see Problem 9c), for the QR-Decomposition.&lt;/p&gt;
&lt;p&gt;In task (a) we already did Step 1.&lt;/p&gt;
&lt;p&gt;Because \(h_{3,2} = 0\) we use \(\mu = h_{2,2} = 4\). We Now compute \(H_k - \mu I_n\)&lt;/p&gt;
$$
H_0 - 4 I_3 =
\begin{pmatrix}
4 &amp; -3 &amp; 0 \\
-3 &amp; 0 &amp; 0 \\
0 &amp; 0 &amp; 1
\end{pmatrix}
$$&lt;p&gt;We now use Givens rotation to calculate QR-Decomposition. Because \(c = 4 &gt; -3 = s\) we get \(\tau=s/c\), hence&lt;/p&gt;
$$
\tau = -3/4, \quad c = \sqrt{\frac{1}{1+ \tau^2}} = \frac{4}{5}, \quad s = \tau \cdot c = -\frac{3}{5}
$$&lt;p&gt;With this we get&lt;/p&gt;
$$
Q =
\begin{pmatrix}
c &amp; s &amp; 0 \\
-s &amp; c &amp; 0 \\
0 &amp; 0 &amp; 1
\end{pmatrix} =
\begin{pmatrix}
4/5 &amp; -3/5 &amp; 0 \\
3/5 &amp; 4/5 &amp; 0 \\
0 &amp; 0 &amp; 1
\end{pmatrix}
$$&lt;p&gt;We now need to compute \(R\)&lt;/p&gt;
$$
R = Q \cdot (H_0 - 4 I_3) =
\begin{pmatrix}
5 &amp; -12/5 &amp; 0 \\
0 &amp; -9/5 &amp; 0 \\
0 &amp; 0 &amp; 1
\end{pmatrix}
$$&lt;p&gt;And can now do Step 3 \(H_{k+1} = R_kQ_k + \mu I_n\)&lt;/p&gt;
$$
H_2 =
\begin{pmatrix}
136/25 &amp; 27/25 &amp; 0 \\
27/25 &amp; -36/25 &amp; 0 \\
0 &amp; 0 &amp; 1
\end{pmatrix} + \mu I_3 =
\begin{pmatrix}
236/25 &amp; 27/25 &amp; 0 \\
27/25 &amp; 64/25 &amp; 0 \\
0 &amp; 0 &amp; 1
\end{pmatrix}
$$&lt;p&gt;With this we are finished, as we reached \(n=1\), see stop criteria.&lt;/p&gt;
&lt;p&gt;Our eigenvalues are \(64/25=2.56\) and (27=25=1.08).&lt;/p&gt;

 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution c)&lt;/summary&gt;
 
 &lt;style&gt;
 .info {
 background-color: #e6f7ff; 
 padding: 15px; 
 border-radius: 5px; 
 margin-bottom: 15px; 
 }

 .info-title {
 font-size: 20px; 
 margin-bottom: 10px; 
 color: #000080; 
 font-weight: bold; 
 }
&lt;/style&gt;
&lt;div class="info"&gt;
 &lt;div class="info-title"&gt;Info&lt;/div&gt;
 &lt;p&gt;&lt;p&gt;Algorithm &lt;em&gt;Inverse Iteration with Shift&lt;/em&gt; for Eigenvalue calculation&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Choose \(v^0 \in \mathbb{R}^n\) with \(|v^0| = 1\), set \(k=0\), choose \(\epsilon &gt; 0\)&lt;/li&gt;
&lt;li&gt;\(\mu_k = r(A, v^k) = \frac{(v^k)^TAv^k}{v^k)^TV^k}\) and if \(|Av^k - \mu v^k| &lt; \epsilon\) then Stop&lt;/li&gt;
&lt;li&gt;\(w^k = (A - \mu_k I_v)^{-1}v^k\) and \(v^{k+1} = w^k/|w^k|\)&lt;/li&gt;
&lt;li&gt;\(k \to k+1\) and go to Step 2&lt;/li&gt;
&lt;/ol&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;Our start vector is \(v^0 = e^3 = (0,0,1)^T\). Hence in Step 1&lt;/p&gt;
$$
\mu_1 = r(H, v^0) = \frac{(e^3)^THe^3}{(e^3)^Te^3} = \frac{5}{1} = 5
$$&lt;p&gt;Further&lt;/p&gt;
$$
|He^0 - \mu_1 e^3| = |He^0 - 5 e^3| = 0
$$&lt;p&gt;Thus we are finished, because we reached the STOP criteria.&lt;/p&gt;
&lt;p&gt;We now use the second startvector \(v^0 = e^2 = (0,1,0)^T \). Hence in Step 1&lt;/p&gt;
$$
\mu_1 = r(H, v^0) = \frac{(e^2)^THe^2}{(e^2)^Te^2} = \frac{4}{1} = 4
$$&lt;p&gt;Further&lt;/p&gt;
$$
|He^0 - \mu_1 e^2| = |He^0 - 4 e^2| = 3 &gt; 0
$$&lt;p&gt;We have not reached the Stop criteria. We continue with Step 3&lt;/p&gt;
$$
w^0 = (A - 4 I_3)^{-1}v^0 =
\begin{pmatrix}
0 &amp; -1/3 &amp; 0 \\
-1/3 &amp; -4/9 &amp; 0 \\
0 &amp; 0 &amp; 1
\end{pmatrix} v^0 =
\begin{pmatrix}
-1/3 \\
-4/9 \\
0
\end{pmatrix}
$$&lt;p&gt;And&lt;/p&gt;
$$
|w^0|_2 = \sqrt{1/9 + 16/81} = 8/9
$$&lt;p&gt;Hence&lt;/p&gt;
$$
v^{1} = w^0 / |w^0| =
\begin{pmatrix}
-3/5 \\
-4/5 \\
0
\end{pmatrix}
$$&lt;p&gt;We now do Step 2 again with our new vector&lt;/p&gt;
$$
\mu_2 = r(H, v^1) = 2.56
$$&lt;p&gt;And&lt;/p&gt;
$$
|He^2 - \mu_1 v^1| \approx 1.08 &gt; 0
$$&lt;p&gt;Our eigenvalues are \(2.56\) and (1.08).&lt;/p&gt;

 
&lt;/details&gt;


&lt;h3 id="problem-12-qr-algorithm-and-similarity"&gt;Problem 12: QR-Algorithm and Similarity&lt;/h3&gt;
&lt;p&gt;Let \(A \in \mathbb{R}^n\) symmetrical. Show that all \(A_k\) in \(QR\)-Algorithm with an arbitrarily shift are similar to \(A\), that is they have the same eigenvalues.&lt;/p&gt;
&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution&lt;/summary&gt;
 
 &lt;p&gt;We have&lt;/p&gt;
$$
A_k = Q_kR_k \mu I_n \iff Q_k R_k = A_k - \mu I_n \iff R_k = Q^T(A_k - \mu I_n)
$$&lt;p&gt;Hence&lt;/p&gt;
$$
\begin{align}
A_{k+1} &amp;= R_kQ_k \mu I_n \\
 &amp;= Q^T(A_k - \mu I_n)Q_k + \mu I_n \\
 &amp;= Q^TA_kQ_k - \mu Q^TQ_k + \mu I_n \\
 &amp;= Q^TA_kQ_k - \mu + \mu I_n \\
 &amp;= Q^TA_kQ_k\\
\end{align}
$$&lt;p&gt;Thus we have shown for \(n=k+1\) that \(A_n\) is similar to \(A_k\). We continue inductively&lt;/p&gt;
$$
Q^TA_kQ_k = Q_k^T Q_{k-1}^T \cdot \dots \cdot Q_0^T A_0 Q_0 \cdot \dots \cdot Q_{k-1} Q_{k}
$$&lt;p&gt;With \(A := A_0\), \(\hat{Q}^{-1} := Q_k^T Q_{k-1}^T \cdot \dots \cdot Q_0^T\) and \(\hat{Q_0} := Q_0 \cdot \dots \cdot Q_{k-1} Q_{k}\).&lt;/p&gt;
&lt;p&gt;And \(A_{k+1} = \hat{Q}^{-1} A \hat{Q}\), we thus have a similarity.&lt;/p&gt;

 
&lt;/details&gt;


&lt;h3 id="problem-13-linear-iteration"&gt;Problem 13: Linear Iteration&lt;/h3&gt;
&lt;p&gt;a) Let \(|\cdot|\) be a vectornorm and \(||\cdot||\) be the induced matrix norm. Further let the pre-condition be \(B \approx A^{-1} \in \mathbb{R}^{n \times n}\) and the matrix norm so that \(||I_n - BA|| \le 1\). The solution for the linear equatio nsystem \(Ax = b\) with \(b \in \mathbb{R}^N\) is called \(x \in \mathbb{R}^N\).
Show that the error of the \(k\)-th iteratiation \(|x^k - x|\) can be approxmiates using the error of the first iteration \(|x^0 - x|\) and with that, that \(x^k \to x\)&lt;/p&gt;
&lt;p&gt;b) Given the system ofl ienar equation \(Ax = b\) and a general lienar iterations method with the vector condition \(B\). Further we have a speectral radius of \(p(I_N - BA) \ge 1\).
Show that , a general linear iteration method for bad starting value \(x^0\) diverges.&lt;/p&gt;
&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution a)&lt;/summary&gt;
 
 &lt;style&gt;
 .info {
 background-color: #e6f7ff; 
 padding: 15px; 
 border-radius: 5px; 
 margin-bottom: 15px; 
 }

 .info-title {
 font-size: 20px; 
 margin-bottom: 10px; 
 color: #000080; 
 font-weight: bold; 
 }
&lt;/style&gt;
&lt;div class="info"&gt;
 &lt;div class="info-title"&gt;Info&lt;/div&gt;
 &lt;p&gt;&lt;p&gt;The &lt;strong&gt;general linear iteration&lt;/strong&gt; can be used to solve systems of linear euqations.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Choose a starting Value \(x^0\) and a tolerance \(\epsilon\) with \(r^0 := b -Ax^0\)&lt;/li&gt;
&lt;li&gt;If \(|r^k| \leq \epsilon\) Stop&lt;/li&gt;
&lt;li&gt;Calculate
$$
\begin{align}
c^k &amp;= Br^k \\
x^{k+1} &amp;= x^k + c^k \\
r^{k+1} &amp;= r^k - Ac^k \\
\end{align}
$$&lt;p&gt;&lt;/li&gt;&lt;/p&gt;
&lt;/ol&gt;
&lt;p&gt;With \(r^k - Ac^k = b - Ax^k - Ac^k = b - A(x^k +c^k) = b - Ax^{k+1}\)&lt;/p&gt;
&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;We know that \(x = A^{-1}b\). Further&lt;/p&gt;
$$
\begin{align}
|x^{k+1} - x| &amp;= |x^k + c^k - x| \\
 &amp;= |x^k + B(b - Ax^k) - x| \\
 &amp;= |x^k + Bb - BAx^k - x| \\
 &amp;= |(I_n - BA)x^k + Bb - x| \\
 &amp;= |(I_N - BA)(x^k - A^{-1}b)| \\
 &amp;\leq ||I_n -BA|| |x^k -x|
\end{align}
$$&lt;p&gt;If we now set \(q := ||I_n - BA||\) then we have \(|x^{k+1} - x | \leq q^{k+1} |x^0 - x|\)&lt;/p&gt;
&lt;p&gt;And because of the problem at hand \(q &lt; 1\), see problem text. This means \(q^k \to 0\).&lt;/p&gt;

 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution b)&lt;/summary&gt;
 
 &lt;p&gt;We define \(v := e^0 = x - x^0\) as eigenvector of \(C := I_n - BA\) with the eigenvalue \(\lambda\) with \(|\lambda| &gt; 1\).&lt;/p&gt;
&lt;p&gt;From this follows&lt;/p&gt;
$$
\begin{align}
|e^{k+1}| &amp;=^{a)} |(I_n - BA)^{k+1}e^0| \\
 &amp;= |(I_n - BA)^k Cv| \\
 &amp;= |(I_n - BA)^k \lambda v| \\
 &amp;=^{\text{induction}} | \lambda^{k+1} v| \\
 &amp;= |\lambda|^{k+1} |v| \to \infty\\
\end{align}
$$
 
&lt;/details&gt;


&lt;h3 id="problem-14-linear-iteration"&gt;Problem 14: Linear Iteration&lt;/h3&gt;
&lt;p&gt;Given the following system of lienar equations \(Ax = b\)&lt;/p&gt;
$$
A =
\begin{pmatrix}
2 &amp; 1 &amp; 4 \\
1 &amp; 2 &amp; -4 \\
4 &amp; 4 &amp; 2
\end{pmatrix}
$$&lt;p&gt;Show that for an arbitariy start value \(x^0\) and right side \(b\) with the norm \(|\cdot|_2\):&lt;/p&gt;
&lt;p&gt;a) That the Jacobi-Method converges for \(A\)&lt;/p&gt;
&lt;p&gt;b) That the Gauß-Seidel-Method diverges for \(A\)&lt;/p&gt;
&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution a)&lt;/summary&gt;
 
 &lt;style&gt;
 .info {
 background-color: #e6f7ff; 
 padding: 15px; 
 border-radius: 5px; 
 margin-bottom: 15px; 
 }

 .info-title {
 font-size: 20px; 
 margin-bottom: 10px; 
 color: #000080; 
 font-weight: bold; 
 }
&lt;/style&gt;
&lt;div class="info"&gt;
 &lt;div class="info-title"&gt;Info&lt;/div&gt;
 &lt;p&gt;&lt;p&gt;To do linear iteration with the &lt;strong&gt;Jacobi method&lt;/strong&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;decompose our matrix \(A\) into
$$
A = L + D + R
$$&lt;p&gt;&lt;/li&gt;&lt;/p&gt;
&lt;li&gt;Calculate the inverse \(B = D^{-1}\) of the diagonal matrix.&lt;/li&gt;
&lt;li&gt;The Iteration matrix is then \(C = I - BA\)&lt;/li&gt;
&lt;li&gt;We Repeat step 3.&lt;/li&gt;
&lt;li&gt;We calculate the Eigenvalue using \(det(\lambda I - C)\)&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Importantly our method converges if \(C = ||I_N - BA|| &lt; 1\).&lt;/p&gt;
&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;We first calculate the inverse of the diaognal matrix&lt;/p&gt;
$$
B = D^{-1} =
\begin{pmatrix}
1/2 &amp; 0 &amp; 0 \\
0 &amp; 1/2 &amp; 0 \\
0 &amp; 0 &amp; 1/2
\end{pmatrix}
$$&lt;p&gt;We can use this to do the first step&lt;/p&gt;
$$
c_1 = I_3 - BA = I_3 - \frac{1}{2}A =
\begin{pmatrix}
0 &amp; -1/2 &amp; -2 \\
-1/2 &amp; 0 &amp; 2 \\
-2 &amp; -2 &amp; 0
\end{pmatrix}
$$&lt;p&gt;We determine the eigenvalues&lt;/p&gt;
$$
det(\lambda I_3 - C_1) det(
\begin{pmatrix}
\lambda &amp; 1/2 &amp; 2 \\
1/2 &amp; \lambda &amp; -2 \\
2 &amp; 2 &amp; \lambda
\end{pmatrix}
) =
$$&lt;p&gt;
&lt;/p&gt;
$$
\lambda^3 - 2 + 2 - \lambda(1/4 + 4 - 4) =
\lambda(\lambda^2 - 1/4) =
\lambda(\lambda - 1/2)(\lambda + 1/2)
$$&lt;p&gt;Thus the eigenvalues are \(\lambda_1 = 0, \lambda_2 = -1/2, \lambda_3 = 1/2\).&lt;/p&gt;
&lt;p&gt;Further \(p(c_1) = ||C_1|| = 1_2 &lt; 1\), thus Jacobi converges.&lt;/p&gt;

 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution b)&lt;/summary&gt;
 
 &lt;style&gt;
 .info {
 background-color: #e6f7ff; 
 padding: 15px; 
 border-radius: 5px; 
 margin-bottom: 15px; 
 }

 .info-title {
 font-size: 20px; 
 margin-bottom: 10px; 
 color: #000080; 
 font-weight: bold; 
 }
&lt;/style&gt;
&lt;div class="info"&gt;
 &lt;div class="info-title"&gt;Info&lt;/div&gt;
 &lt;p&gt;&lt;p&gt;To do lienar iteration with the &lt;strong&gt;Gauß-Seidel method&lt;/strong&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;decompose our matrix \(A\) into
$$
A = L + D + R
$$&lt;p&gt;&lt;/li&gt;&lt;/p&gt;
&lt;li&gt;Calculate the inverse \(B = (L + D)^{-1}\).&lt;/li&gt;
&lt;li&gt;The Iteration matrix is then \(C = I - BA\)&lt;/li&gt;
&lt;li&gt;We Repeat step 3.&lt;/li&gt;
&lt;li&gt;We calculate the Eigenvalue using \(det(\lambda I - C)\)&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Importantly our method converges if \(C = ||I_N - BA|| &lt; 1\).&lt;/p&gt;
&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;We calculate first&lt;/p&gt;
$$
B = (L + D)^{-1} =
\begin{pmatrix}
2 &amp; 0 &amp; 0 \\
1 &amp; 2 &amp; 0 \\
4 &amp; 4 &amp; 2
\end{pmatrix}^{-1} =
\begin{pmatrix}
1/2 &amp; 0 &amp; 0 \\
-1/4 &amp; 1/2 &amp; 0 \\
-1/2 &amp; -1 &amp; 1/2
\end{pmatrix}^{-1}
$$&lt;p&gt;Hence&lt;/p&gt;
$$
C_2 = I_3 - BA =
\begin{pmatrix}
0 &amp; -1/2 &amp; -2 \\
0 &amp; 1/4 &amp; 3 \\
0 &amp; 1/2 &amp; -2
\end{pmatrix}
$$&lt;p&gt;We calculate the eigenvalues&lt;/p&gt;
$$
det(\lambda I_3 - C_2) =
det(\begin{pmatrix}
\lambda &amp; 1/2 &amp; 2 \\
0 &amp; \lambda-1/4 &amp; -3 \\
0 &amp; -1/2 &amp; \lambda+2
\end{pmatrix}) =
\lambda
det(
\begin{pmatrix}
\lambda - 1/4 &amp; -3 \\
-1/2 &amp; \lambda + 2
\end{pmatrix} =
$$&lt;p&gt;
&lt;/p&gt;
$$
\lambda((\lambda - 1/2)(\lambda + 2) - 3/2) =
\lambda(\lambda^2 + 7/4\lambda -2)
)
$$&lt;p&gt;We know that 2 eigenvalues exist with&lt;/p&gt;
$$
(\lambda - \lambda_1)(\lambda - \lambda_2) = \lambda^2 + 7/4\lambda -2
$$&lt;p&gt;And&lt;/p&gt;
$$
... + \lambda_1\lambda_2 = ... -2
$$&lt;p&gt;Hence \(|\lambda_1| &gt; 1\) or \(|\lambda_2| &gt; 1\).&lt;/p&gt;
&lt;p&gt;Thus \(p(C_2) = |C_2| &gt; 1\). It can diverge&lt;/p&gt;

 
&lt;/details&gt;


&lt;h3 id="problem-15-cg-method"&gt;Problem 15: CG-Method&lt;/h3&gt;
&lt;p&gt;Given the linear system of equations:&lt;/p&gt;
$$
\begin{pmatrix}
1 &amp; 0 &amp; 1 \\
0 &amp; 2 &amp; 0 \\
1 &amp; 0 &amp; 3
\end{pmatrix}
\mathbf{x} =
\begin{pmatrix}
4 \\
4 \\
4
\end{pmatrix}
$$&lt;p&gt;a) Determine the exact solution $\mathbf{x}^* \in \mathbb{R}^3$ of the linear system of equations.&lt;/p&gt;
&lt;p&gt;b) Calculate 3 steps of the &lt;strong&gt;CG-method&lt;/strong&gt; for the linear system of equations. Choose the starting vector $\mathbf{x}^0 = (0, 0, 0)^T$ and use the identity as a preconditioner.&lt;/p&gt;
&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution a)&lt;/summary&gt;
 
 &lt;p&gt;We can see from the matrix that \(2x_2 = 4 \iff x_2 = 2\).&lt;/p&gt;
&lt;p&gt;We can subtract the first equation from the second and get&lt;/p&gt;
$$
2x_3 = 0 \iff x_3 = 0
$$&lt;p&gt;Inserting this in the first equation we gwet \(x_1 = 4\).&lt;/p&gt;

 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution b)&lt;/summary&gt;
 
 &lt;style&gt;
 .info {
 background-color: #e6f7ff; 
 padding: 15px; 
 border-radius: 5px; 
 margin-bottom: 15px; 
 }

 .info-title {
 font-size: 20px; 
 margin-bottom: 10px; 
 color: #000080; 
 font-weight: bold; 
 }
&lt;/style&gt;
&lt;div class="info"&gt;
 &lt;div class="info-title"&gt;Info&lt;/div&gt;
 &lt;p&gt;&lt;p&gt;To use the &lt;strong&gt;CG-Method&lt;/strong&gt; we use the energy norm&lt;/p&gt;
$$
||x||_A = \sqrt{x^Tx}
$$&lt;p&gt;its scalaproduct is&lt;/p&gt;
$$
x^TAy
$$&lt;p&gt;The matrix A needs to be &lt;strong&gt;symmetrical&lt;/strong&gt; and &lt;strong&gt;positive definite&lt;/strong&gt;. We can then proceed as following&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;choose \(x_0 \in \mathbb{R}^n\). Calculate
&lt;/p&gt;
$$
r^0 = b -Ax^0
$$&lt;p&gt;
&lt;/p&gt;
$$
w^0 = Br^0
$$&lt;p&gt;
&lt;/p&gt;
$$
p_0 = (w^0)r^0
$$&lt;p&gt;
and set \(d^1 := w^0, \ k := 0\).&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;If \(p_k \leq \epsilon\) then stop else continue&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Set \(k := k +1\) and calculate
&lt;/p&gt;
$$
\begin{align*}
u^k &amp;= Ad^k \\
\alpha_k &amp;= p_k -1 /(u^k)^T d^k \\
x^k &amp;= x^{k+1} + \alpha_k d^k \\
r^k &amp;= r^{k-1} - \alpha_k d^k \\
w^k &amp;= Br^k \\
p_k &amp;= (w^k)^Tr^k \\
d^{k+1} = w^k + p_k/p_k-1 d_k
\end{align*}
$$&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Go to Step 2&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Whereby \(B\) is an invertierable matrix called the &lt;strong&gt;precondition&lt;/strong&gt; to solve \(Ax =b\) with \(BAx = Bb\), where B should be chosen so that \(BA\) condisiton is small.&lt;/p&gt;
&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;Because \(B = I_3\) we get \(w^k = r^k\), further&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;First
&lt;/p&gt;
$$
\begin{align*}
r^0 &amp;= b -Ax^0 = b \\
p_0 &amp;= (w^0)r^0 = |r_0|^2_2 = 48 &gt; 0 \\
d^k &amp;= r^0
\end{align*}
$$&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Then
&lt;/p&gt;
$$
\begin{align*}
u^1 &amp;= (8 \ 8 \ 16)^T \\
\alpha_1 &amp;= 3/8 \\
x^1 &amp;= (1 \ 1 \ -2) \\
p_1 &amp;= 6 \\
d_2 &amp;= (4/2 \ 3/2 \ -3/2)^T \\
\end{align*}
$$&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;This continues for two steps. After which it stops because of \(p_0 = 0\).&lt;/p&gt;

 
&lt;/details&gt;


&lt;h3 id="problem-16-newton-method"&gt;Problem 16: Newton-Method&lt;/h3&gt;
&lt;p&gt;Given the non-linear system of equations:&lt;/p&gt;
$$
\mathbf{F}(\mathbf{x}) = \begin{pmatrix}
\exp(x_1^2) - \exp(x_2^2) + x_1x_2 - e \\
x_1x_2
\end{pmatrix} = \begin{pmatrix}
0 \\
0
\end{pmatrix}
$$&lt;p&gt;a) Determine all exact solutions of this system of equations.&lt;/p&gt;
&lt;p&gt;b) Perform the first iteration step of the &lt;strong&gt;Newton&amp;rsquo;s method&lt;/strong&gt; for the starting values, if possible:&lt;/p&gt;
$$\mathbf{x}^0 = \begin{pmatrix} 0 \\ 0 \end{pmatrix} \quad \text{and} \quad \mathbf{x}^0 = \begin{pmatrix} 1 \\ 1 \end{pmatrix}$$&lt;p&gt;c) Justify why the fixed-point iteration&lt;/p&gt;
$$\mathbf{x}^{k+1} = \mathbf{x}^k - B \cdot \mathbf{F}(\mathbf{x})$$&lt;p&gt;with the matrix&lt;/p&gt;
$$
B = \begin{pmatrix}
\frac{1}{2\pi} &amp; 0 \\
0 &amp; 1
\end{pmatrix}
$$&lt;p&gt;&lt;strong&gt;locally converges linearly&lt;/strong&gt;.&lt;/p&gt;
&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution a)&lt;/summary&gt;
 
 &lt;p&gt;From \(x_1x_2 = 0\) follows \(x_1 = 0\) or \(x_2 = 0\).&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Case 1: \(x_1 = 0\)&lt;/strong&gt;&lt;/p&gt;
$$
-exp(x_2^2) + 1 - e = 0 \iff -exp(x_2^2) = e - 1
$$&lt;p&gt;Has no solution since \(-exp(x_2^2) &lt; 0 \) and \(e - 1 &gt; 0\).&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Case 2: \(x_2 = 0\)&lt;/strong&gt;&lt;/p&gt;
$$
exp(x_1^2) = e + 1 \iff \pm \sqrt{ln(e + 1)}
$$&lt;p&gt;Hence&lt;/p&gt;
$$
x \in \{(\sqrt{ln(e + 1)}, 0), \ (-\sqrt{ln(e + 1)}, 0)\}
$$
 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution b)&lt;/summary&gt;
 
 &lt;style&gt;
 .info {
 background-color: #e6f7ff; 
 padding: 15px; 
 border-radius: 5px; 
 margin-bottom: 15px; 
 }

 .info-title {
 font-size: 20px; 
 margin-bottom: 10px; 
 color: #000080; 
 font-weight: bold; 
 }
&lt;/style&gt;
&lt;div class="info"&gt;
 &lt;div class="info-title"&gt;Info&lt;/div&gt;
 &lt;p&gt;&lt;p&gt;The &lt;strong&gt;newton-method&lt;/strong&gt; can be used to solve non-linear systems of equations..&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Choose a starting value \(x^0\) and a tolerance \(\epsilon\)&lt;/li&gt;
&lt;li&gt;Solve \(f'(x^k)d^k = -f(x^k)\) you can use LR-Decomposition for this, then calculate \(x^{k+1} = x^k + d^k\)&lt;/li&gt;
&lt;li&gt;If \(||d_k|| \le \epsilon\) then Stop, else increase \(k\) by \(1\) and go to Step 1.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;This can be simplified to the following formula&lt;/p&gt;
$$
x^{k+1} = x^k - Bf(x^k)
$$&lt;p&gt;this is called &lt;strong&gt;simplified newton method&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;The method is locally linear convergent if&lt;/p&gt;
$$
p(C) = p(I - BF'(x^*)) &lt; 1
$$&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;We first calculate the derivative&lt;/p&gt;
$$
DF(x) =
\begin{pmatrix}
2x_1 exp(x_1^2) + x_2 &amp; x_1 - 2x_2 exp(x_1)^2 \\
x_2 &amp; x_1
\end{pmatrix}
$$&lt;p&gt;For \(x^0 = (0 \ 0 )^T\) is&lt;/p&gt;
$$
DF(x) =
\begin{pmatrix}
0 &amp; 0 \\
0 &amp; 0
\end{pmatrix}
$$&lt;p&gt;Hence the newton method is not defined.&lt;/p&gt;
&lt;p&gt;For \(x^0 = (1 \ 1 )^T\) is&lt;/p&gt;
$$
DF(x^0) =
\begin{pmatrix}
2e + 1 &amp; 1-2e \\
1 &amp; 1
\end{pmatrix}
$$&lt;p&gt;and&lt;/p&gt;
$$
-F(x^0) =
\begin{pmatrix}
e-1 \\
-1
\end{pmatrix}
$$&lt;p&gt;Thus&lt;/p&gt;
$$
\begin{align*}
&amp;(I) \quad (2e+1)x_1 (1-2e)x_2 = e - 1 \\
&amp;(II) \quad x_1 + x_2 = - 1
\end{align*}
$$&lt;p&gt;We solve this by \((I) - (II)\):&lt;/p&gt;
$$
(I') \quad x_1 - x_2 = 1/2
$$&lt;p&gt;and \(I' + (II)\) results in \(x_1 = -1/4, \ x_2 = -3/4\).&lt;/p&gt;
&lt;p&gt;Hence&lt;/p&gt;
$$
x^1 = x^0 + d^0 = (1 \ 1)^T + (-1/4 \ -3/4)^T = (3/4 \ 1/4)^T
$$
 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution c)&lt;/summary&gt;
 
 &lt;p&gt;We need to show \(p(C)=p(I - BDF(x^*)) &lt; 1\).&lt;/p&gt;
&lt;p&gt;From (a) we know that the solution is \(x^* = \sqrt{ln(e+1)} \ 0\)^T.&lt;/p&gt;
&lt;p&gt;Hence&lt;/p&gt;
$$
C = I_2 - B \cdot DF(x^*) = I_2 -
\begin{pmatrix}
\sqrt{ln(e + 2)}(e+1) &amp; \sqrt{ln(e +1)/2 \pi} \\
0 &amp; \sqrt{ln(e+1)}
\end{pmatrix} =
$$&lt;p&gt;
&lt;/p&gt;
$$
\begin{pmatrix}
(\pi - \sqrt{ln(e+2)}(e+1))/\pi &amp; * \\
0 &amp; 1 - \sqrt{ln(e+1)}
\end{pmatrix} \
$$&lt;p&gt;Thus&lt;/p&gt;
$$
p(C) \approx |(\pi - 1.15 - 3.7)/\pi| &lt; 1
$$
 
&lt;/details&gt;


&lt;h3 id="problem-17-polynomial-interpolation"&gt;Problem 17: Polynomial interpolation&lt;/h3&gt;
&lt;p&gt;a) Given the support points \(\xi_0 &lt; \dots &lt; \xi_N\) and the values \(f_0, \dots, f_N\). The corresponding &lt;strong&gt;Lagrange interpolation problem&lt;/strong&gt; (cf. script) is:&lt;/p&gt;
&lt;p&gt;Determine a polynomial \(P \in \mathbb{P}_N\) with&lt;/p&gt;
$$P(\xi_n) = f_n, \quad n=0, \dots, N.$$&lt;p&gt;Show that the solution to this interpolation problem is &lt;strong&gt;unique&lt;/strong&gt;.&lt;/p&gt;
&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution a)&lt;/summary&gt;
 
 &lt;p&gt;Assume: it exist \(P,Q \in \mathbb{P}_N\) which solves \(P(\xi) = f_n\) with \(P \neq Q\).&lt;/p&gt;
&lt;p&gt;Then \(P-Q \in \mathbb{P}_N\) and \(P(\xi) - Q(\xi) = 0\).&lt;/p&gt;
&lt;p&gt;\(P - Q\) hat maximal N-roots in the complex numbers.&lt;/p&gt;
&lt;p&gt;But \(\xi_n\) for \(n=0,...,N\) are roots of \(P-Q\), these are N+1 roots, contraddiction.&lt;/p&gt;
&lt;p&gt;Hence \(P = Q\), there is only on poylnomial.&lt;/p&gt;

 
&lt;/details&gt;


&lt;h3 id="problem-18-schema-of-neville"&gt;Problem 18: Schema of Neville&lt;/h3&gt;
&lt;p&gt;Given the table of values:&lt;/p&gt;
$$
\begin{array}{|c|c|c|c|c|c|}
\hline
n &amp; 0 &amp; 1 &amp; 2 &amp; 3 \\
\hline
\xi_n &amp; -1 &amp; 0 &amp; 1 &amp; 3 \\
\hline
f_n &amp; 8 &amp; 3 &amp; 4 &amp; 8 \\
\hline
\end{array}
$$&lt;p&gt;a) Determine the &lt;strong&gt;interpolation polynomial&lt;/strong&gt; \(p \in \mathbb{P}_3\) with \(p(\xi_n) = f_n\) for \(n=0, 1, 2, 3\) in &lt;strong&gt;Newton form&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;b) Extend the interpolation polynomial by including \((\xi_4, f_4) = (2, 1)\).&lt;/p&gt;
&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution a)&lt;/summary&gt;
 
 &lt;style&gt;
 .info {
 background-color: #e6f7ff; 
 padding: 15px; 
 border-radius: 5px; 
 margin-bottom: 15px; 
 }

 .info-title {
 font-size: 20px; 
 margin-bottom: 10px; 
 color: #000080; 
 font-weight: bold; 
 }
&lt;/style&gt;
&lt;div class="info"&gt;
 &lt;div class="info-title"&gt;Info&lt;/div&gt;
 &lt;p&gt;&lt;p&gt;To calculate the &lt;strong&gt;newton poylnomial&lt;/strong&gt;&lt;/p&gt;
&lt;figure&gt;
 &lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width: 50%" src="https://monkemanx.github.io/attachments/numerical_methods/recursive_newton.png"&gt;
&lt;/figure&gt;
&lt;p&gt;The main diagonal are the coefficients of the newton polynomial.&lt;/p&gt;
&lt;/p&gt;
&lt;/div&gt;
&lt;figure&gt;
 &lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width: 100%" src="https://monkemanx.github.io/attachments/numerical_methods/numerical_method_polynomialinterpolation.png"&gt;
&lt;/figure&gt;

 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution b)&lt;/summary&gt;
 
 &lt;figure&gt;
 &lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width: 100%" src="https://monkemanx.github.io/attachments/numerical_methods/polynomial_interpolation_2.png"&gt;
&lt;/figure&gt;

 
&lt;/details&gt;


&lt;h3 id="problem-19-fast-cubic-spline"&gt;Problem 19: Fast Cubic Spline&lt;/h3&gt;
&lt;p&gt;Given the nodes \(\xi_0 = -1, \xi_1 = 0\) and \(\xi_2 = 1\) on the interval \([-1, 1]\). Consider the function&lt;/p&gt;
$$
f(t) = \begin{cases}
(t+1) + (t+1)^3 &amp; \text{for } -1 \le t \le 0 \\
4 + (t-1) + (t-1)^3 &amp; \text{for } 0 &lt; t \le 1.
\end{cases}
$$&lt;p&gt;a) Justify which properties of a &lt;strong&gt;cubic spline with natural boundary conditions&lt;/strong&gt; the function \(f\) fulfills and which it does not.&lt;/p&gt;
&lt;p&gt;b) Change the function \(f\) on the subinterval \((0, 1]\) so that \(f\) fulfills all properties of a cubic spline with natural boundary conditions.
&lt;em&gt;Hint: The function \(f\) does not need to fulfill any interpolating properties.&lt;/em&gt;&lt;/p&gt;
&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution a)&lt;/summary&gt;
 
 &lt;p&gt;First calculate the derivatives&lt;/p&gt;
$$
\begin{align*}
f_1'(t) &amp;= 1 +3(t+1)^2 \\
f_1''(t) &amp;= 6(t+1) \\
f_2'(t) &amp;= 1+ 3(t-1)^2 \\
f_2''(t) &amp;= 6(t-1) \\
\end{align*}
$$&lt;p&gt;Properties&lt;/p&gt;
$$
(i) f_1, f_2 \in \mathbb{P}_3
$$$$
(ii) Smoothness:
f_1(0) = 2 = f_2(0)
f_1'(0) = 4 = f_2'(0)
f_1'(0) = 6 \neq -6 = f_2''(0)
$$$$
(iii) Natural:
f_1''(-1) = 0
f_2''(1) = 0
$$&lt;p&gt;Thus \(f\) fulfills all properties besides continuity in the second derivative in \(t=0\).&lt;/p&gt;

 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution b)&lt;/summary&gt;
 
 &lt;p&gt;For (a) following applies:&lt;/p&gt;
$$
\begin{align*}
(I) f_2(0) &amp;= 2 \\
(I) f_2'(0) &amp;= 4 \\
(I) f_2''(0) &amp;= 6 \quad f_2''(1) = 0
\end{align*}
$$&lt;p&gt;From (III) follows \(f_2''(t) = 6\).&lt;/p&gt;
$$
f_2'(t) = -(1-t)^2 + c
$$&lt;p&gt;with (II) follows: \(f_2'(0) = -3(1 - 0)^2\).&lt;/p&gt;
&lt;p&gt;with (II) follows: \(f_2'(0)\ = -3(1-0)^2 + c =^! u\)&lt;/p&gt;
&lt;p&gt;follows \(c=7\), hence \(f_2'(0)\ = -3(1-0)^2 + 7\).&lt;/p&gt;
&lt;p&gt;In total we have \(f_2(t) = (1-t)^3 +7t + 1\).&lt;/p&gt;

 
&lt;/details&gt;


&lt;h3 id="problem-20-determining-of-weights"&gt;Problem 20: Determining of Weights&lt;/h3&gt;
&lt;p&gt;Determine the weights \(\omega_0, \omega_1, \omega_2\) for \(\xi_0 = -\frac{h}{2}, \xi_1 = 0\) and \(\xi_2 = \frac{h}{2}\), such that&lt;/p&gt;
$$
\int_{-h}^h P(t) \,dt = \sum_{n=0}^2 \omega_n P(\xi_n)
$$&lt;p&gt;is exact for polynomials \(P \in \mathbb{P}_2\).&lt;/p&gt;
&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution&lt;/summary&gt;
 
 &lt;p&gt;The basis of \(\mathbb{P}_2\) is \(\{1, x, x^2\}\). Hence the condition of the task is fullfileld when its fullfileld for the basis.&lt;/p&gt;
&lt;p&gt;We get the following conditions&lt;/p&gt;
$$
\begin{align}
\int 1 dt &amp;= [t]^{h}_{-h} = 2h =^{?} \sum w_n 1(\xi_n) = w_0 + w_1 + w_2 \\
\int t dt &amp;= [\frac{1}{2}t^2]^{h}_{-h} = 0 =^{?} \sum w_n t(\xi_n) = -\frac{h}{2} w_0 + \frac{h}{2}w_2\\
\int t^2 dt &amp;= [t]^{h}_{-h} = \frac{2}{3}h^3 =^{?} \sum w_n t^2(\xi_n) = \frac{h^2}{4}w_0 + \frac{h^2}{4}w_2\\
\end{align}
$$&lt;p&gt;From (2) follows \(w_0 = w_2\). In (3) we thus get \(\frac{h^2}{2}w_0 = \frac{2}{3}h^3\), from this follows \(w_0 = \frac{4}{3}h = w_2\). In (1) we have \(\frac{8}{3}h + w_2 = 2h\) from this follows \(w_1 = -\frac{2}{3}h\).&lt;/p&gt;

 
&lt;/details&gt;


&lt;h3 id="problem-21-composite-left-sided-rectangle-rule"&gt;Problem 21: Composite (left-sided) rectangle rule&lt;/h3&gt;
&lt;p&gt;Given is \(f \in C^1[a,b]\), as well as the equidistant nodes for \(n = 0, \dots, N\)
&lt;/p&gt;
$$\xi_n = a + nh \quad \text{and} \quad h = (b-a)/N.$$&lt;p&gt;The composite (left-sided) rectangle rule is defined by&lt;/p&gt;
$$
Q(f) = \sum_{n=1}^N h f(\xi_{n-1}).
$$&lt;p&gt;Show the error estimate&lt;/p&gt;
$$ \left| \int_a^b f(t) \,dt - Q(f) \right| \leq \frac{b-a}{2} h \sup_{t \in [a,b]} |f'(t)|.$$&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution&lt;/summary&gt;
 
 &lt;p&gt;From \([\xi_{n-1}, \xi_{n}]\) follows from the taylor series development&lt;/p&gt;
$$
f(t) = f(\xi_{n-1})t + f(t_1)f(t - \xi_{n-1})
$$&lt;p&gt;We continue&lt;/p&gt;
$$
\begin{align*}
\int f(t)dt - Q(f) &amp;= \int_a^b f(t)dt - \sum^N h f(\xi_{n-1}) \\
&amp;= \sum^N (\int_{\xi_{n-1}}^{\xi_n} f(t)dt - h f(\xi_{n-1})) \\
&amp;= \sum^N (\int_{\xi_{n-1}}^{\xi_n} f(\xi_{n-1})t + f(t_1)f(t - \xi_{n-1})dt - hf(\xi_{n-1})) \\
&amp;= \sum^N ([tf(\xi_{n-1})]^{\xi_n}_{\xi_{n-1}} + f(\hat{t}_n) [(t - \xi_{n-1})^2 \cdot \frac{1}{2}]^{\xi_n}_{\xi_{n-1}}) \\
&amp;= \sum^N f'(\hat{t}_n) \frac{1}{2}(\xi_n - \xi_{n-1})^2 \\
&amp;\leq \frac{h}{2} sup |f'(t)| \sum^N \frac{b- a}{N} \\
&amp;= \frac{b-a}{2}h sup |f'(t)|
\end{align*}
$$
 
&lt;/details&gt;


&lt;h3 id="problem-22-floating-numbers"&gt;Problem 22: Floating Numbers&lt;/h3&gt;
&lt;p&gt;Given a base \(B \geq 2\), a minimal exponent \(e_{min} \in \mathbb{Z}\) and lengths \(L_m, L_e \in \mathbb{N}\).&lt;/p&gt;
&lt;p&gt;(a) Formulate the definition of the set \(FL_+\) of normalized positive floating-point numbers for the given quantities.&lt;/p&gt;
&lt;p&gt;(b) Determine \(\max FL_+\) and \(\min FL_+\).&lt;/p&gt;
&lt;p&gt;(c) Let \(x \in FL_+\) and let \(y \in FL_+\) be a floating-point number directly adjacent to \(x\). Show that
&lt;/p&gt;
$$2 \text{ eps } B^{-1} &lt; \frac{|x-y|}{|x|} \leq 2 \text{ eps},$$&lt;p&gt;
where eps is the machine epsilon.&lt;/p&gt;
&lt;p&gt;(d) State the advantage of choosing \(B = 2\) with regard to the representation of floating-point numbers and formulate estimates analogous to (c), if this advantage is implemented.&lt;/p&gt;
&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution a)&lt;/summary&gt;
 
 $$
FL_+ = \left\{ B^e \sum_{l=1}^{l_m} a_l B^{-l} \;\Bigg|\;
e = e_{\min} + \sum_{l=0}^{L_e-1} c_l B^l,\;
a_1 \neq 0,\; c_l \in \{0, \dots, B-1\} \right\}
$$
 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution b)&lt;/summary&gt;
 
 $$
maxFL_+ = B^{e_{max}} (1- B^{-L_m}) = B^{e_{min} + (B-1) \frac{1 - B^{L_e - 1}}{1 - B}} (1 - B^{-L_m}) = (1 - B^{-L_m})B^{e_{{min} + B^{L_e - 1}}}
$$$$
minFL_+ = B^{-1}B^{e_{min}} = B^{e_{min} - 1}
$$
 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution c)&lt;/summary&gt;
 
 &lt;p&gt;First&lt;/p&gt;
$$
2 eps B^{-1} = 2 \frac{B^{1-L_m}}{2} B^{-1} = B^{1-L_m}B^{-1} = B^{-L_m}
$$&lt;p&gt;Next&lt;/p&gt;
$$
2 eps = \frac{B^{1 - L_m}}{2} = B^{1-L_m}
$$&lt;p&gt;And let \(x = mB^e\) than is \(y = (m \pm B^{-L_m})B^e\) thus&lt;/p&gt;
$$
\frac{|x -y|}{|x|} = \frac{|mB^e - (m \pm B^{-L_m})B^e|}{mB^e} = \frac{B^{-L_m}}{m}
$$&lt;p&gt;With that we have the inequality.&lt;/p&gt;

 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution d)&lt;/summary&gt;
 
 &lt;p&gt;In the case of \(B = 2\) we don&amp;rsquo;t need to save \(a_1 = 1\). Thus we have an extra bit that we can use for the floating number. Hence the adjucent number \(y = (m \pm B^{-L_m + 1})B^e\).&lt;/p&gt;
&lt;p&gt;Then&lt;/p&gt;
$$
2 eps = \frac{B^{1 - L_m+1}}{2} = B^{L_m} = eps
$$&lt;p&gt;And&lt;/p&gt;
$$
2 eps B^{-1} = 2 \frac{B^{1-L_m+1}}{2} B^{-1} = B^{1-L_m+1}B^{-1} = B^{-L_m + 1}
$$
 
&lt;/details&gt;


&lt;h3 id="problem-23-interpolation-polynomials"&gt;Problem 23: Interpolation Polynomials&lt;/h3&gt;
&lt;p&gt;Given the table of values:&lt;/p&gt;
$$
\begin{array}{|c|c|c|c|c|}
\hline
n &amp; 0 &amp; 1 &amp; 2 &amp; 3 \\
\hline
x_n &amp; -1 &amp; 2 &amp; 4 &amp; 5 \\
\hline
f_n &amp; 3 &amp; -3 &amp; 63 &amp; 99 \\
\hline
\end{array}
$$&lt;p&gt;(a) Determine the corresponding interpolation polynomial in Newton form.&lt;/p&gt;
&lt;p&gt;(b) We add the point \((x_4, f_4) = (0, 59)\) to the nodes above. Determine the corresponding interpolation polynomial.&lt;/p&gt;
&lt;p&gt;(c) Let \(p \in \mathbb{P}_N\) be the interpolation polynomial for a continuous function \(f: [a, b] \to \mathbb{R}\) at the pairwise distinct nodes \(x_0, \dots, x_N \in [a, b]\). Let also \(q \in \mathbb{P}_N\) be arbitrary.&lt;/p&gt;
&lt;p&gt;(i) First show that
&lt;/p&gt;
$$\max_{x \in [a,b]} |q(x) - p(x)| \leq \Lambda_N \max_{x \in [a,b]} |q(x) - f(x)|.$$&lt;p&gt;
Give \(\Lambda_N\) explicitly.&lt;/p&gt;
&lt;p&gt;(ii) Then show that
&lt;/p&gt;
$$\max_{x \in [a,b]} |f(x) - p(x)| \leq (1 + \Lambda_N) \max_{x \in [a,b]} |q(x) - f(x)|.$$&lt;p&gt;(iii) Briefly discuss the statement of the estimate in (ii). In doing so, refer to two different classes of nodes from the lecture for \(N \approx 20\).&lt;/p&gt;
&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution a)&lt;/summary&gt;
 
 &lt;p&gt;We have&lt;/p&gt;
&lt;figure&gt;
 &lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width: 80%" src="https://monkemanx.github.io/attachments/numerical_methods/newtonpolynomial_task_23_a.png"&gt;
&lt;/figure&gt;
&lt;p&gt;Thus the newton interpolation polynomial is&lt;/p&gt;
$$
p_{0,3}(t) = 3 − 2(t + 1) + 7(t + 1)(t − 2) − (t + 1)(t − 2)(t − 4)
$$
 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution b)&lt;/summary&gt;
 
 &lt;p&gt;We have&lt;/p&gt;
&lt;figure&gt;
 &lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width: 80%" src="https://monkemanx.github.io/attachments/numerical_methods/newtonpolynomial_task_23_b.png"&gt;
&lt;/figure&gt;
&lt;p&gt;Thus the newton interpolation polynomial is&lt;/p&gt;
$$
p_{0,4}(t) = p_{0,3} 2(t + 1)(t − 2)(t − 4)(t − 5)
$$
 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution c)&lt;/summary&gt;
 
 &lt;p&gt;(i)
Because p is the polynomial interpolation of f, which means it has the same roots. We have&lt;/p&gt;
$$
p(x) = \sum^N p(x_n) L_n(x) = \sum^N f(x_n) L_n(x)
$$&lt;p&gt;and&lt;/p&gt;
$$
q(x) = \sum^N q(x) L_n(x)
$$&lt;p&gt;Hence&lt;/p&gt;
$$
\begin{align*}
\max |q(x) - p(x)| &amp;= \max |\sum^N q(x_n) L_n(x) - \sum^N f(x_n) L_n(x)| \\
&amp;\leq \max \sum |q(x_n)- f(x_n)| |L_n(x)|\\
&amp;\leq \max \sum |L_n(x)| \max_{x \in x_n} |q(x)- f(x)| \\
&amp;\leq \max \Lambda_N |q(x) - f(x)|
\end{align*}
$$&lt;p&gt;(ii)
We can do&lt;/p&gt;
$$
|f (x) − p(x)| = |f (x) − q(x)| + |q(x) − p(x)|
$$&lt;p&gt;And now we can use (i)&lt;/p&gt;
$$
\max|f (x)−p(x)| \leq \max |f (x)−q(x)| + \max |q(x)−p(x)| \leq (1+Λ N ) \max |f (x)−q(x)|.
$$&lt;p&gt;(iii)
This formula tells us, how good our interpolation polynomial is, the maximum is \((1 + \Lambda_N)\), where \(\Lambda_N\) is the lebesgue constant.&lt;/p&gt;
&lt;p&gt;If we choose aquidistant roots, so is the lebesgue constant very big and the approximation is not useful. For Tschebyscheff roots, the lesbesgue constant is near its minima 1, and we get a useful approximation.&lt;/p&gt;

 
&lt;/details&gt;


&lt;h3 id="problem-24-quadrature-formulas"&gt;Problem 24: Quadrature Formulas&lt;/h3&gt;
&lt;p&gt;Let \((b_k, c_k)_{k=1,\dots,s}\) be a quadrature formula of order \(p\).&lt;/p&gt;
&lt;p&gt;(a) Formulate the definition of the order as given in the lecture.&lt;/p&gt;
&lt;p&gt;(b) Show that if \(p \geq s\), the weights are uniquely determined by the nodes. Give an explicit representation of the weights.&lt;/p&gt;
&lt;p&gt;(c) Let \(p \geq s, m \geq 1\) and \(M(x) = (x-c_1) \cdots (x-c_s)\). Show that the order is exactly \(s+m\), if
&lt;/p&gt;
$$\int_0^1 M(x) g(x) dx = 0$$&lt;p&gt;
for all polynomials \(g \in \mathbb{P}_{m-1}\), but not for one of degree \(m\).
&lt;em&gt;Hint: Use a representation without proof that could be justified by polynomial division or the Euclidean division algorithm.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;(d) Give the maximum order of the quadrature formula. Justify your answer with the help of subproblem (c).&lt;/p&gt;
&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution a)&lt;/summary&gt;
 
 A a quadrature formula \((b_k, c_k)\) has the order \(p\) if for all polynomials from degree \(\leq p-1\) the integral can be calculated exactly, whereby \(p\) is maximal.
 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution b)&lt;/summary&gt;
 
 &lt;p&gt;The lagrange Polynomial \(L_n\) are determinted through the knots \(c_1, .., c_s\). For the order \(p \geq s\), follows with \(L_j(c_k) = \delta_{jk}\)&lt;/p&gt;
$$
\int_0^1 L_j(x) dx = \sum^s b_k L_j(ck) = b_j
$$
 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution c)&lt;/summary&gt;
 
 &lt;p&gt;Let \(f \in \mathbb{P}_{s + m - 1}\) be arbitrarily. Then exist a polynomial \(g \in \mathbb{P}_{m-1}\) and \(r \in \mathbb{P}_{s-1}\) with \(f = Mg + r\) because of polynomial division.&lt;/p&gt;
&lt;p&gt;And&lt;/p&gt;
$$
\int f(x) dx = \int M(g)g(x) fx + \int r(x) dx
$$&lt;p&gt;and the same for their interpolation&lt;/p&gt;
$$
\sum b_k f(c_k) = \sum b_k M(c_k)g(c_k) + \sum b_k r_k(c_k)
$$&lt;p&gt;And because \(p \geq s\) the last summands of both formulas are the same. Hence the polynomial inteprolcation calculates the exact integral.&lt;/p&gt;
&lt;p&gt;From this follows that the order is exactly then \(m +s\) when&lt;/p&gt;
$$
\int M(x)g(x) dx = 0
$$&lt;p&gt;for all polynomials of order \(\leq m-1\), but not for ones of order \(m\).&lt;/p&gt;

 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution d)&lt;/summary&gt;
 
 &lt;p&gt;The maximum order we can have is \(2s\) because that would mean that we have \(g = M\) and then&lt;/p&gt;
$$
\int M(x)g(x) dx = \int M(x)^2 dx &gt; 0
$$
 
&lt;/details&gt;


&lt;h3 id="problem-25-matrices"&gt;Problem 25: Matrices&lt;/h3&gt;
&lt;p&gt;Let \(A, B \in \mathbb{R}^{N \times N}\) and \(\|\cdot\|\) be an arbitrary norm on \(\mathbb{R}^N\).&lt;/p&gt;
&lt;p&gt;(a) For the corresponding matrix norm, show the submultiplicativity \(\|AB\| \leq \|A\| \|B\|\).&lt;/p&gt;
&lt;p&gt;(b) Let \(A\) be regular. Show that \(\text{cond}(A) \geq 1\).&lt;/p&gt;
&lt;p&gt;(c) Let \(A\) be regular, \(\mathbf{b}, \tilde{\mathbf{b}} \in \mathbb{R}^N\) and \(\mathbf{x}, \tilde{\mathbf{x}} \in \mathbb{R}^N\) with \(A\mathbf{x} = \mathbf{b}\) and \(A\tilde{\mathbf{x}} = \tilde{\mathbf{b}}\). Show that
&lt;/p&gt;
$$\frac{\|\mathbf{x} - \tilde{\mathbf{x}}\|}{\|\mathbf{x}\|} \leq \text{cond}(A) \frac{\|\mathbf{b} - \tilde{\mathbf{b}}\|}{\|\mathbf{b}\|}$$&lt;p&gt;
and briefly discuss the estimate.&lt;/p&gt;
&lt;p&gt;(d) Let \(\mathbf{v} \in \mathbb{R}^N\) be arbitrary and let \(\mathbf{e} \in \mathbb{R}^N\) be the vector consisting of all ones. Determine the spectrum of \(\mathbf{e}\mathbf{e}^T\) and the value \(\|\mathbf{v}\mathbf{e}^T\|_2\).&lt;/p&gt;
&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution a)&lt;/summary&gt;
 
 &lt;p&gt;We have \(||A|| = \sup \frac{||Ax||}{||x||} = \max ||Ax||\). Hence&lt;/p&gt;
$$
||AB|| = \max ||ABx|| \leq \max ||A|| ||Bx|| = ||A|| \max ||Bx|| = ||A||||B||
$$
 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution b)&lt;/summary&gt;
 
 &lt;p&gt;We have&lt;/p&gt;
$$
1 = ||I_n|| = ||A^{-1}A|| \leq ||A^{-1}||||A|| = cond(A)
$$
 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution c)&lt;/summary&gt;
 
 &lt;p&gt;Because \(Ax=b\) we can rwrite&lt;/p&gt;
$$
x - \hat{x} = A^{-1}b - A^{-1}\hat{b}
$$&lt;p&gt;Thus&lt;/p&gt;
$$
||x- \hat{x}|| = ||A^{-1}(b - \hat{b})|| \leq ||A^{-1}||||b - \hat{b}||
$$&lt;p&gt;And with that&lt;/p&gt;
$$
\frac{||x - \hat{x}||}{||x||} \leq \frac{||A^{-1}||||b - \hat{b}||}{||x||} = \frac{||b||||A^{-1}||||b - \hat{b}||}{||x||||b||} = \frac{||b||||A^{-1}||}{||x||}\frac{||b - \hat{b}||}{||b||} \leq ||A||||A^{-1}|| \frac{||b - \hat{b}||}{||b||}
$$&lt;p&gt;For this approximation to be useful the error of \(\frac{||b - \hat{b}||}{||b||}\) needs to be small.&lt;/p&gt;
&lt;p&gt;If our condition number is small this approximation guarantees, that small errors in \(b\) lead to small innacuracies from \(x\).
Is the condition number nig, so can even a small error lead to a big error in our solution, but it doesnt have to be, because the right side of the approximation is so loose.&lt;/p&gt;

 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution d)&lt;/summary&gt;
 
 &lt;p&gt;Because \(e \neq 0\), is \(ee^T\) a Matrix with rang 1. Hence 0 is a eigenvalue with the multiplicity of \(N-1\).&lt;/p&gt;
&lt;p&gt;Next, \(Kern(ee^T) = span\{e\}^T\).&lt;/p&gt;
&lt;p&gt;In addition we have the eigenvalue \(N &gt; 0\) because \(ee^Te = e^Tee = Ne\). With that we have the spectrum.&lt;/p&gt;
&lt;p&gt;Next with \(ev^Tve^T = ||v||_2^2ee^T\) we get&lt;/p&gt;
$$
||ve^T||_2 = \sqrt{\max{\lambda \in ev^Tve^T}} = ||v||_2 \sqrt{\max{\lambda \in ee^T}} = ||v||_2 \sqrt{N}
$$
 
&lt;/details&gt;


&lt;h3 id="problem-26-cg-algorithm"&gt;Problem 26: CG-Algorithm&lt;/h3&gt;
&lt;p&gt;Let \(A\) be a symmetrical positive definite matrix and \(x^*\) be the solution of the LGS \(Ax = b\).&lt;/p&gt;
&lt;p&gt;What is the function \(\phi\), that the CG_Algorithm minimizes? What is the connection to the LGS \(Ax =b\)?&lt;/p&gt;
&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution&lt;/summary&gt;
 
 &lt;p&gt;We have \(\phi(x) = \frac{1}{2}x^TAx - x^Tb\), which gets minimized by the CG-Algorithm.&lt;/p&gt;
&lt;p&gt;A necessary condition for the minima \(x^*\) is that \(\phi(x^*) = (Ax^* -b)^T = 0^T\). This condition is because of \(\phi''(x) = A\) symmetrical and positive definite also sufficient.&lt;/p&gt;
&lt;p&gt;Hence is \(x^*\) then the minima from \(\phi\), if \(x^*\) solves the LGS \(Ax = b\).&lt;/p&gt;

 
&lt;/details&gt;


&lt;h3 id="problem-27-lr--and-cholesky-decomposition"&gt;Problem 27: LR- and Cholesky-Decomposition&lt;/h3&gt;
&lt;p&gt;(a) Solve \(Ly = b\) by forward substitution for
&lt;/p&gt;
$$L = \begin{pmatrix} 2 &amp; 0 &amp; 0 \\ -2 &amp; -1 &amp; 0 \\ 3 &amp; 2 &amp; 1 \end{pmatrix}, \quad b = \begin{pmatrix} 4 \\ -3 \\ 6 \end{pmatrix}.$$&lt;p&gt;(b) State the conditions on a matrix \(A \in \mathbb{R}^{N \times N}\) under which a Cholesky decomposition exists, and in the case \(N=3\), derive three formulas for the entries of the Cholesky factor \(L \in \mathbb{R}^{3 \times 3}\) of such a matrix. It is not necessary to express all coefficients of \(L\) solely in terms of coefficients of \(A\), as long as you consider the order of the calculations.&lt;/p&gt;
&lt;p&gt;(c) Let \(A \in \mathbb{R}^{M \times N}\), \(M \geq N\) and \(b \in \mathbb{R}^M\).
(i) Give the normal equation for the least squares problem \(\min_{x \in \mathbb{R}^N} \|Ax - b\|_2^2\).&lt;/p&gt;
&lt;p&gt;(ii) Name an additional condition on \(A\) such that the normal equation could be solved by a Cholesky decomposition, and determine the effort (with respect to \(M\) and \(N\)) of the Cholesky decomposition for the normal equation.&lt;/p&gt;
&lt;p&gt;(iii) Name an iterative method to solve the normal equation under the condition from (ii) and determine the main effort of one step of the method for the normal equation (with respect to \(M\) and \(N\)).&lt;/p&gt;
&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution a)&lt;/summary&gt;
 
 &lt;p&gt;We have&lt;/p&gt;
$$
\begin{align*}
2y_1 = 4 &amp;\implies y_1 = 2 \\
-2 \cdot 2 -y_2 = -3 &amp;\implies y_2 = -1 \\
3 \cdot 2 + 2 \cdot (-1) + 1 y_3 = 6 &amp;\implies y_3 =2
\end{align*}
$$&lt;p&gt;Hence&lt;/p&gt;
$$
y = (2 \ -1 \ 2)^T
$$
 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution b)&lt;/summary&gt;
 
 &lt;p&gt;A choleky decomposition exists if and only if, the matrix &lt;strong&gt;symmetrical&lt;/strong&gt; and &lt;strong&gt;positive definite&lt;/strong&gt;(spd).&lt;/p&gt;
$$
\begin{pmatrix}
a_{11} &amp; a_{12} &amp; a_{13} \\
a_{21} &amp; a_{22} &amp; a_{23} \\
a_{31} &amp; a_{32} &amp; a_{33}
\end{pmatrix} =
\begin{pmatrix}
l_{11} &amp; 0 &amp; 0 \\
l_{21} &amp; l_{22} &amp; 0 \\
l_{31} &amp; l_{32} &amp; l_{33}
\end{pmatrix} \cdot
\begin{pmatrix}
l_{11} &amp; l_{21} &amp; l_{31} \\
0 &amp; l_{22} &amp; l_{32} \\
0 &amp; 0 &amp; l_{33}
\end{pmatrix} =
\begin{pmatrix}
l_{11}^2 &amp; l_{21}l_{11} &amp; l_{31}l_{11} \\
l_{21}l_{11} &amp; l_{22}^2 + l_{21}^2 &amp; l_{21}l_{31} + l_{22}l_{32} \\
l_{31}l_{11} &amp; l_{21}l_{31} + l_{22}l_{32} &amp; l_{33}^2 + l_{32}^2 + l_{31}^2
\end{pmatrix}
$$&lt;p&gt;Hence&lt;/p&gt;
$$
\begin{align*}
l_{11} &amp;= \sqrt{a_{11}} \\
l_{21} &amp;= a_{21}/\sqrt{a_{11}} \\
l_{31} &amp;= a_{31}/\sqrt{a_{11}} \\
&amp;...
\end{align*}
$$
 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution c)&lt;/summary&gt;
 
 &lt;p&gt;(i)
\(A^TAx = A^Tb\)&lt;/p&gt;
&lt;p&gt;(ii)
Is the rang of \(A\) maximal so is \(A^TA\) symmetrical and positive definite and can thus be solves using the cholesky decomposition.&lt;/p&gt;
&lt;p&gt;The cholesky deocmpositon needs \(1/2 MN^2\) operation, but because \(N=M\) and it is symmetrcial, we need \(1/6 N^3\) operations.&lt;/p&gt;
&lt;p&gt;(iii)
Another algorithm we can use to solve the normal equation is the CG-Algorithm.
We need to do 2 matrix-vector products, as such we need to do \(2NM\) operations.&lt;/p&gt;

 
&lt;/details&gt;


&lt;h3 id="problem-28-cg-algorithm"&gt;Problem 28: CG-Algorithm&lt;/h3&gt;
&lt;p&gt;Complete the following content (a) to (i).&lt;/p&gt;
&lt;p&gt;The cg-method is used to solve linear systems of equations of the form \(Ax=b\) with \(A \in \mathbb{R}^{N \times N}\). The necessary conditions for the matrix \(A\) to be able to apply the cg-method are \((a)\) &lt;strong&gt;&lt;strong&gt;&lt;strong&gt;. Instead of solving the linear system directly, the following functional \(\Phi(x) = \) \((b)\)&lt;/strong&gt;&lt;/strong&gt;&lt;/strong&gt; is minimized. The main idea is to solve iteratively one-dimensional minimization problems: Let \(x^k \in \mathbb{R}^N\) and the \((c)\)______ \(d^k \in \mathbb{R}^N \setminus \{0\}\) be given, then \(\alpha_k\) is calculated such that \(\varphi(\alpha) = \Phi(x^k + \alpha d^k)\) is minimal. A sufficient condition for the determination of \(\alpha_k\) is \((d)\)&lt;strong&gt;&lt;strong&gt;&lt;strong&gt;. The new approximation \(x^{k+1}\) is then calculated by \((e)\)&lt;/strong&gt;&lt;/strong&gt;&lt;/strong&gt;. Theoretically, the cg-method provides the exact solution after \((f)\)______ steps. The main effort of the cg-method lies in the calculation of \((g)\)&lt;strong&gt;&lt;strong&gt;&lt;strong&gt;. By \((h)\)&lt;/strong&gt;&lt;/strong&gt;&lt;/strong&gt; the number of steps and thus the total effort can be reduced. The cg-method is particularly well suited for very large and/or \((i)\)______ matrices.&lt;/p&gt;
&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution&lt;/summary&gt;
 
 &lt;p&gt;(a)
symmetrical and positive definite&lt;/p&gt;
&lt;p&gt;(b)
\( \phi = 1/2x^Txx^Tb \)&lt;/p&gt;
&lt;p&gt;(c)
Search direction&lt;/p&gt;
&lt;p&gt;(d)
(\phi&amp;rsquo;(\alpha_k) = 0)&lt;/p&gt;
&lt;p&gt;(e)
\(x^{k+1} = x^k + \alpha_kd^k\)&lt;/p&gt;
&lt;p&gt;(f)
N&lt;/p&gt;
&lt;p&gt;(g)
\(Ad^k\) the matrix vector product&lt;/p&gt;
&lt;p&gt;(h)
Preconditioning&lt;/p&gt;
&lt;p&gt;(i)
sparse&lt;/p&gt;

 
&lt;/details&gt;


&lt;h3 id="problem-29-machine-accuracy"&gt;Problem 29: Machine accuracy&lt;/h3&gt;
&lt;p&gt;Explain the course of the graph in the plot, which was generated by evaluating the function \(\frac{(1+x)-1}{x}\) for \(0 &lt; x \leq 10^{-15}\) with a machine precision of \(\text{eps} \approx 2.2 \cdot 10^{-16}\), by giving the exact reasoning:&lt;/p&gt;


&lt;figure&gt;
 &lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width: 70%" src="https://monkemanx.github.io/attachments/numerical_methods/ws_1718_task3_graph.png"&gt;
&lt;/figure&gt;


&lt;p&gt;(a) for the constant value equal to 0 at the far left of the graph,&lt;/p&gt;
&lt;p&gt;(b) for the first jump of the graph from 0 to 2,&lt;/p&gt;
&lt;p&gt;(c) and for the behavior of the function between the first two jumps.&lt;/p&gt;
&lt;p&gt;(d) Additionally, state the function values at the second jump. Justify briefly.&lt;/p&gt;
&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution a)&lt;/summary&gt;
 
 The graph goes until \(1.1 \cdot 10^{-16}\) which is exactly \(eps/2\), as such we round down from \(1 +x\) to \(1\) as such we have \(0/x = 0\).
 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution b)&lt;/summary&gt;
 
 After \(1.1 \cdot 10^{-16}\) we are above \(eps/2\) as such we round up, from \(1 + x\) to \(1 + eps\). Hence \(1 + eps -1/eps/2 = eps/eps/2 = 2\).
 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution c)&lt;/summary&gt;
 
 The next section in the graph is between \(eps/2\) and \(3eps/2\), in this section \(1 + x\) is constant and bigger than zero.
 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution d)&lt;/summary&gt;
 
 When we reach \(3eps/2\) we have the same effect as in (a), but instead we get \(eps/3/2eps = 2/3\).
 
&lt;/details&gt;


&lt;h3 id="problem-30-qr-decomposition"&gt;Problem 30: QR-Decomposition&lt;/h3&gt;
&lt;p&gt;Given a QR decomposition of the matrix \(A\).
&lt;/p&gt;
$$
Q = \frac{1}{15}
\begin{pmatrix} 5 &amp; -2 &amp; -14 \\ 10 &amp; 11 &amp; 2 \\ 10 &amp; -10 &amp; 5
\end{pmatrix},
\quad R =
\begin{pmatrix} 3 &amp; 1 \\ 0 &amp; -5 \\ 0 &amp; 0
\end{pmatrix},
\quad A =
\begin{pmatrix} 1 &amp; 1 \\ 2 &amp; -3 \\ 2 &amp; 4
\end{pmatrix}0
.$$&lt;p&gt;It holds that \(A=QR\), where you can use the fact that \(Q\) is an orthogonal matrix.&lt;/p&gt;
&lt;p&gt;(a) Using the given decomposition, explain which of the overdetermined systems \(Ax=b\) and \(Ax=\tilde{b}\) are solvable, where&lt;/p&gt;
$$(i) \quad b =
\begin{pmatrix} 0 \\ -5 \\ 2
\end{pmatrix}, \quad (ii)
\quad \tilde{b} =
\begin{pmatrix} 0 \\ -5 \\ 4
\end{pmatrix}.
$$&lt;p&gt;(b) In both cases, use the QR decomposition to calculate the solutions to the corresponding least squares problems.&lt;/p&gt;
&lt;p&gt;(c) Calculate the residuals for these solutions.&lt;/p&gt;
&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution a)&lt;/summary&gt;
 
 &lt;p&gt;We have \(Ax = b \iff QRx = b \iff Rx = Q^Tb\).&lt;/p&gt;
&lt;p&gt;(i)
&lt;/p&gt;
$$
Q^Tb = \frac{1}{15}
\begin{pmatrix} 5 &amp; -2 &amp; -14 \\ 10 &amp; 11 &amp; 2 \\ 10 &amp; -10 &amp; 5
\end{pmatrix}
\begin{pmatrix} 0 \\ -5 \\ 2
\end{pmatrix} =
\frac{1}{15}
\begin{pmatrix} -30 \\ -75 \\ 0
\end{pmatrix} =
\begin{pmatrix} -2 \\ -5 \\ 0
\end{pmatrix}
$$&lt;p&gt;Thus we have the LGS&lt;/p&gt;
$$
\left(
\begin{array}{cc|c}
3 &amp; 1 &amp; -2 \\
0 &amp; -5 &amp; -5 \\
0 &amp; 0 &amp; 0
\end{array}
\right)
$$&lt;p&gt;which has a solution with \(x=(-1 \ 1 )^T\).&lt;/p&gt;
&lt;p&gt;(ii)
&lt;/p&gt;
$$
Q^T\tilde{b} = \frac{1}{15}
\begin{pmatrix} 5 &amp; -2 &amp; -14 \\ 10 &amp; 11 &amp; 2 \\ 10 &amp; -10 &amp; 5
\end{pmatrix}
\begin{pmatrix} 0 \\ -5 \\ 4
\end{pmatrix} =
\frac{1}{15}
\begin{pmatrix} -10 \\ -95 \\ 10
\end{pmatrix} =
\frac{1}{3}
\begin{pmatrix} -2 \\ -19 \\ 0
\end{pmatrix}
$$&lt;p&gt;This is not solvable because the last entry is not \(0\), and in the LGS we have has a \(0\) there.&lt;/p&gt;

 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution b)&lt;/summary&gt;
 
 &lt;p&gt;See (a) for \(b\) the solution is \(x = (-1, 1)^T\).&lt;/p&gt;
&lt;p&gt;For \(\tilde{b}\), the LGS might not be solvable but we can solve the corresponding least square problem. For that we solve&lt;/p&gt;
$$
\left(
\begin{array}{cc|c}
3 &amp; 1 &amp; -2/3 \\
0 &amp; -5 &amp; -19/3 \\
0 &amp; 0 &amp; 0
\end{array}
\right)
$$&lt;p&gt;which is \(x^* = (-29/45, \ 19/15)^T\).&lt;/p&gt;

 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution c)&lt;/summary&gt;
 
 &lt;p&gt;The residium for \(b\) is \(Ax -b = Q(Rx - Q^Tb) = 0\)&lt;/p&gt;
&lt;p&gt;The residium for \(\tilde{b}\) is&lt;/p&gt;
$$
Ax - \tilde{b} = Q(R\tilde{x} - Q^T)\tilde{b} = \frac{2}{9} (2 \ -2 \ 1)^T
$$
 
&lt;/details&gt;


&lt;h3 id="problem-31-splines"&gt;Problem 31: Splines&lt;/h3&gt;
&lt;p&gt;(a) Let nodes \(a = x_0 &lt; \dots &lt; x_N = b\) and corresponding values \(y_0, \dots, y_N \in \mathbb{R}\) be given. Give the definition of a natural interpolating cubic spline for \((x_0, y_0), \dots, (x_N, y_N)\).&lt;/p&gt;
&lt;p&gt;(b) Determine \(\alpha, \beta, \gamma \in \mathbb{R}\) such that the function \(s: [0, 2] \to \mathbb{R}\) defined by
&lt;/p&gt;
$$s(x) = \begin{cases} -x^3 + 8x + \alpha, &amp; 0 \leq x \leq 1, \\ \beta x^3 + \gamma x^2 + 14x - 1, &amp; 1 &lt; x \leq 2 \end{cases}$$&lt;p&gt;
is a cubic spline for \(x_0=0, x_1=1\) and \(x_2=2\).&lt;/p&gt;
&lt;p&gt;(c) Decide whether this spline is a periodic spline. Justify your answer briefly.&lt;/p&gt;
&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution a)&lt;/summary&gt;
 
 &lt;p&gt;A natural interpolation cubic splines fulfills the following conditions:&lt;/p&gt;
$$
\begin{align*}
&amp;(i) s{[x_n, x_{n+1}]} \in \mathbb{P}_3\\\
&amp;(ii) s \in C^2[0,2]\\
&amp;(iii) s(x_n) = y_n \forall x \in \{0,...,N-1\}\\
&amp;(iv) s''(x_0) = s''(x_N) = 0
\end{align*}
$$
 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution b)&lt;/summary&gt;
 
 &lt;p&gt;We first calculate the derivatives&lt;/p&gt;
$$
S'(x) =
\begin{cases}
-3x^2 + 8 \\
3\beta x^2 + \gamma x + 14
\end{cases}
$$&lt;p&gt;and&lt;/p&gt;
$$
S''(x) =
\begin{cases}
-6x \\
6\beta x + \gamma
\end{cases}
$$&lt;p&gt;We get the conditions&lt;/p&gt;
$$
\begin{align*}
S_{[0,1]}(1) &amp;= S_{[1,2]}(1) \\
S'_{[0,1]}(1) &amp;= S'_{[1,2]}(1) \\
S''_{[0,1]}(1) &amp;= S''_{[1,2]}(1) \\
\end{align*}
$$&lt;p&gt;Hence&lt;/p&gt;
$$
\begin{align*}
7+ \alpha &amp;= \beta + \gamma + 13 \\
5 &amp;= 3\beta + 2 \gamma + 14 \\
-6 &amp;= 6 \beta + 2\gamma
\end{align*}
$$&lt;p&gt;From this we get the LGS&lt;/p&gt;
$$
\left(
\begin{array}{ccc|c}
1 &amp; -1 &amp; -1 &amp; 6 \\
0 &amp; -3 &amp; -2 &amp; 9 \\
0 &amp; 6 &amp; 2 &amp; -6
\end{array}
\right)
$$&lt;p&gt;The solution of it, is \(\alpha=1, \beta=1, \gamma=-6\).&lt;/p&gt;

 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution c)&lt;/summary&gt;
 
 &lt;p&gt;A spline is periodic if and only if \(s'(a) = s'(b) \land s''(a) = s''(b)\) is fulfilled.&lt;/p&gt;
$$
S(0) = 1 \neq 11 = S(2)
$$
 
&lt;/details&gt;


&lt;h3 id="problem-32--quadraturformula"&gt;Problem 32: Quadraturformula&lt;/h3&gt;
&lt;p&gt;(a) Let a quadrature formula with nodes \(c_k\) and weights \(b_k\), for \(k=1, \dots, s\), be given.
(i) Give the definition of the order \(p\) of a quadrature formula.
(ii) Name the order conditions for a quadrature formula of order 2.
(iii) Give the order that a quadrature formula with \(s\) nodes can have at most.&lt;/p&gt;
&lt;p&gt;(b) How many nodes are necessary for polynomial interpolation to uniquely determine a polynomial of degree \(N\)? Briefly justify why this interpolation polynomial is unique.&lt;/p&gt;
&lt;p&gt;(c) Give the formula for the nodes of Chebyshev interpolation on the interval \([-1, 1]\). Briefly explain what advantages this choice offers over an equidistant one.&lt;/p&gt;
&lt;p&gt;(d) Let \(p\) be a polynomial of degree \(N \ge 1\) in \(\mathbb{R}^d\). State how the graph \(\Gamma_p\) of \(p\) can be interpreted as a polynomial of degree \(N\) in \(\mathbb{R}^{d+1}\), and explain what the control points of \(p\) are.&lt;/p&gt;
&lt;p&gt;(e) A point of intersection of the circle \(x^2 + y^2 = 2\) and the hyperbola \(x^2 - y^2 = 1\) is to be calculated numerically.
(i) Give the formulation of the problem so that the Newton method can be applied to it.
(ii) Calculate the first iterate for this problem with a starting value of \((1, -1)^T\).&lt;/p&gt;
&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution a)&lt;/summary&gt;
 
 &lt;p&gt;(i)
A quadrature formula has exactly order \(p\) if and only if the integral of the interpolation polynomial is exactly the solution for all polynomials with degree less than \(p-1\), whereby \(p\) is the maximum.&lt;/p&gt;
&lt;p&gt;(ii)
The general quadratur formula order condition is
&lt;/p&gt;
$$
\frac{1}{q} = \sum_{k=1}^s b_k c_k^{q-1}
$$&lt;p&gt;
a formula has the order p if this condition is fulfilled for p but not for \(q = p +1\).&lt;/p&gt;
&lt;p&gt;This means we have the following two coniditons
&lt;/p&gt;
$$
\begin{align*}
1 &amp;= \sum^s b_k \\
1/2 &amp;= \sum^s b_kc_k \\
1/3 &amp;\neq \sum b_k c_k^2
\end{align*}
$$&lt;p&gt;(iii)
The maximum is \(2s\), because then \(\int M(x)g(x) = \int M(x)^2 \neq 0\).&lt;/p&gt;

 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution b)&lt;/summary&gt;
 
 To determine a polynomial of degree \(N\) exactly we need \(N+1\) roots, because of the fundamental lemma of algebra.
If we had two different polynomials \(p,q\), then \(p-q\) has \(N+1\) roots and the polynomial degree \(N\), but this is only true for the zero polynomial, hence the polynomials need to be the same, Contradiction. Thus we have only one polynomial.
 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution c)&lt;/summary&gt;
 
 &lt;p&gt;The roots are&lt;/p&gt;
$$
x_n = \cos(\frac{2n + 1}{2N +2}\pi)
$$&lt;p&gt;The advantage is we have fewer oscillations and the condition is better in comparison to equidistant roots.&lt;/p&gt;

 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution d)&lt;/summary&gt;
 
 $$
\Gamma_p(x) = (0 \ v_0)^T + (1 \ v_1)^Tx + ... + (0 \ v_n)x^N
$$&lt;p&gt;The control points are the coefficients of \(p\) of the berstein polynomial \(p(x) = \sum_{n=0}^{N} b_n B_n^N(x)\).&lt;/p&gt;
 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution e)&lt;/summary&gt;
 
 &lt;p&gt;(i)
The newton method solves zero point problems, thus \(F(x, y) := (x^2 + y^2 - 2, x^2 - y² -1)^T = 0\)&lt;/p&gt;
&lt;p&gt;(ii)
To calculate the first iteration \(x^1 = x^0 + \delta x\) we need to solve the LGS&lt;/p&gt;
$$
\delta x = -F'(1, -1)^{-1}F(-1, 1)^T
$$&lt;p&gt;The Jacobi Matrix of this is&lt;/p&gt;
$$
F'(x,y)=
\begin{pmatrix}
2x &amp; 2y \\
2x &amp; -2y
\end{pmatrix}
$$&lt;p&gt;We need to check this at the point \(x_0\)&lt;/p&gt;
$$
F'(1,-1)=
\begin{pmatrix}
2 &amp; -2 \\
2 &amp; 2
\end{pmatrix}
$$&lt;p&gt;Thus&lt;/p&gt;
$$
\delta x =
\frac{1}{4}
\begin{pmatrix}
1 &amp; 1 \\
-1 &amp; 1
\end{pmatrix}
\begin{pmatrix}
0 \\
-1
\end{pmatrix} =
\frac{1}{4}
\begin{pmatrix}
1 \\
-1
\end{pmatrix}
$$&lt;p&gt;Hence&lt;/p&gt;
$$
x^1 = (\frac{5}{4}, - \frac{3}{4})
$$
 
&lt;/details&gt;


&lt;h3 id="problem-33-lr-and-qr-decomposition"&gt;Problem 33: LR and QR-decomposition&lt;/h3&gt;
&lt;p&gt;Given the linear system of equations \(Mx = \mathbf{b}\) with a regular matrix
&lt;/p&gt;
$$
M = \begin{pmatrix} A &amp; B \\ 0 &amp; C \end{pmatrix} \in \mathbb{R}^{(N+K)\times(N+K)}, \quad \mathbf{b} = \begin{pmatrix} \mathbf{b}^1 \\ \mathbf{b}^2 \end{pmatrix} \in \mathbb{R}^{N+K},
$$&lt;p&gt;
where \(A \in \mathbb{R}^{N \times N}, B \in \mathbb{R}^{N \times K}, C \in \mathbb{R}^{K \times K}, \mathbf{b}^1 \in \mathbb{R}^N\) and \(\mathbf{b}^2 \in \mathbb{R}^K\).&lt;/p&gt;
&lt;p&gt;An \(LR\)-decomposition \(PA = LR_A\) of \(A\) and a \(QR\)-decomposition \(C = QR_C\) of \(C\) are already known. The matrices \(A\), \(B\), and \(C\) are assumed to be full.&lt;/p&gt;
&lt;p&gt;(a) State how many operations were necessary for the computation of the \(LR\)- and \(QR\)-decompositions, respectively.&lt;/p&gt;
&lt;p&gt;(b) Explain how you can efficiently solve the system of equations \(Mx = \mathbf{b}\) using these two decompositions.&lt;/p&gt;
&lt;p&gt;(c) Determine the computational cost for solving \(Mx = \mathbf{b}\) without the decompositions, by stating the cost for each sub-step.&lt;/p&gt;
&lt;p&gt;(d) Explain the procedure for the linear system of equations \(M^T\mathbf{x} = \mathbf{b}\) by cleverly using both decompositions. The computational cost is not requested here.&lt;/p&gt;
&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution a)&lt;/summary&gt;
 
 For LR-Decomposition we need \(1/3 N^3\) operation. For QR-Decomposition we need \(2/3MN^2=2/3K^3\) operation.
 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution b)&lt;/summary&gt;
 
 &lt;p&gt;This means&lt;/p&gt;
$$
Ax_1 + Bx_2 = b_1 \iff Ax_1 = b_1 - Bx_2
$$&lt;p&gt;and&lt;/p&gt;
$$
Cx_2 = b_2
$$&lt;p&gt;Hence&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Solve \(Q c = b_2 \iff c = Q^Tb_2\)&lt;/li&gt;
&lt;li&gt;Solve \(R x_2 = c\) using backward substitution&lt;/li&gt;
&lt;li&gt;Solve \(Rc = P(b_a - Bx_2)\) forward substitution&lt;/li&gt;
&lt;li&gt;Solve \(L x_1 = c\) backwards substitution&lt;/li&gt;
&lt;/ol&gt;

 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution c)&lt;/summary&gt;
 
 &lt;ol&gt;
&lt;li&gt;\(K^2\) operations&lt;/li&gt;
&lt;li&gt;\(1/2 K^2\) operations&lt;/li&gt;
&lt;li&gt;\(0 + N+NK\) operations&lt;/li&gt;
&lt;li&gt;\(1/2N^2\) operations&lt;/li&gt;
&lt;/ol&gt;

 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution d)&lt;/summary&gt;
 
 &lt;p&gt;We now have&lt;/p&gt;
$$
M^T = \begin{pmatrix} A^T &amp; 0 \\ B^T &amp; C^T \end{pmatrix}
$$&lt;p&gt;Hence&lt;/p&gt;
$$
(i) \quad Ax_1 = b_1
$$&lt;p&gt;and&lt;/p&gt;
$$
(ii) \quad Bx_1 + Cx_2 = b_2 \iff Cx_2 = b_2 - Bx_1
$$&lt;p&gt;We can solve it using&lt;/p&gt;
$$
PA = LR \iff A^T = R_A^TL^T
$$&lt;p&gt;and&lt;/p&gt;
$$
C = QR \iff C^T = R_c^TQ^T
$$&lt;p&gt;Then solve (i) using the first decomposition and (ii) using the second decompsotion.&lt;/p&gt;

 
&lt;/details&gt;


&lt;h3 id="problem-34-newton-method-and-floating-numbers"&gt;Problem 34: Newton Method and Floating Numbers&lt;/h3&gt;
&lt;p&gt;The goal is to approximate \(\sqrt{a}\) for \(a &gt; 1\).&lt;/p&gt;
&lt;p&gt;(a) State the function \(f: \mathbb{R} \to \mathbb{R}\) proposed in the lecture and the corresponding Newton&amp;rsquo;s method to approximately determine \(\sqrt{a}\).&lt;/p&gt;
&lt;p&gt;(b) Create a sketch and illustrate in it that with the starting value \(x_0 = 1\), it follows that \(x_1 &gt; \sqrt{a}\), where \(x_1\) denotes the first Newton iterate.&lt;/p&gt;
&lt;p&gt;(c) Use the concrete representation of floating-point numbers in the IEEE Double-Precision standard to justify that one must ultimately only be able to calculate square roots of numbers from the interval \((1, 4)\).&lt;/p&gt;
&lt;p&gt;(d) We want to use a computer in the IEEE Double-Precision standard to calculate the expression \(\sqrt{x^2 + y^2}\) for \(x = \mathrm{fl}(\pi \cdot 10^{160})\) and \(y = \mathrm{fl}(e \cdot 10^{150})\). Explain which problem will arise with a naive calculation and how the problem can be remedied. Additionally, determine the value that the computer calculates with the remedied variant.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Hint: \(\sqrt{x^2 + y^2} = \sqrt{x^2(1 + \frac{y^2}{x^2})} = |x|\sqrt{1 + \frac{y^2}{x^2}}\) might be helpful.&lt;/em&gt;&lt;/p&gt;
&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution a)&lt;/summary&gt;
 
 &lt;p&gt;The newton-method works as follows:&lt;/p&gt;
$$
x^{k+1} = x^k + d^k
$$&lt;p&gt;with&lt;/p&gt;
$$
f'(x)d^k = -f(x)
$$&lt;p&gt;we repeat this until \(||d^k|| &lt; \epsilon\).&lt;/p&gt;
&lt;p&gt;And where \(f(x) = x^2 - a\) and \(f'(x)=x\)&lt;/p&gt;

 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution b)&lt;/summary&gt;
 
 &lt;figure&gt;
 &lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width: 80%" src="https://monkemanx.github.io/attachments/numerical_methods/newton_method_example_tangent.png"&gt;
&lt;/figure&gt;

 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution c)&lt;/summary&gt;
 
 &lt;p&gt;In IEEE we have \(a = (1+m)2^e\) with \(0 \leq m \le 1\).&lt;/p&gt;
&lt;p&gt;If \(e\) is even, then \(a = (1+m)2^2k\), hence \(\sqrt{a} = \sqrt{(1+m)}2^k\), where \(m' \in (1, 2)\)&lt;/p&gt;
&lt;p&gt;If \(e\) is uneven, then \(a = (1+m)2^{2k+1}\), hence \(\sqrt{a} = \sqrt{(1+m)}2^{(2k+1)/2} = \sqrt{2(2+m)}2^{(2k)/2}\) where \(m' \in (2,4)\)&lt;/p&gt;

 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution d)&lt;/summary&gt;
 
 &lt;p&gt;Because of \(x^2 = \pi^2 \cdot 10^{320} &gt; 10^{308}\) we have an overflow.&lt;/p&gt;
&lt;p&gt;We can use the hint and \(\sqrt{x^2 +y^2} = x \sqrt{1 + \frac{y}{x}}^2\). Here we have no overflow, because&lt;/p&gt;
$$
0 \le (y/x)^2 \le e^2/\pi^2 10^{-20} \le eps/2
$$
 
&lt;/details&gt;


&lt;h3 id="problem-35-matrices-and-norms"&gt;Problem 35: Matrices and Norms&lt;/h3&gt;
&lt;p&gt;(a) Prove \(\|A\|_{\infty} = \max_{n=1,\dots,N} \sum_{m=1}^N |a_{nm}|\) for \(A \in \mathbb{R}^{N \times N}\).&lt;/p&gt;
&lt;p&gt;(b) Show that \(\mathrm{cond}_2(Q) = 1\) for every orthogonal matrix \(Q \in \mathbb{R}^{N \times N}\).&lt;/p&gt;
&lt;p&gt;(c) Let \(\mathbf{e} \in \mathbb{R}^N\) be the vector consisting of all ones. Show that \(\|\mathbf{v}\mathbf{e}^\top\|_1 = \|\mathbf{v}\|_1\) for every vector \(\mathbf{v} \in \mathbb{R}^N\).&lt;/p&gt;
&lt;p&gt;(d) Let \(A \in \mathbb{R}^{N \times N}\) be regular, \(\|\cdot\|\) a norm on \(\mathbb{R}^N\) with the corresponding induced matrix norm \(\|\cdot\|\), and \(\mathbf{x} \in \mathbb{R}^N\). Let \(\tilde{\mathbf{x}}\) be a perturbation of \(\mathbf{x}\).
Derive an upper bound for the relative error of the product \(A\mathbf{x}\) as a function of the relative perturbation in \(\mathbf{x}\) (\(A\) remains unperturbed), by proving and then using \(\|\mathbf{x}\| \le \|A^{-1}\| \|A\mathbf{x}\|\).&lt;/p&gt;
&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution a)&lt;/summary&gt;
 
 $$
||A||_\infty = \max_{||x|| = 1} ||Ax||_{\infty}
$$&lt;p&gt;Further&lt;/p&gt;
$$
||Ax||_{\infty} = \max_{n=1,...,N} |\sum a_{nm}x_m| \leq \max_{n=1,...,N} \sum |a_{nm}| |x_m|
$$&lt;p&gt;where \(||x_m||_\infty = 1\).&lt;/p&gt;

 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution b)&lt;/summary&gt;
 
 &lt;p&gt;We have&lt;/p&gt;
$$
||Q||_2 = \max_{||x||_2 = 1} ||Qx||_2 = 1
$$&lt;p&gt;Hence&lt;/p&gt;
$$
cond_2(Q) = ||Q||_2 ||Q^T||_2 = ||Q||_2^2 = 1
$$
 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution c)&lt;/summary&gt;
 
 $$
||ve^T||_1 = max \sum |a_nm| = \sum |v_n| = ||v||_1
$$
 
&lt;/details&gt;


&lt;h3 id="problem-36-quadrature-formulas"&gt;Problem 36: Quadrature formulas&lt;/h3&gt;
&lt;p&gt;Let a quadrature formula \((b_k, c_k)_{k=1,\ldots,s}\) be given.&lt;/p&gt;
&lt;p&gt;(a) Formulate the definition of the order \(p\) of a quadrature formula.&lt;/p&gt;
&lt;p&gt;(b) Give the Lagrange polynomial \(L_j\) for the nodes \(c_1 &lt; \dots &lt; c_s\).&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Hint: \(f\) is called point-symmetric if \(f(-x) = -f(x)\) for \(x \in [-1, 1]\).&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;(c) Give a symmetric quadrature formula of your choice.&lt;/p&gt;
&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution a)&lt;/summary&gt;
 
 A quadraturformel has the order \(p\) then, when it can &lt;strong&gt;exactly&lt;/strong&gt; integrate for all polynomial with degree \(\leq p-1\) and where \(p\) is maximal.
 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution b)&lt;/summary&gt;
 
 $$
L_j = \prod \frac{x - c_k}{c_j - c_k}
$$
 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution c)&lt;/summary&gt;
 
 Trapezrule \((a-b)(f(a)-f(b))/2\).
 
&lt;/details&gt;


&lt;h3 id="problem-37-short-questions"&gt;Problem 37: Short Questions&lt;/h3&gt;
&lt;p&gt;(a) Given are the points \((t_n, y_n)\), \(n = 1, 2, 3, 4\), with
&lt;/p&gt;
$$\begin{array}{c|cccc} t_n &amp; 0 &amp; 1 &amp; 2 &amp; 3 \\ \hline y_n &amp; -2 &amp; -1 &amp; 0 &amp; 2 \end{array}.$$&lt;p&gt;
A quadratic function \(g(t) = \alpha + \beta t + \gamma t^2\), \(\alpha, \beta, \gamma \in \mathbb{R}\), is sought, such that \(\sum_{n=1}^4 |g(t_n) - y_n|^2\) is minimized.
Formulate the corresponding linear least squares problem and give the general form of the corresponding normal equations.&lt;/p&gt;
&lt;p&gt;(b) Determine the Householder transformation \(Q\) that is free from cancellation errors, such that \(QAQ = \begin{pmatrix} * &amp; * &amp; * \\ * &amp; * &amp; * \\ 0 &amp; * &amp; * \end{pmatrix}\) holds for
&lt;/p&gt;
$$A = \begin{pmatrix} 1 &amp; -1 &amp; 2 \\ 3 &amp; 0 &amp; 1 \\ 4 &amp; 1 &amp; 0 \end{pmatrix}.$$&lt;p&gt;
Briefly explain why the \(*\)-structure is achieved this way.&lt;/p&gt;
&lt;p&gt;(c) Let \(s: [a, b] \to \mathbb{R}\) be a cubic interpolating spline for the support points \((x_n, y_n)\), \(n = 0, \ldots, N\), with \(s'(a) = s'(b) = 0\). Formulate the definition of the Lagrange splines \(l_n\) for \(n = 0, \ldots, N\) and represent \(s\) using these.&lt;/p&gt;
&lt;p&gt;(d) Give a class of matrices for which the singular values correspond to the eigenvalues. Justify your answer briefly.&lt;/p&gt;
&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution a)&lt;/summary&gt;
 
 &lt;p&gt;Linear least square problem:&lt;/p&gt;
$$
min ||A(\alpha \ \ \beta \ \ \gamma)^T - b||_2
$$&lt;p&gt;with&lt;/p&gt;
$$
b = (-2 \ \ -1 \ \ 0 \ \ 2)^T
$$&lt;p&gt;and&lt;/p&gt;
$$
A =
\begin{pmatrix}
1 &amp; 0 &amp; 0 \\
1 &amp; 1 &amp; 1 \\
1 &amp; 2 &amp; 4 \\
1 &amp; 3 &amp; 9
\end{pmatrix}
$$&lt;p&gt;Normal equations:&lt;/p&gt;
$$
A^TAx = A^Tb
$$
 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution b)&lt;/summary&gt;
 
 &lt;p&gt;We do a householder transformation&lt;/p&gt;
$$
\hat{Q} = I_2 - 2\hat{w}\hat{w}^T
$$&lt;p&gt;and&lt;/p&gt;
$$
\hat{w} = (3 \ \ 4)^T + 5 (1 \ \ 0)^T/||(8 \ \ 4)||_2 = 1/\sqrt{80}(8 \ \ 4)^T
$$&lt;p&gt;With \(w = (0 \ \ \hat{w})\) and&lt;/p&gt;
$$
Q = I_3 - ww^T =
\begin{pmatrix}
1 &amp; 0 \\
0 &amp; \hat{Q}
\end{pmatrix}
$$&lt;p&gt;And because \(Qe^1 = e^1\) we have \(QAQ\) as in the task.&lt;/p&gt;

 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution c)&lt;/summary&gt;
 
 &lt;p&gt;\(l_n\) is a cubic interpolation spline with the roots \((x_n, y_n)\) with \(l_n'(a) = l_n(b) = 0\).&lt;/p&gt;
&lt;p&gt;And: \(s_n(x) = \sum y_n l_n(x_)\)&lt;/p&gt;

 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution d)&lt;/summary&gt;
 
 &lt;p&gt;The identity matrix because its eigenvaleus are 1 and the square root of 1 is 1.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Better Alternative:&lt;/strong&gt; All spd Matrices, because \(\lambda\) EV from A \(\iff\) \(\lambda^2\) EV from \(A^TA\) \(\iff\) \(\lambda = \sqrt{\lambda^2}\) Singular value from \(A\).&lt;/p&gt;

 
&lt;/details&gt;


&lt;h3 id="problem-38-cholesky"&gt;Problem 38: Cholesky&lt;/h3&gt;
&lt;p&gt;Let \(A \in \mathbb{R}^{N \times N}\) be a symmetric positive definite matrix.&lt;/p&gt;
&lt;p&gt;(a) Explain how and with what computational cost \(\det(A)\) can be calculated efficiently.&lt;/p&gt;
&lt;p&gt;For given vectors \(\mathbf{u}, \mathbf{v}, \mathbf{b} \in \mathbb{R}^N\) and \(d, c \in \mathbb{R}\), we now consider the linear system of equations (sought are \(\mathbf{x} \in \mathbb{R}^N\) and \(y \in \mathbb{R}\))
&lt;/p&gt;
$$\begin{pmatrix} A &amp; \mathbf{u} \\ \mathbf{v}^\top &amp; d \end{pmatrix} \begin{pmatrix} \mathbf{x} \\ y \end{pmatrix} = \begin{pmatrix} \mathbf{b} \\ c \end{pmatrix} \quad (1)$$&lt;p&gt;
with unknown solution \(\mathbf{x}^* \in \mathbb{R}^N\) and \(y^* \in \mathbb{R}\), where a Cholesky decomposition of matrix \(A\) is known.&lt;/p&gt;
&lt;p&gt;(b) First, derive an explicit formula for \(y^*\) independent of \(\mathbf{x}^*\) under the assumption \(d - \mathbf{v}^\top A^{-1} \mathbf{u} \neq 0\).&lt;/p&gt;
&lt;p&gt;(c) Explain how and with what computational cost \(y^*\) can be calculated numerically efficiently.&lt;/p&gt;
&lt;p&gt;(d) Investigate under what conditions the matrix in (1) is symmetric and positive definite, using the Cholesky decomposition of \(A\).&lt;/p&gt;
&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution a)&lt;/summary&gt;
 
 Since the matrix is spd we can do a cholesky decomposition in \(A = LL^T\) with \(det(A) = det(L)det(L^T)\) cholesky takes \(1/6N^2\) operations and we can calculate the determinant by \(\prod l_{nn}\).
 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution b)&lt;/summary&gt;
 
 &lt;p&gt;We have&lt;/p&gt;
$$
Ax + uy = b \iff x = A^{-1}(b - uy)
$$&lt;p&gt;and&lt;/p&gt;
$$
v^Tx + dy = c \iff v^TA^{-1}b - v^TA^{-1}uy + dy = c
$$&lt;p&gt;Hence&lt;/p&gt;
$$
y = \frac{c - v^TA^{-1}b}{d - v^TA^{-1}u}
$$
 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution c)&lt;/summary&gt;
 
 &lt;p&gt;The expensive part to calculate is \(v^TA^{-1}\), we thus want to calculate this efficiently by using the cholesky decomposition.
For this we define \(\hat{v} = v^TA^{-1}\) then \(v^TA^{-1} = v^TA^{-1} \iff A^Tv^TA^{-1} = v \iff A^T\hat{v} = v\). Then we can solve as follows&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;\(L^ \hat{\hat{v}} = v\) forward substitution&lt;/li&gt;
&lt;li&gt;\(L^T \hat{v} = \hat{\hat{v}}\) backward substitution&lt;/li&gt;
&lt;li&gt;Calculate Scalarproduct of \(\hat{v}^Tb\) and \(\hat{v}^Tu\)&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;This takes in total \(N^2 + 2N\) operations.&lt;/p&gt;

 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution d)&lt;/summary&gt;
 
 &lt;p&gt;Symmetry:&lt;/p&gt;
$$
\begin{pmatrix}
A &amp; \mathbf{u} \\
\mathbf{v}^\top &amp; d
\end{pmatrix}^T =
\begin{pmatrix}
A^T &amp; \mathbf{v} \\
\mathbf{u}^T &amp; d
\end{pmatrix}
$$&lt;p&gt;This means the matrix is then symmetrical if \(v = u\).&lt;/p&gt;
&lt;p&gt;Positive definite:&lt;/p&gt;
&lt;p&gt;The matrix is exactly then positive definite if a cholesky decomposition exists.&lt;/p&gt;

 
&lt;/details&gt;


&lt;h3 id="problem-39-interpolation-polynomial"&gt;Problem 39: Interpolation polynomial&lt;/h3&gt;
&lt;p&gt;(a) Let the support points \((x_0, f_0), \ldots, (x_N, f_N)\) be given. Formulate the definition of the interpolation polynomial and prove that such a polynomial exists.&lt;/p&gt;
&lt;p&gt;(b) Determine the interpolation polynomial in Newton form for the support points \((1, 16)\), \((3, 4)\) and \((5, 8)\), explicitly stating the Newton polynomials.&lt;/p&gt;
&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution a)&lt;/summary&gt;
 
 &lt;p&gt;Let \(p\) be the interpolation polynomial then the following needs to apply:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;\(p_{|x_{n-1};x_{n}} \in P\)&lt;/li&gt;
&lt;li&gt;\(p(x_n) = y_n\)&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;We can display it using the lagrange base&lt;/p&gt;
$$
p(x) = \sum f_n L_n
$$&lt;p&gt;the lagrange polynomial fulfills \(L_n(x_{nm}) = \delta_{nm}\)&lt;/p&gt;

 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution b)&lt;/summary&gt;
 
 &lt;p&gt;We get the polynomial&lt;/p&gt;
$$
p(x) = 16 - 6(x - 1) + 2(x-1)(x-3)
$$
 
&lt;/details&gt;


&lt;h3 id="problem-40-householder-transformations"&gt;Problem 40: Householder Transformations&lt;/h3&gt;
&lt;p&gt;Let \(Q \in \mathbb{R}^{N \times N}\) be a Householder transformation.&lt;/p&gt;
&lt;p&gt;(a) Show that \(Q \in \mathbb{R}^{N \times N}\) is orthogonal.&lt;/p&gt;
&lt;p&gt;(b) Explain how and with what computational cost \(Q\mathbf{y}\) for \(\mathbf{y} \in \mathbb{R}^N\) is calculated.&lt;/p&gt;
&lt;p&gt;Now let \(A \in \mathbb{R}^{N \times N}\) with maximal rank.&lt;/p&gt;
&lt;p&gt;(c) Give a Householder transformation \(Q_1\) such that the first column of \(\tilde{A} := Q_1A\) is a multiple of \(\mathbf{e}^1\).&lt;/p&gt;
&lt;p&gt;(d) Explain how a Householder transformation \(P_1\) can be used to reflect the &lt;strong&gt;first row&lt;/strong&gt; of \(\tilde{A}\) onto a vector of the structure \((* \ * \ * \ \ldots \ 0)\) without changing the first column of \(\tilde{A}\). Also, give the structure of the Householder vector.&lt;/p&gt;
&lt;p&gt;(e) By continuing the process described in sub-tasks (c) and (d), \(A\) can be transformed by Householder transformations into the form
&lt;/p&gt;
$$B = \begin{pmatrix} * &amp; * &amp; &amp; &amp; \\ * &amp; * &amp; * &amp; &amp; \\ &amp; * &amp; * &amp; * &amp; \\ &amp; &amp; \ddots &amp; \ddots &amp; \ddots \\ &amp; &amp; &amp; * &amp; * \end{pmatrix} \in \mathbb{R}^{N \times N}$$&lt;p&gt;
(all entries in \(B\) not marked with a \( * \) are zero).
Express \(B\) in terms of these transformations and \(A\).&lt;/p&gt;
&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution a)&lt;/summary&gt;
 
 $$
QQ^T = (I - 2ww^T)(I-2ww^T)^T = (I - 2ww^T)(I - 2ww^T) =
$$&lt;p&gt;
&lt;/p&gt;
$$
I^2 - 4ww^T + 4ww^Tww^T = I - 4ww^T + 4ww^T = I
$$
 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution b)&lt;/summary&gt;
 
 We never calculate the householder matrix \(Q\), instead we clauclate the househodler vector \(Qy = (I-2ww^T)y\), which takes \(2N\) operations, which consists of one scala product, one difference of vector and one vector vector product.
 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution c)&lt;/summary&gt;
 
 &lt;p&gt;The householder transformation is&lt;/p&gt;
$$
w = \frac{a - \theta v}{||a - \theta v||}
$$&lt;p&gt;with&lt;/p&gt;
$$
\theta =
\begin{cases}
-||v||_2, \quad v_1 &gt; 0\\
||v||_2, \quad else \\
\end{cases}
$$&lt;p&gt;where \(a_1\) is the fist column of \(A\) and \(v = e^1\).&lt;/p&gt;

 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution d)&lt;/summary&gt;
 
 Why would you ask this :'(
 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution e)&lt;/summary&gt;
 
 &lt;p&gt;We get&lt;/p&gt;
$$
B = QAP = Q_{N-1} \cdot ... \cdot Q_1 A P_1 \cdot ... \cdot P_{N-2}
$$
 
&lt;/details&gt;


&lt;h3 id="problem-41-qr"&gt;Problem 41: QR&lt;/h3&gt;
&lt;p&gt;To approximately calculate the eigenvalues of a matrix \(A \in \mathbb{R}^{N \times N}\), we got to know the \(QR\)-algorithm. In this, the matrix \(A\) is first brought into Hessenberg form \(H = Q^T A Q\) by \(\boxed{\text{(a)}}\) many Householder transformations. For this, \(\boxed{\text{(b)}}\) operations are generally necessary. We understand an operation as \(\boxed{\text{(c)}}\). If the original matrix \(A\) is symmetric, then \(H\) is a \(\boxed{\text{(d)}}\) matrix.&lt;/p&gt;
&lt;p&gt;The \(QR\)-decomposition with a shift \(\mu\) can be used to improve convergence. In one step of the algorithm, the \(QR\)-decomposition of \(\boxed{\text{(e)}}\) is calculated, and with it the matrix \(\bar{H} = \boxed{\text{(f)}}\). If the matrix \(H\) is irreducible and the shift \(\mu\) is an eigenvalue of \(H\), then \((e^N)^T \bar{H} = \boxed{\text{(g)}}\). If we specifically choose the shift \(\mu = h_{NN}\), then quadratic convergence generally occurs, and in the symmetric case, cubic convergence. Quadratic convergence means that from \(\boxed{\text{(h)}}\) the representation \(\bar{h}_{N,N-1} = \boxed{\text{(i)}}\) follows. If quadratic convergence is present, the number of correct decimal places of \(\mu\) as an approximation of the eigenvalue approximately \(\boxed{\text{(j)}}\).&lt;/p&gt;
&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution&lt;/summary&gt;
 
 &lt;p&gt;(a)
N-2&lt;/p&gt;
&lt;p&gt;(b)
O(N^3)&lt;/p&gt;
&lt;p&gt;(c)
Addition + multiplication&lt;/p&gt;
&lt;p&gt;(d)
Tridiagonalmatrix&lt;/p&gt;
&lt;p&gt;(e)
\(H - \mu I_N= QR\)&lt;/p&gt;
&lt;p&gt;(f)
\(H = RQ + \mu I_N\)&lt;/p&gt;
&lt;p&gt;(g)
\((0,...,0,\mu)^T\)&lt;/p&gt;
&lt;p&gt;(h)
/&lt;/p&gt;
&lt;p&gt;(i)
/&lt;/p&gt;
&lt;p&gt;(j)
doubling&lt;/p&gt;

 
&lt;/details&gt;


&lt;h3 id="problem-42-quadratur-formula"&gt;Problem 42: Quadratur formula&lt;/h3&gt;
&lt;p&gt;We consider quadrature formulas with weights and nodes \((b_k, c_k)_{k=1,\ldots,s}\), where the nodes are pairwise distinct.&lt;/p&gt;
&lt;p&gt;(a) Define the Lagrange polynomials \(L_j, j = 1, \ldots, s\), for the nodes \(c_1, \ldots, c_s\) and state their degree.&lt;/p&gt;
&lt;p&gt;(b) Prove the implication: If the weights of the quadrature formula are given by
&lt;/p&gt;
$$b_j = \int_0^1 L_j(x)dx, \quad j = 1, \ldots, s,$$&lt;p&gt;
then it has order \(p \ge s\).&lt;/p&gt;
&lt;p&gt;(e) Approximate \(\int_1^5 \cos(x-3)dx\) with the quadrature formula, which is given by \(b_1 = b_2 = \frac{1}{2}\) and \(c_1 = 1/4, c_2 = 3/4\).&lt;/p&gt;
&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution a)&lt;/summary&gt;
 
 $$
L_n = \prod_{j \neq k} \frac{x - c_j}{c_j - c_k}
$$
 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution b)&lt;/summary&gt;
 
 &lt;p&gt;A quadrature formula has then order p if it integrates all polynomial with degree \(\leq p-1\) exactly where p is maximal.&lt;/p&gt;
&lt;p&gt;We can then write our quadrature formula as&lt;/p&gt;
$$
f(x) = \sum f(c_k)L_k(x)
$$&lt;p&gt;Hence&lt;/p&gt;
$$
\int f(x) dx = \sum f(c_k) \int L_k(x) = \sum b_k f(c_k)
$$
 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution e)&lt;/summary&gt;
 
 $$
Q(f) = (b -a) \sum b_k f(a + c_k(b-a)) = 4 cos(1)
$$
 
&lt;/details&gt;


&lt;h3 id="problem-43-short-questions"&gt;Problem 43: Short questions&lt;/h3&gt;
&lt;p&gt;(a) We consider the approximations \(\pi_n = \frac{n}{2} g_{2n}\) of \(\pi\) for \(n = 6, 12, 24, \ldots\), where we calculate \(g_{2n} = \sqrt{2 - \sqrt{4 - g_n^2}}\) with the starting value \(g_6 = 1\). The calculation is implemented in double-precision format of the IEEE standard.&lt;/p&gt;
&lt;p&gt;Formulate a conjecture as to whether the sequence of calculated approximations \(\pi_6, \pi_{12}, \pi_{24}, \ldots\) will converge to \(\pi\). Justify your conjecture and, if necessary, suggest an alternative calculation for \(g_{2n}\).&lt;/p&gt;
&lt;p&gt;(b) Formulate Newton&amp;rsquo;s method for the approximate solution of \(\mathbf{f}(\mathbf{x}) = \mathbf{0}\) with a \(C^1\)-function \(\mathbf{f}: \mathbb{R}^N \to \mathbb{R}^N\) and briefly discuss the computational cost of this method compared to the simplified Newton&amp;rsquo;s method.&lt;/p&gt;
&lt;p&gt;(c) Formulate the fixed-point iteration of a general linear iteration and give the preconditioner \(B\) specifically for the Jacobi and Gauss-Seidel methods. Define the quantities that appear.&lt;/p&gt;
&lt;p&gt;(d) Calculate \(\|\mathbf{x}\|_A\) for \(A = \mathrm{diag}(11, 11, 13) + \mathbf{e}\mathbf{e}^\top\) and \(\mathbf{x} = (1 \ -1 \ 1)^\top\), where \(\mathbf{e} = (1 \ 1 \ 1)^\top\) holds.&lt;/p&gt;
&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution a)&lt;/summary&gt;
 
 &lt;p&gt;One can see that \(g_{n} \to 0\) for \( n \to \infty\)&lt;/p&gt;
&lt;p&gt;Because of that the inner root over times goes towards 4. Because of that subtracts two values which have enarly the identical norm i.e. 2 -2.&lt;/p&gt;
&lt;p&gt;Hence we have a problem, the significant digits of the mantisse are destroyed while the lesser important ones which are subject to rounding errors dominate.&lt;/p&gt;
&lt;p&gt;A better formula would be \(g_{2n} = \frac{g_n}{\sqrt{2 + \sqrt{4 - g_n^2}}}\)&lt;/p&gt;

 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution b)&lt;/summary&gt;
 
 $$
x^{k+1} = x^k + d^k
$$&lt;p&gt;and&lt;/p&gt;
$$
f'(x)d_k ) = - f(x)
$$&lt;p&gt;In the simple newton method we instead do&lt;/p&gt;
$$
Ad^k = -f(x^k)
$$&lt;p&gt;where \(A \approx f'(x_0)\).&lt;/p&gt;
&lt;p&gt;In the simple newton method we only need calculate once the derivative i.e. the jacobi matrix and we only need once to decompose it. We still need to solve every step a LGS. But it only converges locally linearly isnetad of quardtaic.&lt;/p&gt;

 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution c)&lt;/summary&gt;
 
 $$
x^{k+1} = x^k + d^k
$$&lt;p&gt;with&lt;/p&gt;
$$
Bc^k = r^k
$$&lt;p&gt;and&lt;/p&gt;
$$
r^{k+1} = r^k - Ac^k
$$&lt;p&gt;until \(r_k \le eps ||b||\).&lt;/p&gt;
&lt;p&gt;Where \(A = L + D + R\) in Jacobi \(B = D\) in Gauß-Seidel \(B = L + D\).&lt;/p&gt;

 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution d)&lt;/summary&gt;
 
 $$
||x||_A^2 = x^TAx = x^TDx + x^Tee^Tx = 36
$$&lt;p&gt;Hence&lt;/p&gt;
$$
||x||_A = \sqrt{36} = 6
$$
 
&lt;/details&gt;


&lt;h3 id="problem-44-choleksy-and-lr"&gt;Problem 44: Choleksy and LR&lt;/h3&gt;
&lt;p&gt;Given:
&lt;/p&gt;
$$A_{\alpha,\beta} = \begin{pmatrix} 2 &amp; \alpha &amp; 1 \\ \beta &amp; 4 &amp; 0 \\ 1 &amp; 0 &amp; 2 \end{pmatrix}, \quad \alpha, \beta \in \mathbb{R}, \quad \mathbf{b} = \begin{pmatrix} 3 \\ 4 \\ 5 \end{pmatrix}$$&lt;p&gt;a) Determine all \(\alpha, \beta \in \mathbb{R}\) for which a Cholesky decomposition of \(A_{\alpha,\beta}\) exists. Use the principal minors criterion.&lt;/p&gt;
&lt;p&gt;b) For \(\alpha = 1, \beta = 4\), calculate the \(LR\)-decomposition of \(A_{1,4}\). Use the decomposition to find the solution of the linear system \(A_{1,4}\mathbf{x} = \mathbf{b}\).&lt;/p&gt;
&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution a)&lt;/summary&gt;
 
 &lt;p&gt;For a cholesky matrix to exist it need to be symmetrical and positive definite. It is symmetrical when \(\alpha = \beta\).&lt;/p&gt;
&lt;p&gt;For positive definite we calculate the determinant of the main minors&lt;/p&gt;
$$
det_1(A) = 2, \quad det_2(A) = 8 - \alpha \beta, \quad det_3(A) = 2 det_2(A) + 1 \cdot (-4) = 12 - 2 \alpha \beta
$$&lt;p&gt;from (2) we get \(\alpha \beta &lt; 8\), from (3) we get \(\alpha\beta &lt; 6\). From this follows \(\alpha\beta = \alpha^2 &lt; 6 \iff \alpha &lt; \sqrt{6}\).&lt;/p&gt;
&lt;p&gt;Hence \(\alpha,\beta \in (-\sqrt{6}, \sqrt{6})\)&lt;/p&gt;

 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution b)&lt;/summary&gt;
 
 &lt;p&gt;We have&lt;/p&gt;
$$
A_{\alpha,\beta} =
\begin{pmatrix} 2 &amp; 1 &amp; 1 \\ 4 &amp; 4 &amp; 0 \\ 1 &amp; 0 &amp; 2
\end{pmatrix}
$$&lt;p&gt;Hence&lt;/p&gt;
&lt;figure&gt;
 &lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width: 80%" src="https://monkemanx.github.io/attachments/numerical_methods/LR_decomposition_and_solve.png"&gt;
&lt;/figure&gt;

 
&lt;/details&gt;


&lt;h3 id="problem-45-short-tasks"&gt;Problem 45: Short tasks&lt;/h3&gt;
&lt;p&gt;(a) Let \(A \in \mathbb{R}^{N \times N}\) be a regular matrix. If the \(LR\)-decomposition of \(A\) exists, it is unique (\(L\) lower triangular matrix with 1s on the diagonal, \(R\) upper triangular matrix).&lt;/p&gt;
&lt;p&gt;(b) Let \(A \in \mathbb{R}^{N \times N}\) be a regular matrix. The \(QR\)-decomposition of \(A\) is unique (\(Q\) orthogonal matrix, \(R\) upper triangular matrix).&lt;/p&gt;
&lt;p&gt;(c) The CG method minimizes the residual in the Euclidean norm, while the GMRES method minimizes the energy norm.&lt;/p&gt;
&lt;p&gt;(d) The condition of a matrix \(A\) describes the amplification of the relative error of the input data.&lt;/p&gt;
&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution&lt;/summary&gt;
 
 &lt;p&gt;(a)
The LR-decomposition yields \(PA=LR\) with a permutation matrix \(P\). This can, for example, be different for \(LR\)-decomposition with and without column pivoting. However, one can also assume that a permutation matrix was excluded in this problem. In that case, the answer is &amp;ldquo;correct&amp;rdquo;.&lt;/p&gt;
&lt;p&gt;(b)
False, you flip the sign of a column in Q and the corresponding row in R, the product QR remains unchanged.&lt;/p&gt;
&lt;p&gt;(c)
False, its exactly the opposite.&lt;/p&gt;
&lt;p&gt;(d)
True&lt;/p&gt;

 
&lt;/details&gt;


&lt;h3 id="problem-46-least-square-problem"&gt;Problem 46: Least Square Problem&lt;/h3&gt;
&lt;p&gt;Given are the 5 pairs of values:
&lt;/p&gt;
$$
\begin{array}{c|ccccc}
i &amp; 0 &amp; 1 &amp; 2 &amp; 3 &amp; 4 \\
\hline
t_i &amp; -1 &amp; \tau &amp; 1 &amp; 2 &amp; 4 \\
y_i &amp; 0 &amp; 0 &amp; 4 &amp; 2 &amp; 5
\end{array}
$$&lt;p&gt;
Let \(g(t) = at + b\) be a polynomial of degree 1 that minimizes the sum of squared errors \(\sum_{i=0}^4 (g(t_i) - y_i)^2\) at the 5 support points.&lt;/p&gt;
&lt;p&gt;a) Give the normal equations for this least squares problem, as well as the matrices used explicitly.&lt;/p&gt;
&lt;p&gt;b) Now calculate all \(\tau \in (-1,1)\) such that the minimizing line \(g(x)\) has a slope \(a = 1\).&lt;/p&gt;
&lt;p&gt;c) For the smallest of these \(\tau\), state the sum of squared errors.&lt;/p&gt;
&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution a)&lt;/summary&gt;
 
 &lt;p&gt;The Normal equation is&lt;/p&gt;
$$
A^TAx = A^Tb
$$&lt;p&gt;where&lt;/p&gt;
$$
A =
\begin{pmatrix}
-1 &amp; 1 \\
\pi &amp; 1 \\
1 &amp; 1 \\
2 &amp; 1 \\
4 &amp; 1
\end{pmatrix}
$$&lt;p&gt;and&lt;/p&gt;
$$
A(a \ b)^T = b
$$
 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution b)&lt;/summary&gt;
 
 &lt;p&gt;We solve \(A^TAx = A^Tb\), hence&lt;/p&gt;
$$
\begin{pmatrix}
22 + \pi &amp; 6 + \pi \\
6 + \pi &amp; 5
\end{pmatrix}
\begin{pmatrix}
1 \\
b
\end{pmatrix} =^!
\begin{pmatrix}
28 \\
11
\end{pmatrix}
$$&lt;p&gt;which is \(\pi \in \{0, 1/4\}\).&lt;/p&gt;

 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution c)&lt;/summary&gt;
 
 $$
\sum^4 (g(t_i) - y_i)^2 = \sum^4 (t_i + 1 - y_i)^2 = 6
$$
 
&lt;/details&gt;


&lt;h3 id="problem-47-polynomial-interpolation"&gt;Problem 47: Polynomial interpolation&lt;/h3&gt;
&lt;p&gt;Given the function \(f(t) = t - \cos(\pi t)\) and the support points \(t_0 = -1\), \(t_1 = 0\), \(t_2 = 1\), \(t_3 = 2\). Determine the third-degree interpolation polynomial \(P_3\) for \(f\) with respect to the support points.&lt;/p&gt;
&lt;p&gt;a) in Newton form&lt;/p&gt;
&lt;p&gt;In particular, specify the corresponding basis.&lt;/p&gt;
&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution a)&lt;/summary&gt;
 
 &lt;p&gt;Given the values:
&lt;/p&gt;
$$f(t_0) = -1 - \cos(-\pi) = 0$$$$f(t_1) = 0 - \cos(0) = -1$$$$f(t_2) = 1 - \cos(\pi) = 2$$&lt;p&gt;
&lt;/p&gt;
$$f(t_3) = 2 - \cos(2\pi) = 1$$&lt;p&gt;In Newton form, the polynomial is given with respect to the &lt;strong&gt;Newton basis&lt;/strong&gt;&lt;/p&gt;
$$\{1, x-t_0, (x-t_0)(x-t_1), (x-t_0)(x-t_1)(x-t_2)\}$$&lt;p&gt;The divided differences are calculated as follows:&lt;/p&gt;
$$f[t_0] = 0$$$$f[t_0, t_1] = \frac{f[t_1] - f[t_0]}{t_1 - t_0} = \frac{-1 - 0}{0 - (-1)} = -1$$$$f[t_1, t_2] = \frac{f[t_2] - f[t_1]}{t_2 - t_1} = \frac{2 - (-1)}{1 - 0} = 3$$$$f[t_2, t_3] = \frac{f[t_3] - f[t_2]}{t_3 - t_2} = \frac{1 - 2}{2 - 1} = -1$$$$f[t_0, t_1, t_2] = \frac{f[t_1, t_2] - f[t_0, t_1]}{t_2 - t_0} = \frac{3 - (-1)}{1 - (-1)} = 2$$$$f[t_1, t_2, t_3] = \frac{f[t_2, t_3] - f[t_1, t_2]}{t_3 - t_1} = \frac{-1 - 3}{2 - 0} = -2$$$$f[t_0, t_1, t_2, t_3] = \frac{f[t_1, t_2, t_3] - f[t_0, t_1, t_2]}{t_3 - t_0} = \frac{-2 - 2}{2 - (-1)} = -\frac{4}{3}$$&lt;p&gt;The interpolation polynomial in Newton form is therefore:&lt;/p&gt;
$$ - (x+1) + 2(x+1)x - \frac{4}{3}(x+1)x(x-1)$$
 
&lt;/details&gt;


&lt;h3 id="problem-48-splines"&gt;Problem 48: Splines&lt;/h3&gt;
&lt;p&gt;Given the function \(f(t) = \sin(\pi t)\) and the support points \(t_0 = -2, t_1 = -1, t_2 = 0, t_3 = 1, t_4 = 2\). Provide a cubic spline that interpolates this function at the support points. Show that your solution also satisfies the properties of an interpolating cubic spline.&lt;/p&gt;
&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution&lt;/summary&gt;
 
 &lt;p&gt;The splines needs to fulfill&lt;/p&gt;
$$
p(x_n) = y_n, \quad p_{|x_n; x_{n+1}}
$$&lt;p&gt;We first calculate the function values&lt;/p&gt;
$$
f(-2) = f(-1) = f(0) = f(1) = f(2) = 0
$$&lt;p&gt;This means the \(f\) is interpolated by \(p(x)=0\), because \(f(x_n)=y_n\) and it can be derived two times.&lt;/p&gt;
&lt;p&gt;It fulfills the property of being periodic as \(f'(a) = f'(b) = 0\) and \(f''(a) = f''(b) = 0\).&lt;/p&gt;

 
&lt;/details&gt;


&lt;h3 id="problem-49-qr-decomposition"&gt;Problem 49: QR-Decomposition&lt;/h3&gt;
&lt;p&gt;Calculate the \(QR\)-decomposition of&lt;/p&gt;
$$A = \begin{pmatrix} 1 &amp; 2 \\ 1 &amp; 2 \\ \sqrt{2} &amp; \sqrt{2} \end{pmatrix}.$$&lt;p&gt;In doing so, give all used Householder transformations \(Q\).&lt;/p&gt;
&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution&lt;/summary&gt;
 
 &lt;p&gt;We start by defining our initial vector&lt;/p&gt;
$$
a^1 =
\begin{pmatrix}
1 \\
1 \\
\sqrt{2}
\end{pmatrix}
$$&lt;p&gt;Next we calculate \(w\)&lt;/p&gt;
$$
w^1 = a^1 + |a^1|_2 e^1 = a^1 + 2 e^1 =
\begin{pmatrix}
3 \\
1 \\
\sqrt{2}
\end{pmatrix}
$$&lt;p&gt;To get our householder transformation&lt;/p&gt;
$$
Q_1 = I - 2\frac{ww^T}{|ww^T|} = I - \frac{1}{6} ww^T = I -
\begin{pmatrix}
9 &amp; 3 &amp; 3\sqrt{2} \\
3 &amp; 1 &amp; \sqrt{2} \\
3\sqrt{2} &amp; \sqrt{2} &amp; 2
\end{pmatrix} =
\begin{pmatrix}
-1/2 &amp; -1/2 &amp; -\sqrt{2}/2 \\
-1/2 &amp; 5/6 &amp; -\sqrt{2}/6 \\
-\sqrt{2}/2 &amp; -\sqrt{2}/6 &amp; 2/3
\end{pmatrix}
$$&lt;p&gt;We apply the transformation&lt;/p&gt;
$$
Q_1 A =
\begin{pmatrix}
-2 &amp; -3\\
0 &amp; 1/3\\
0 &amp; \frac{-2\sqrt{2}}{3}
\end{pmatrix}
$$&lt;p&gt;We can now calculate the second householder transformation&lt;/p&gt;
$$
a^2 =
\begin{pmatrix}
1/3 \\
\frac{-2\sqrt{2}}{3}
\end{pmatrix}
$$&lt;p&gt;Next&lt;/p&gt;
$$
w^2 = a^2 + |a^2|_2 e^1 = a^2 + 1 e^1 =
\begin{pmatrix}
4/3 \\
\frac{-2\sqrt{2}}{3}
\end{pmatrix}
$$&lt;p&gt;We continue&lt;/p&gt;
$$
Q_1 = I - 2\frac{ww^T}{|ww^T|} = I - \frac{3}{4} ww^T =
\begin{pmatrix}
-1/3 &amp; 2\sqrt{2}/3 \\
2\sqrt{2}/3 &amp; 1/3
\end{pmatrix}
$$&lt;p&gt;We apply the second transformations&lt;/p&gt;
$$
Q_2 \cdot Q_1 \cdot A =
\begin{pmatrix}
-2 &amp; -3 \\
0 &amp; -1 \\
0 &amp; 0
\end{pmatrix} = R
$$&lt;p&gt;And&lt;/p&gt;
$$
Q = Q_1 \cdot Q_2
$$
 
&lt;/details&gt;


&lt;h3 id="problem-50-short-answers"&gt;Problem 50: Short Answers&lt;/h3&gt;
&lt;p&gt;a) We consider the norm \(\lVert \cdot \rVert_p\) on \(\mathbb{R}^{N \times N}\) for \(p \in [1, \infty]\). Give the definition for the condition number \(\kappa_p(A)\) and show that \(\kappa_p(A) \ge 1\).&lt;/p&gt;
&lt;p&gt;b) Given&lt;/p&gt;
$$A = \begin{pmatrix} \alpha &amp; \beta \\ \gamma &amp; \delta \end{pmatrix}$$&lt;p&gt;State the conditions for \(\alpha, \beta, \gamma, \delta \in \mathbb{R}\) such that \(A\) possesses an &lt;strong&gt;LR-decomposition (without pivoting)&lt;/strong&gt;. Determine the LR-decomposition in the case of its existence.&lt;/p&gt;
&lt;p&gt;c) Given a continuously differentiable function \(F: \mathbb{R}^N \to \mathbb{R}^N\). We consider the nonlinear system of equations \(F(x) = 0\) in \(\mathbb{R}^N\). Formulate one step of the &lt;strong&gt;Newton iteration&lt;/strong&gt; and briefly discuss the efficient calculation of the &lt;strong&gt;Newton correction&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;d) Given the expression:&lt;/p&gt;
$$\sqrt{x^2 + 1} - x \quad \text{for } x \gg 1.$$&lt;p&gt;Explain and fix the problem when evaluating the expression.&lt;/p&gt;
&lt;p&gt;e) Name one &lt;strong&gt;advantage&lt;/strong&gt; and one &lt;strong&gt;disadvantage&lt;/strong&gt; of the &lt;strong&gt;LR-decomposition&lt;/strong&gt; compared to the &lt;strong&gt;Cholesky decomposition&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;f) Iterative computation of eigenvalues:&lt;/p&gt;
&lt;p&gt;(i) Explain how the output of the &lt;strong&gt;inverse iteration (with shift)&lt;/strong&gt; and the &lt;strong&gt;QR-iteration (with shift)&lt;/strong&gt; differ after successful execution.&lt;/p&gt;
&lt;p&gt;(ii) State how in the inverse iteration one obtains the &lt;strong&gt;same sequence of shifts \(\mu_k\)&lt;/strong&gt; as in the QR-iteration.&lt;/p&gt;
&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution a)&lt;/summary&gt;
 
 &lt;p&gt;For regular matrices we have&lt;/p&gt;
$$
K_p(A) = ||A||_p ||A^{-1}||_p
$$&lt;p&gt;Next we show that \(K_p(A) \geq 1\)&lt;/p&gt;
$$
K_p(A) = ||A||_p ||A^{-1}||_p \geq ||AA^{-1}||_p = ||I_n||_p = 1
$$
 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution b)&lt;/summary&gt;
 
 &lt;p&gt;A LR-decomposition has the following structure&lt;/p&gt;
$$
L =
\begin{pmatrix}
1 &amp; 0 \\
l_{11} &amp; 1
\end{pmatrix}, \quad
R =
\begin{pmatrix}
r_{11} &amp; r_{12} \\
0 &amp; r_{22}
\end{pmatrix}
$$&lt;p&gt;In our case \(r_{11} = \alpha, \ r_{12} = \beta, \ r_{22} = \delta - l_{21}\beta\) and from this follows the last element \(l_{21} = \frac{\gamma}{\alpha}\).&lt;/p&gt;
&lt;p&gt;Hence&lt;/p&gt;
$$
L =
\begin{pmatrix}
1 &amp; 0 \\
\frac{\gamma}{\alpha} &amp; 1
\end{pmatrix}, \quad
R =
\begin{pmatrix}
\alpha &amp; \beta \\
0 &amp; \delta - l_{21}\beta
\end{pmatrix}
$$&lt;p&gt;And such a LR-decomposition exist if and only if main minors are ivnertible/regular, this is then the case when the determinant is non zero. Hence&lt;/p&gt;
$$
det_1(A) = \alpha , \quad det_2(A) = \alpha \delta - \beta \gamma
$$&lt;p&gt;needs to be non-zero.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Alternative LR-Decomposition&lt;/strong&gt;&lt;/p&gt;
$$
\text{LU:} \quad
\begin{pmatrix}
a &amp; b \\
c &amp; d
\end{pmatrix}
\;\xrightarrow{\;-\frac{c}{a}\;}
\;
\begin{pmatrix}
a &amp; b \\
0 &amp; d - \frac{bc}{a}
\end{pmatrix}
$$$$
\Rightarrow
L =
\begin{pmatrix}
1 &amp; 0 \\
\frac{c}{a} &amp; 1
\end{pmatrix}
\quad \checkmark
\qquad
U =
\begin{pmatrix}
a &amp; b \\
0 &amp; d - \frac{bc}{a}
\end{pmatrix}
\quad \checkmark
$$
 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution c)&lt;/summary&gt;
 
 &lt;p&gt;We have&lt;/p&gt;
$$
x^{k+1} = x^{k} = d^{k}
$$&lt;p&gt;whereby \(d^k\) is the solution of&lt;/p&gt;
$$
DF(x^k) d^k = -F(x^k)
$$&lt;p&gt;To calculate this efficiently, instead of caculatign the inverse of the matrix we use an LGS.&lt;/p&gt;

 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution d)&lt;/summary&gt;
 
 &lt;p&gt;The Problem: For very big x are the terms nearly identical big, as such it comes to destruction.&lt;/p&gt;
&lt;p&gt;To solve this we need to avoid subtracing two nmumbers that are nearly identical big&lt;/p&gt;
$$
\sqrt{x^2+1} - x = \left(\sqrt{x^2+1} - x\right) \frac{\sqrt{x^2+1} + x}{\sqrt{x^2+1} + x} = \frac{(x^2+1) - x^2}{\sqrt{x^2+1} + x} = \frac{1}{\sqrt{x^2+1} + x}
$$
 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution e)&lt;/summary&gt;
 
 &lt;p&gt;Advantages:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Less requirement, choelsky needs spd.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Disadvantages:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;LR Decomposition takes more operation i.e. more expensiver.&lt;/li&gt;
&lt;/ul&gt;

 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution f)&lt;/summary&gt;
 
 &lt;p&gt;(i)
in the inverse iteration we get one eigenvalue and its eigenvector. In QR-iteration we get the entire spectrum i.e. all eigenvalues in from of a matrix.&lt;/p&gt;
&lt;p&gt;(ii)
We start with \(e^N\), that is the N-th unit vector.&lt;/p&gt;

 
&lt;/details&gt;


&lt;h3 id="problem-51-linear-curve-fitting"&gt;Problem 51: Linear Curve fitting&lt;/h3&gt;
&lt;p&gt;Given the Matrix&lt;/p&gt;
$$
A = \begin{pmatrix}
1 &amp; -5 \\
2 &amp; 0 \\
2 &amp; 1
\end{pmatrix}
$$&lt;p&gt;and a vector \(\mathbf{b} \in \mathbb{R}^3\).&lt;/p&gt;
&lt;p&gt;a) Calculate the &lt;strong&gt;QR-decomposition&lt;/strong&gt; of \(A\).
&lt;em&gt;Hint: For \(Q\), it is sufficient to provide a formula.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;b) Define the &lt;strong&gt;linear least squares problem&lt;/strong&gt; for \(A\mathbf{x} = \mathbf{b}\) and check whether it has a &lt;strong&gt;unique solution&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;c) Explain how you could solve the least squares problem from part b) using the result from part a).&lt;/p&gt;
&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution a)&lt;/summary&gt;
 
 &lt;p&gt;Step 1:&lt;/p&gt;
$$
a^1 =
\begin{pmatrix}
1 \\
2 \\
2
\end{pmatrix}, \quad
w^1 =
\begin{pmatrix}
1 \\
2 \\
2
\end{pmatrix} + |a^1|_2 \cdot e^1 =
\begin{pmatrix}
4 \\
2 \\
2
\end{pmatrix}
$$&lt;p&gt;Further \(|w_1|^2_2 = 24\), hence we become the householder matrix&lt;/p&gt;
$$
Q = I - 2 \frac{ww^T}{w^Tw} = I- \frac{1}{12}
\begin{pmatrix}
16 &amp; 8 &amp; 8 \\
8 &amp; 4 &amp; 4 \\
8 &amp; 4 &amp; 4
\end{pmatrix} =
\frac{1}{3}
\begin{pmatrix}
-1 &amp; -2 &amp; -2 \\
-2 &amp; 2 &amp; -1 \\
-2 &amp; -1 &amp; 2
\end{pmatrix}
$$&lt;p&gt;We apply the householder matrix&lt;/p&gt;
$$
Q_1 \cdot A =
\begin{pmatrix}
-3 &amp; 1 \\
0 &amp; 3 \\
0 &amp; 4
\end{pmatrix}
$$&lt;p&gt;Step 2:&lt;/p&gt;
$$
a^2 =
\begin{pmatrix}
3 \\
4 \\
\end{pmatrix}, \quad
w^2 =
\begin{pmatrix}
3 \\
4 \\
\end{pmatrix} + |a^2|_2 \cdot e^1 =
\begin{pmatrix}
9
4
\end{pmatrix}
$$&lt;p&gt;Further \(|w^2|^2_2 = 80\). We get the second housholder matrix&lt;/p&gt;
$$
\hat{Q}_2 = I - 2 \frac{ww^T}{w^Tw} = I- \frac{1}{40}
\begin{pmatrix}
64 &amp; 32 \\
32 &amp; 16 \\
\end{pmatrix} =
\frac{1}{5}
\begin{pmatrix}
-3 &amp; -4 &amp; \\
-4 &amp; 3 &amp; \\
\end{pmatrix}
$$&lt;p&gt;And with&lt;/p&gt;
$$
Q_2 =
\begin{pmatrix}
1 &amp; \\
&amp; \hat{Q}_2
\end{pmatrix}
$$&lt;p&gt;We get&lt;/p&gt;
$$
R = Q_2 \cdot Q_1 \cdot A =
\begin{pmatrix}
-3 &amp; 1 \\
0 &amp; - 5 \\
0 &amp; 0
\end{pmatrix}
$$&lt;p&gt;And&lt;/p&gt;
$$
Q = Q_1 \cdot Q_2
$$
 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution b)&lt;/summary&gt;
 
 &lt;p&gt;The linear least square/curve fitting problem is defined as&lt;/p&gt;
$$
\min_x \ |Ax - b|_2
$$&lt;p&gt;This problem is then exact solvable when A has full rank. In our case, since the columns are linear independent this is the case and the problem has one unique solution.&lt;/p&gt;

 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution c)&lt;/summary&gt;
 
 &lt;p&gt;From the lecture we know that the normal equation solves a linear least square problem&lt;/p&gt;
$$
A^TAb = A^Tb
$$&lt;p&gt;We can now use the QR-decomposition, by inserting them in our equation&lt;/p&gt;
$$
(QR)^T(QR)b = R^TQ^TQRb = R^TRb = A^Tb
$$&lt;p&gt;which can be solved using forward and backward substitution.&lt;/p&gt;

 
&lt;/details&gt;


&lt;h3 id="problem-52-polynomial-interpolation"&gt;Problem 52: Polynomial Interpolation&lt;/h3&gt;
&lt;p&gt;Given the table of values:&lt;/p&gt;
$$
\begin{array}{|c|c|c|c|c|}
\hline
n &amp; 0 &amp; 1 &amp; 2 &amp; 3 \\
\hline
\xi_n &amp; -3 &amp; -1 &amp; 1 &amp; 2 \\
\hline
f_n &amp; 3 &amp; -1 &amp; -5 &amp; 12 \\
\hline
\end{array}
$$&lt;p&gt;a) Determine the &lt;strong&gt;interpolation polynomial&lt;/strong&gt; \(P \in \mathbb{P}_3\) such that \(P(\xi_n) = f_n\) for \(n=0, 1, 2, 3\) in the &lt;strong&gt;Newton form&lt;/strong&gt; (or &lt;strong&gt;Newton basis&lt;/strong&gt;).&lt;/p&gt;
&lt;p&gt;b) &lt;strong&gt;Extend&lt;/strong&gt; the interpolation polynomial by including the point \((\xi_4, f_4) = (0, 0)\).&lt;/p&gt;
&lt;p&gt;c) Briefly &lt;strong&gt;justify&lt;/strong&gt; whether the calculated interpolation polynomials in parts a) and b) are &lt;strong&gt;unique&lt;/strong&gt;.&lt;/p&gt;
&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution a)&lt;/summary&gt;
 
 &lt;p&gt;The Neville Scheme is:&lt;/p&gt;
$$
\begin{array}{c|c|ccc}
\xi_n &amp; f_n &amp; P_{0,1} &amp; P_{0,1,2} &amp; P_{0,1,2,3} \\
\hline
-3 &amp; 3 &amp; &amp; &amp; \\
-1 &amp; -1 &amp; \frac{-1 - 3}{-1 - (-3)} = -2 &amp; &amp; \\
1 &amp; -5 &amp; \frac{-5 - (-1)}{1 - (-1)} = -2 &amp; \frac{-2 - (-2)}{1 - (-3)} = 0 &amp; \\
2 &amp; 12 &amp; \frac{12 - (-5)}{2 - (1)} = 17 &amp; \frac{17 - (-2)}{2 - (-1)} = \frac{19}{3} &amp; \frac{\frac{19}{3} - 0}{2 - (-3)} = \frac{19}{15} \\
\end{array}
$$&lt;p&gt;Thus, the interpolation polynomial in &lt;strong&gt;Newton form&lt;/strong&gt; is:&lt;/p&gt;
$$P_1(t) = 3 - 2(t+3) + 0(t+3)(t+1) + \frac{19}{15}(t+3)(t+1)(t-1)$$
 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution b)&lt;/summary&gt;
 
 $$
\begin{array}{c|c|cccc}
\xi_n &amp; f_n &amp; \text{1st Diff.} &amp; \text{2nd Diff.} &amp; \text{3rd Diff.} &amp; \text{4th Diff.} \\
\hline
-3 &amp; 3 &amp; &amp; &amp; &amp; \\
-1 &amp; -1 &amp; \frac{-1 - 3}{-1 - (-3)} = -2 &amp; &amp; &amp; \\
1 &amp; -5 &amp; \frac{-5 - (-1)}{1 - (-1)} = -2 &amp; \frac{-2 - (-2)}{1 - (-3)} = 0 &amp; &amp; \\
2 &amp; 12 &amp; \frac{12 - (-5)}{2 - (1)} = 17 &amp; \frac{17 - (-2)}{2 - (-1)} = \frac{19}{3} &amp; \frac{\frac{19}{3} - 0}{2 - (-3)} = \frac{19}{15} &amp; \\
\hline
\mathbf{0} &amp; \mathbf{0} &amp; \mathbf{\frac{0 - 12}{0 - 2} = 6} &amp; \mathbf{\frac{6 - 17}{0 - 1} = 11} &amp; \mathbf{\frac{11 - \frac{19}{3}}{0 - (-1)} = \frac{14}{3}} &amp; \mathbf{\frac{\frac{14}{3} - \frac{19}{15}}{0 - (-3)} = \frac{51}{45} \left(= \frac{17}{15}\right)} \\
\end{array}
$$&lt;p&gt;Hence&lt;/p&gt;
$$
P_2(t) = P_1(t) + \frac{17}{15} (t + 3)(t + 1)(t -1)(t - 2)
$$
 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution c)&lt;/summary&gt;
 
 Because the polynomial has n-th degree, it is uniquely determined by n-points, hence the solution is unique.
 
&lt;/details&gt;


&lt;h3 id="problem-53-quadratur"&gt;Problem 53: Quadratur&lt;/h3&gt;
&lt;p&gt;We consider the interval \(I = [a, b]\) for \(a, b \in \mathbb{R}\) and \(a &lt; b\).&lt;/p&gt;
&lt;p&gt;a) Given are the &lt;strong&gt;nodes&lt;/strong&gt; \(\xi_0 = a, \xi_1 = b\) and the &lt;strong&gt;weights&lt;/strong&gt; \(\omega_0 = \omega_1 = \frac{b-a}{2}\).&lt;/p&gt;
&lt;p&gt;(i) Show that the given &lt;strong&gt;quadrature formula&lt;/strong&gt; is &lt;strong&gt;exact&lt;/strong&gt; for all polynomials \(P \in \mathbb{P}_1\).&lt;/p&gt;
&lt;p&gt;(ii) Show that the given quadrature formula is &lt;strong&gt;no longer exact&lt;/strong&gt; for polynomials \(P \in \mathbb{P}_2\).
&lt;em&gt;Hint: A counterexample is sufficient.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;b) Given are \(f \in C^2[a, b]\) as well as the &lt;strong&gt;equidistant nodes&lt;/strong&gt;
&lt;/p&gt;
$$\xi_n = a + n h \quad \text{for } n = 0, \ldots, N, \quad h = \frac{b-a}{N}.$$&lt;p&gt;The &lt;strong&gt;composite (right-sided) rectangle rule&lt;/strong&gt; is defined by&lt;/p&gt;
$$Q(f) = \sum_{n=1}^{N} h f(\xi_n).$$&lt;p&gt;(i) Show the &lt;strong&gt;error estimate&lt;/strong&gt;
&lt;/p&gt;
$$\left| \int_a^b f(t) \, dt - Q(f) \right| \leq \frac{b-a}{2} h \sup_{t \in [a, b]} |f'(t)|.$$&lt;p&gt;(ii) Briefly &lt;strong&gt;explain&lt;/strong&gt; how you can improve the &lt;strong&gt;order of the error&lt;/strong&gt; of \(Q(\cdot)\) with the help of an additional function evaluation. Give the improved, composite quadrature formula explicitly and &lt;strong&gt;name it&lt;/strong&gt;.&lt;/p&gt;
&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution a)&lt;/summary&gt;
 
 &lt;p&gt;(i)
Recall:&lt;/p&gt;
$$
Q_T(f) \sum_\xi w_\xi f(\xi)
$$&lt;p&gt;For the quadrature to be exact, the following needs to be true&lt;/p&gt;
$$
\forall P \in \mathbb{P}_1 : \int_a^b P(x) dx = Q_T(P)
$$&lt;p&gt;We can show that, by showing it for the monom base \(1, x \in \mathbb{P}_1\)&lt;/p&gt;
$$
\int^b_a 1 dx = [x]^b_a = b - a = \frac{b - a}{2} (1 + 1) = Q_T(1)
$$$$
\int^b_a x dx = [\frac{1}{2}x^2]^b_a = \frac{b^2 - a^2}{2} = \frac{b - a}{2}(b - a)
$$&lt;p&gt;As such is \(Q_T\) exact for \(\mathbb{P}_1\).&lt;/p&gt;
&lt;p&gt;(ii)&lt;/p&gt;
&lt;p&gt;We choose \(a=0, b=1\) then&lt;/p&gt;
$$
\int^1_0 x^2 dx = [\frac{1}{3}x^3]^1_0 = \frac{1}{3} \neq \frac{1}{2} = \frac{1- 0}{2}(1^2 - 0^2) = Q_T(x^2)
$$
 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution b)&lt;/summary&gt;
 
 &lt;p&gt;(i)
We do a taylor development for \(f\) with \(t_n \in [\xi_{n-1}, \xi_n]\)&lt;/p&gt;
$$
f(t) = f(\xi_n) + f'(t_n)(t - \xi_n)
$$&lt;p&gt;With that we can begin&lt;/p&gt;
$$
\begin{align}
\int^b_a f(t) dt - Q(f) &amp;= \int^b_a f(t) dt - \sum_{n = 1}^{N} h f(\xi_n) \\
&amp;= \sum_{n = 1}^{N}(\int_{\xi_{n-1}}^{\xi_n} f(t) dt) - \sum_{n = 1}^{N} h f(\xi_n) \\
&amp;= \sum_{n = 1}^{N} (\int_{\xi_{n-1}}^{\xi_n} f(t)dt - hf(\xi_n)) \\
&amp;= \sum_{n = 1}^{N} (\int_{\xi_{n-1}}^{\xi_n} f(\xi_n) + f'(t_n)(t - \xi_n)dt - hf(\xi_n)) \\
&amp;= \sum_{n = 1}^{N} (\int_{\xi_{n-1}}^{\xi_n} f(\xi_n) + \int_{\xi_{n-1}}^{\xi_n} f'(t_n)(t - \xi_n)dt - hf(\xi_n)) \\
&amp;= \sum_{n = 1}^{N} ( f(t)[C]^{\xi_{n-1}}_{\xi_n} + f'(t_n) [t - \xi_n]^{\xi_{n-1}}_{\xi_n} - hf(\xi_n)) \\
&amp;= \sum_{n = 1}^{N} ( hf(t) - f'(t_n) \frac{1}{2}h^2 - hf(\xi_n)) \\
&amp;= \sum_{n = 1}^{N} - f'(t_n) \frac{1}{2}h^2 \\
&amp;= -\frac{h}{2} \sum_{n = 1}^{N} \frac{b - a}{N}f'(t_n) \\
&amp;\leq -\frac{h}{2} \sum_{n = 1}^{N} \frac{b - a}{N} \sup_{t \in [a, b]}f'(t) \\
&amp;= \frac{h}{2} \sup_{t \in [a, b]}f'(t) \sum_{n = 1}^{N} \frac{b - a}{N} \\
&amp;= \frac{b-a}{2}h \sup_{t \in [a, b]}f'(t)
\end{align}
$$&lt;p&gt;Explanations:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;From Line 1 to 2: Split the integral over \([a,b]\) into the sum of the integrals on the subintervals \([\xi_{n−1}, \xi_n]\).&lt;/li&gt;
&lt;li&gt;From Line 2 to 3: Then group each subinterval&amp;rsquo;s integral with the corresponding right-endpoint rectangle \(hf(\xi_n))\).&lt;/li&gt;
&lt;li&gt;From Line 3 to 4: Insert the taylor development&lt;/li&gt;
&lt;li&gt;From Line 4 to 7: Integrate the summands independent&lt;/li&gt;
&lt;li&gt;From Line 7 to 8: \(hf(\xi)\) cancels each other out.&lt;/li&gt;
&lt;li&gt;From Line 8 to 9: Replace one \(h\) by its definition, pull the other before the sum.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;(ii)
We can do an additional evaluation, and get the summed trapezoid rule. From the lecture we know that its error order is 2.&lt;/p&gt;
$$
Q(f) = \frac{f(a) + f(b)}{2} + \sum_{n=1}^{N-1} h f(\xi_n)
$$
 
&lt;/details&gt;


&lt;h3 id="problem-54-linear-iteration-method"&gt;Problem 54: Linear Iteration Method&lt;/h3&gt;
&lt;p&gt;We consider the linear system of equations \(A\mathbf{x} = \mathbf{b}\) for \(A \in \mathbb{R}^{N \times N}\) and \(\mathbf{b} \in \mathbb{R}^N\).&lt;/p&gt;
&lt;p&gt;a) State the &lt;strong&gt;formula (or prescription)&lt;/strong&gt; for a general &lt;strong&gt;linear iterative method&lt;/strong&gt; and name the quantities involved.&lt;/p&gt;
&lt;p&gt;Let&amp;rsquo;s now specifically consider&lt;/p&gt;
$$
A = \begin{pmatrix}
\alpha &amp; \beta \\
\gamma &amp; \delta
\end{pmatrix}
$$&lt;p&gt;for \(\alpha, \beta, \gamma, \delta \in \mathbb{R}_{&gt;0}\) (i.e., all entries are strictly positive).&lt;/p&gt;
&lt;p&gt;b) Determine the conditions on \(\alpha, \beta, \gamma, \delta\) such that, for arbitrary starting vectors \(\mathbf{x}^{(0)} \in \mathbb{R}^2\) and right-hand sides \(\mathbf{b} \in \mathbb{R}^2\):&lt;/p&gt;
&lt;p&gt;(i) the &lt;strong&gt;Jacobi method&lt;/strong&gt; converges for \(A\).&lt;/p&gt;
&lt;p&gt;(ii) the &lt;strong&gt;Gauss-Seidel method&lt;/strong&gt; converges for \(A\).&lt;/p&gt;
&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution a)&lt;/summary&gt;
 
 &lt;p&gt;Let \(B\) be a pre-conditioning matrix, then the iteration method is given by&lt;/p&gt;
$$
x^{k+1} = x^k + B(b-Ax^k)
$$&lt;p&gt;where \(x^k\) the iterative is of the method.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Alternative:&lt;/strong&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Choose \(\mathbf{x}^{(0)}\) and \(\varepsilon\).&lt;/li&gt;
&lt;li&gt;While \(\Vert \mathbf{r}^{(k)} \Vert &lt; \varepsilon \Vert \mathbf{b} \Vert\)&lt;/li&gt;
&lt;li&gt;Calculate

$$
 \begin{aligned}
 \mathbf{c}^{(k)} &amp;= B \mathbf{r}^{(k)} \\
 \mathbf{x}^{(k+1)} &amp;= \mathbf{x}^{(k)} + \mathbf{c}^{(k)} \\
 \mathbf{r}^{(k+1)} &amp;= \mathbf{r}^{(k)} - A \mathbf{c}^{(k)}
 \end{aligned}
 $$
where \(A = L + D + R\). E.g., in Jacobi: \(\mathbf{B} = \mathbf{D}^{-1}\). \(\mathbf{r}^{(k)}\) is the &lt;strong&gt;residual&lt;/strong&gt;, \(\mathbf{x}^{(0)}\) is the &lt;strong&gt;starting vector&lt;/strong&gt;, \(\varepsilon\) determines how large the error of our final result is.&lt;/li&gt;
&lt;/ol&gt;

 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution b)&lt;/summary&gt;
 
 &lt;p&gt;From the Lecture we know a generel linear iteration method converges with start vector \(x^0\) when \(p(I - BA) \le 1\).&lt;/p&gt;
&lt;p&gt;(i)
For Jacobi-Method we have \(B = D^{-1}\) and hence&lt;/p&gt;
$$
C_1 = I - BA = I -
\begin{pmatrix}
\alpha^{-1} &amp; 0 \\
0 &amp; \delta^{-1}
\end{pmatrix} A =
\begin{pmatrix}
0 &amp; -\frac{\beta}{\alpha} \\
-\frac{\gamma}{\delta} &amp; 0
\end{pmatrix}
$$&lt;p&gt;We calculate the characteristic polynomial&lt;/p&gt;
$$
det(\lambda I_N - C_1) =
det(
\begin{pmatrix}
\lambda &amp; \frac{\beta}{\alpha} \\
\frac{\gamma}{\delta} &amp; \lambda
\end{pmatrix}
) = \lambda^2 - \frac{\beta\gamma}{\alpha \delta}
$$&lt;p&gt;The roots of this are \(\lambda_{1,2} \pm \sqrt{\frac{\beta\gamma}{\alpha \delta}}\).&lt;/p&gt;
&lt;p&gt;This means for the method to converge \(|\lambda_{1,2}| &lt; 1\) needs to be true, this is the case when \(\beta \gamma &lt; \alpha \delta\).&lt;/p&gt;
&lt;p&gt;(ii)
For Gauß-Seidel-Method we have \(B = (L + D)^{-1}\) and hence&lt;/p&gt;
$$
B =
\begin{pmatrix}
\alpha^{-1} &amp; 0 \\
-\frac{\gamma}{\delta} &amp; \delta^{-1}
\end{pmatrix}
$$&lt;p&gt;With this we have&lt;/p&gt;
$$
C_2 = I - BA =
\begin{pmatrix}
0 &amp; -\frac{\beta}{\alpha}\\
0 &amp; \frac{\beta\gamma}{\alpha\delta}
\end{pmatrix}
$$&lt;p&gt;We calculate the characteristic polynomial&lt;/p&gt;
$$
det(\lambda I_N - C_2) =
det(
\begin{pmatrix}
\lambda &amp; -\frac{\beta}{\alpha}\\
0 &amp; \lambda - \frac{\beta\gamma}{\alpha\delta}
\end{pmatrix}
) = \lambda(\lambda - \frac{\beta\gamma}{\alpha\delta})
$$&lt;p&gt;The roots of this are \(\lambda_{1} = 0 \) and \(\lambda_{2} = \frac{\beta\gamma}{\alpha\delta}\).&lt;/p&gt;
&lt;p&gt;This means for the method to converge \(|\lambda_{1,2}| &lt; 1\) needs to be true, this is the case when \(\beta \gamma &lt; \alpha \delta\).&lt;/p&gt;

 
&lt;/details&gt;


&lt;div style="margin-bottom: 100px;"&gt;&lt;/div&gt;

&lt;h2 id="problems-with-non-confirmed-solution"&gt;Problems with Non-Confirmed Solution&lt;/h2&gt;
&lt;h3 id="problem-55-iterations-method"&gt;Problem 55: Iterations method&lt;/h3&gt;
&lt;p&gt;Given&lt;/p&gt;
$$
A =
\begin{pmatrix}
2 &amp; 1 &amp; 1 \\
4 &amp; 4 &amp; 0 \\
1 &amp; 0 &amp; 2
\end{pmatrix}, \quad
b =
\begin{pmatrix}
3 \\
4 \\
5
\end{pmatrix}
$$&lt;p&gt;a) Give step for step the algorithm for the Geis-Seidel iteration algorithm.&lt;/p&gt;
&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution a)&lt;/summary&gt;
 
 &lt;ol start="0"&gt;
&lt;li&gt;\(A = L + D + R\) with \(B = L + D\)&lt;/li&gt;
&lt;li&gt;Choose \(\epsilon, x_0\)&lt;/li&gt;
&lt;li&gt;For as long \(||r^k|| &lt; \epsilon ||b||\)&lt;/li&gt;
&lt;li&gt;Calculate

$$
Bc^k = r^k
x^{k+1} = x^k + c^k
r^{k+1} = r^k - Ac^k
$$&lt;/li&gt;
&lt;/ol&gt;

 
&lt;/details&gt;


&lt;h3 id="problem-56-short-tasks"&gt;Problem 56: Short tasks&lt;/h3&gt;
&lt;p&gt;(a) Explain briefly why the evaluation of the term \(\sqrt{x + \frac{1}{x}} - \sqrt{x - \frac{1}{x}}\) on a computer with floating-point arithmetic is problematic for \(x \gg 1\). Transform the term so that this problem no longer occurs.&lt;/p&gt;
&lt;p&gt;(b) We consider the set of normalized floating-point numbers FL with base \(B\) and mantissa length \(M\). Give the floating-point representation of the number 1 in FL and the smallest number \(x \in \text{FL}\) with \(x &gt; 1\).
&lt;em&gt;Hint: Give the mantissa and the exponent explicitly in each case.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;(c) Justify why the two given matrices \(A\) and \(B\) cannot be Givens rotations.
&lt;/p&gt;
$$A = \begin{pmatrix} 1/2 &amp; \sqrt{3}/2 &amp; 0 \\ -\sqrt{3}/2 &amp; 1/2 &amp; 0 \\ 0 &amp; 0 &amp; -1 \end{pmatrix}, \quad B = \begin{pmatrix} 1/2 &amp; -\sqrt{3}/2 &amp; 1/4 \\ -\sqrt{3}/2 &amp; 1/2 &amp; 1/4 \\ 1/2 &amp; 1/2 &amp; 1/2 \end{pmatrix}$$&lt;p&gt;(d) Calculate \(\|A\|_{\infty}\) and \(\|A\|_1\) for \(A = \begin{pmatrix} 4 &amp; -3 &amp; -2 \\ -1 &amp; 0 &amp; 1 \\ -2 &amp; 3 &amp; 5 \end{pmatrix}\).&lt;/p&gt;
&lt;p&gt;(e) Let \(A \in \mathbb{R}^{N \times N}\) be regular and \(\alpha \in \mathbb{R} \setminus \{0\}\). Determine the condition \(\kappa(\alpha A)\) in dependence on \(\kappa(A)\).&lt;/p&gt;
&lt;p&gt;(f) Let \(A, B \in \mathbb{R}^{N \times N}\) be regular and let \(\mathbf{b} \in \mathbb{R}^N\). Show: If the iteration method \(\mathbf{x}^{k+1} = \mathbf{x}^k + B( \mathbf{b} - A\mathbf{x}^k)\) converges, then it converges against \(A^{-1}\mathbf{b}\). Additionally, state a sufficient condition for the linear convergence of the method.&lt;/p&gt;
&lt;p&gt;(g) Let \(f: \mathbb{R}^N \to \mathbb{R}\) be a twice continuously differentiable function. Formulate Newton&amp;rsquo;s method for solving the minimization problem \(\min_{\mathbf{x} \in \mathbb{R}^N} f(\mathbf{x})\).&lt;/p&gt;
&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution a)&lt;/summary&gt;
 
 &lt;p&gt;Because if \(x &gt;&gt; 1\), then the terms we subtract are nearly identical and it thus comes to extinction.&lt;/p&gt;
$$
\sqrt{x + \frac{1}{x}} - \sqrt{x - \frac{1}{x}} = \frac{(\sqrt{x + \frac{1}{x}} - \sqrt{x - \frac{1}{x}})(\sqrt{x + \frac{1}{x}} - \sqrt{x - \frac{1}{x}})}{(\sqrt{x + \frac{1}{x}} - \sqrt{x - \frac{1}{x}})} = \frac{2}{x(\sqrt{x + \frac{1}{x}} + \sqrt{x - \frac{1}{x}})}
$$
 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution b)&lt;/summary&gt;
 
 &lt;p&gt;Floating point number&lt;/p&gt;
$$
m \cdot B^e : m = \sum^{L_m} c_i B^{-l}, \ e = e_{min} + \sum^{L_e} a_l B^{l}
$$&lt;p&gt;1-Number : \((1 B^{-0})B^1\)&lt;/p&gt;
&lt;p&gt;Addition: Smallest positive number in general \(B^{e_{min} - 1}\)&lt;/p&gt;

 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution c)&lt;/summary&gt;
 
 &lt;p&gt;A givens rotations looks like this&lt;/p&gt;
$$
\begin{pmatrix}
c &amp; c \\
-s &amp; c
\end{pmatrix}
$$&lt;p&gt;and \(c^2 + s^2 = 1\) which is also fulfilled.&lt;/p&gt;
&lt;p&gt;But the matrices are not orthogonal \(E = Q^TQ\).&lt;/p&gt;

 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution d)&lt;/summary&gt;
 
 &lt;p&gt;The sum of the first column is 7.
The sum of the second column is 6.
The sum of the third column is 8.&lt;/p&gt;
&lt;p&gt;Hence the result is 8.&lt;/p&gt;

 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution e)&lt;/summary&gt;
 
 $$
K(\alpha A) = ||\alpha A|| ||\alpha^{-1} A^{-1} || = ||A|| ||A^{-1} || +K(A)
$$
 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution f)&lt;/summary&gt;
 
 $$
(b - Ax^k) = 0 \iff Ax^k = b \iff x^k A^{-1}b
$$
 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution g)&lt;/summary&gt;
 
 $$
x^{k+1} = x^k + d^k
$$&lt;p&gt;with&lt;/p&gt;
$$
f''(x)d^k = -f'(x)
$$
 
&lt;/details&gt;


&lt;h3 id="problem-57-decompositions"&gt;Problem 57: Decompositions&lt;/h3&gt;
&lt;p&gt;Given:
&lt;/p&gt;
$$A_{\alpha,\beta} = \begin{pmatrix} 4 &amp; \beta &amp; 1 \\ \alpha &amp; 2 &amp; 0 \\ 1 &amp; 0 &amp; 1 \end{pmatrix}, \quad \alpha, \beta \in \mathbb{R}, \quad \mathbf{b} = \begin{pmatrix} -4 \\ -6 \\ 2 \end{pmatrix}$$&lt;p&gt;(a) Determine all \(\alpha, \beta \in \mathbb{R}\) for which a Cholesky decomposition of \(A_{\alpha,\beta}\) exists, using the principal minors criterion.&lt;/p&gt;
&lt;p&gt;(b) Calculate the \(LR\)-decomposition of \(A_{2,6}\). Give the matrices \(L\) and \(R\) explicitly with \(A_{2,6} = LR\).&lt;/p&gt;
&lt;p&gt;(c) Determine the solution of the linear system \(A_{4,0}\mathbf{x} = \mathbf{b}\) using \(A_{4,0} = LR\) with
&lt;/p&gt;
$$L = \begin{pmatrix} 1 &amp; 0 &amp; 0 \\ 1 &amp; 1 &amp; 0 \\ \frac{1}{4} &amp; 0 &amp; 1 \end{pmatrix}, \quad R = \begin{pmatrix} 4 &amp; 0 &amp; 1 \\ 0 &amp; 2 &amp; -1 \\ 0 &amp; 0 &amp; \frac{3}{4} \end{pmatrix}.$$&lt;p&gt;(d) Give the general iteration formula for the single-step method (Gauss-Seidel method) in matrix notation.&lt;/p&gt;
&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution a)&lt;/summary&gt;
 
 &lt;p&gt;Choleksy exist if spd, it is symmetrical when \(\alpha = \beta\).&lt;/p&gt;
&lt;p&gt;And positive definite if \(\alpha &lt; \sqrt{6}\)&lt;/p&gt;

 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution b)&lt;/summary&gt;
 
 $$
A = LR \iff
\begin{pmatrix} 4 &amp; 6 &amp; 1 \\ 2 &amp; 2 &amp; 0 \\ 1 &amp; 0 &amp; 1 \end{pmatrix} = \begin{pmatrix} 1 &amp; 0 &amp; 0 \\ \frac{1}{2} &amp; 1 &amp; 0 \\ \frac{1}{4} &amp; \frac{3}{2} &amp; 1 \end{pmatrix} \cdot \begin{pmatrix} 4 &amp; 6 &amp; 1 \\ 0 &amp; -1 &amp; -\frac{1}{2} \\ 0 &amp; 0 &amp; \frac{3}{2} \end{pmatrix}
$$
 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution c)&lt;/summary&gt;
 
 &lt;ul&gt;
&lt;li&gt;From the first row: \(1 \cdot y_1 = -4 \implies y_1 = -4\).&lt;/li&gt;
&lt;li&gt;From the second row: \(1 \cdot y_1 + 1 \cdot y_2 = -6\). Substituting \(y_1 = -4\), we get \((-4) + y_2 = -6 \implies y_2 = -2\).&lt;/li&gt;
&lt;li&gt;From the third row: \(\frac{1}{4} \cdot y_1 + 0 \cdot y_2 + 1 \cdot y_3 = 2\). Substituting \(y_1 = -4\), we get \(\frac{1}{4}(-4) + y_3 = 2 \implies -1 + y_3 = 2 \implies y_3 = 3\).&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;So, the intermediate vector is \(\mathbf{y} = \begin{pmatrix} -4 \\ -2 \\ 3 \end{pmatrix}\).&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;From the third row: \(\frac{3}{4} \cdot x_3 = 3 \implies x_3 = 3 \cdot \frac{4}{3} = 4\).&lt;/li&gt;
&lt;li&gt;From the second row: \(2 \cdot x_2 - 1 \cdot x_3 = -2\). Substituting \(x_3 = 4\), we get \(2x_2 - 4 = -2 \implies 2x_2 = 2 \implies x_2 = 1\).&lt;/li&gt;
&lt;li&gt;From the first row: \(4 \cdot x_1 + 0 \cdot x_2 + 1 \cdot x_3 = -4\). Substituting \(x_3 = 4\), we get \(4x_1 + 4 = -4 \implies 4x_1 = -8 \implies x_1 = -2\).&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Therefore, the solution to the linear system \(A_{4,0}\mathbf{x} = \mathbf{b}\) is \(\mathbf{x} = \begin{pmatrix} -2 \\ 1 \\ 4 \end{pmatrix}\).&lt;/p&gt;

 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution d)&lt;/summary&gt;
 
 &lt;p&gt;Do until \(||r^k|| &lt; \epsilon ||b||\)&lt;/p&gt;
$$
Bc^k = r^k, \quad
x^{k+1} = x^k + c^k, \quad
r^{k+1} = r^k - Ac^k
$$&lt;p&gt;with \(A = L + D + R\) and \(B = L + D\)&lt;/p&gt;

 
&lt;/details&gt;


&lt;h3 id="problem-58-qr-algorithm"&gt;Problem 58: QR-Algorithm&lt;/h3&gt;
&lt;p&gt;We consider the \(QR\)-algorithm with variable shift for the simultaneous computation of all eigenvalues of a symmetric matrix \(A \in \mathbb{R}^{N \times N}\).&lt;/p&gt;
&lt;p&gt;(a) Explain how the starting matrix \(A_0\) is calculated and state the asymptotic computational cost (\(O(\cdot)\)) for this calculation.&lt;/p&gt;
&lt;p&gt;(b) State how, in one iteration, the matrix \(A_{k+1}\) is calculated from the matrix \(A_k\) and the shift \(\mu_k\).&lt;/p&gt;
&lt;p&gt;(c) Show that all iterates \(A_k\) in the \(QR\)-algorithm have the same eigenvalues.&lt;/p&gt;
&lt;p&gt;(d) Briefly explain why the starting matrix \(A_0\) used in the algorithm is advantageous compared to \(A\) for an efficient execution of the algorithm.&lt;/p&gt;
&lt;p&gt;(e) State the asymptotic computational cost of one step of the algorithm.&lt;/p&gt;
&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution a)&lt;/summary&gt;
 
 We transform \(A\) first into its Hessenbergform. The algorithm then takes \(O(N^3)\).
 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution b)&lt;/summary&gt;
 
 $$
QR = A_k - \mu I
$$&lt;p&gt;and&lt;/p&gt;
$$
A_{k+1} = RQ + \mu I
$$
 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution c)&lt;/summary&gt;
 
 $$
A_{k+1} = RQ + \mu I = Q^T(R + \mu)Q_k + \mu I = Q^TAQ
$$&lt;p&gt;Thus we do in every step a orthogonal transformation, which leave eigenvalues intact.&lt;/p&gt;
 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution d)&lt;/summary&gt;
 
 Its faster.
 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution e)&lt;/summary&gt;
 
 $$
O(N)
$$
 
&lt;/details&gt;


&lt;h3 id="problem-59-interpolation-polynomial"&gt;Problem 59: Interpolation polynomial&lt;/h3&gt;
&lt;p&gt;Let \(\xi_0 &lt; \xi_1 &lt; \dots &lt; \xi_N\) and \(f_0, f_1, \dots, f_N \in \mathbb{R}\) be given.&lt;/p&gt;
&lt;p&gt;(a) Formulate the interpolation problem for the data \((\xi_n, f_n), n=0, \dots, N\).&lt;/p&gt;
&lt;p&gt;(b) Give the Newton basis of \(\mathbb{P}_N\) for the nodes \(\xi_0, \dots, \xi_N\).&lt;/p&gt;
&lt;p&gt;(c) Use divided differences to compute the interpolation polynomial \(P_2(t)\) for the following data:
&lt;/p&gt;
$$
\begin{array}{c|ccc}
n &amp; 0 &amp; 1 &amp; 2 \\
\hline
\xi_n &amp; \frac{1}{2} &amp; 1 &amp; 2 \\
f_n &amp; -1 &amp; 0 &amp; \frac{1}{2}
\end{array}
$$&lt;p&gt;
&lt;em&gt;Hint: The monomial form of \(P_2(t)\) is not required.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;(d) Instead of \(\xi_3 = 3\), an additional value \(f_3 = -1\) is given. Compute the new interpolation polynomial \(P_3(t)\).&lt;/p&gt;
&lt;p&gt;(e) Name two disadvantages of the Lagrange form of the solution to the interpolation problem.&lt;/p&gt;
&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution a)&lt;/summary&gt;
 
 &lt;p&gt;We want to find a polynomial for that is&lt;/p&gt;
$$
p(x_n) = f_n
$$
 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution b)&lt;/summary&gt;
 
 $$
p(x) = \prod (x - x_i)
$$
 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution c)&lt;/summary&gt;
 
 $$
\begin{array}{c|c|c|cc}
n &amp; \xi_n &amp; f_n \\
\hline
0 &amp; 1 &amp; -1 \\
1 &amp; 3/2 &amp; 0 &amp; f[\xi_0, \xi_1] = \frac{-1-0}{1-3/2} = 2 \\
2 &amp; 2 &amp; 1/2 &amp; f[\xi_1, \xi_2] = \frac{0-1/2}{3/2-2} = 1 &amp; f[\xi_0, \xi_1, \xi_2] = \frac{2-1}{1-2} = -1
\end{array}
$$$$
P_2(t) = -1 + 2(\xi-1) - 1(\xi-1)(\xi-3/2)
$$
 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution d)&lt;/summary&gt;
 
 $$
\begin{array}{c|c|c|ccc}
n &amp; \xi_n &amp; f_n \\
\hline
0 &amp; 1 &amp; -1 \\
1 &amp; 3/2 &amp; 0 &amp; f[\xi_0, \xi_1] = \frac{-1-0}{1-3/2} = 2 \\
2 &amp; 2 &amp; 1/2 &amp; f[\xi_1, \xi_2] = \frac{0-1/2}{3/2-2} = 1 &amp; f[\xi_0, \xi_1, \xi_2] = \frac{2-1}{1-2} = -1 \\
3 &amp; 3 &amp; -1 &amp; f[\xi_2, \xi_3] = \frac{1/2-(-1)}{2-3} = -\frac{3}{2} &amp; f[\xi_1, \xi_2, \xi_3] = \frac{1-(-3/2)}{3/2-3} = -\frac{5}{3} &amp; f[\xi_0, \xi_1, \xi_2, \xi_3] = \frac{-1-(-5/3)}{1-3} = -\frac{1}{3}
\end{array}
$$$$P_3(t) = -1 + 2(\xi-1) - 1(\xi-1)(\xi-3/2) - \frac{1}{3}(\xi-1)(\xi-3/2)(\xi-2)$$
 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution e)&lt;/summary&gt;
 
 &lt;ul&gt;
&lt;li&gt;The evaluation is harder&lt;/li&gt;
&lt;li&gt;if we get a new root point, we need to recalculate everything&lt;/li&gt;
&lt;/ul&gt;

 
&lt;/details&gt;


&lt;h3 id="problem-60-integrating"&gt;Problem 60: Integrating&lt;/h3&gt;
&lt;p&gt;We consider an interval \([a, b] \subset \mathbb{R}\) and the integral \(\int_a^b f(t)dt\) for \(f: [a, b] \to \mathbb{R}\).&lt;/p&gt;
&lt;p&gt;(a) Give the general form of a quadrature formula for the approximation of the integral.&lt;/p&gt;
&lt;p&gt;(b) State the formula from the lecture for calculating the weights and briefly explain the quantities that appear.&lt;/p&gt;
&lt;p&gt;(c) Explain why composite quadrature formulas, such as the composite trapezoidal rule, are used by referring to the error bound of the composite trapezoidal rule and the error bound from (c).&lt;/p&gt;
&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution a)&lt;/summary&gt;
 
 $$
Q_n = (a-b) \sum b_k f(a + c_k(b-a))
$$
 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution b)&lt;/summary&gt;
 
 $$
\frac{1}{q} = \sum c^{q-1}b_k
$$&lt;p&gt;where \(q = p + 1\) with \(p\) the maixmal order.&lt;/p&gt;
 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution c)&lt;/summary&gt;
 
 Has a better error.
 
&lt;/details&gt;


&lt;div style="margin-bottom: 100px;"&gt;&lt;/div&gt;

&lt;h2 id="oral-problems"&gt;Oral Problems&lt;/h2&gt;
&lt;h3 id="problem-61"&gt;Problem 61&lt;/h3&gt;
&lt;p&gt;Let \(Ax = b\) a LGS with \(A \in \mathbb{R}^{n \times n}\) regular and \(b \in \mathbb{R}^{n}\).&lt;/p&gt;
&lt;p&gt;Let \(B \sim A^{-1}\) a pre-condition to \(A\). What is the iterations method of a LGS with pre condiiton.&lt;/p&gt;
&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution&lt;/summary&gt;
 
 &lt;p&gt;Our LGS with pre condition is \(BA = Bb\) adn the iteration method&lt;/p&gt;
$$
x^{k+1} = x^k + B(b - Ax^k)
$$
 
&lt;/details&gt;


&lt;p&gt;Let \(Ax = b\) a LGS with \(A \in \mathbb{R}^{n \times n}\) regular and \(b \in \mathbb{R}^{n}\).&lt;/p&gt;
&lt;p&gt;Let concretely&lt;/p&gt;
$$A = \begin{pmatrix} 3 &amp; 1 &amp; 0 \\ 1 &amp; 2 &amp; 0 \\ 0 &amp; 0 &amp; 1 \end{pmatrix}$$&lt;p&gt;Investigate the &lt;strong&gt;Jacobi method&lt;/strong&gt; applied to \(Ax=b\) with the given \(A\), arbitrary right-hand side \(b \in \mathbb{R}^N\) and arbitrary starting vector \(x^0 \in \mathbb{R}^N\) for &lt;strong&gt;convergence&lt;/strong&gt; in the &lt;strong&gt;Euclidean norm&lt;/strong&gt; \(|| \cdot ||_2\).&lt;/p&gt;
&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution&lt;/summary&gt;
 
 &lt;p&gt;We have then linear convergence if&lt;/p&gt;
$$
p(I_N -BA) &lt; 1
$$&lt;p&gt;Because we use Jacobi method \(A = L + D + R\) where \(B = D^{-1}\) with&lt;/p&gt;
$$
B =
\begin{pmatrix}
\frac{1}{3} &amp; 0 &amp; 0 \\
0 &amp; \frac{1}{2} &amp; 0 \\
0 &amp; 0 &amp; 1
\end{pmatrix}
$$&lt;p&gt;And&lt;/p&gt;
$$
C = I - BA =
\begin{pmatrix}
0 &amp; -1/3 &amp; 0 \\
-1/2 &amp; 0 &amp; 0 \\
0 &amp; 0 &amp; 0
\end{pmatrix}
$$&lt;p&gt;Further&lt;/p&gt;
$$
det(\lambda I_n - C) = det(
\begin{pmatrix}
\lambda &amp; -1/3 &amp; 0 \\
-1/2 &amp; \lambda &amp; 0 \\
0 &amp; 0 &amp; \lambda
\end{pmatrix}
) = \lambda
\begin{pmatrix}
\lambda &amp; -1/3 \\
-1/2 &amp; \lambda \\
\end{pmatrix} = \lambda (\lambda^2 - 1/6)
)
$$&lt;p&gt;We have \(\lambda_1 = 0, \lambda_{2,3} \pm \frac{1}{\sqrt{6}}\), which are all smaller as \(1\), thus it converges.&lt;/p&gt;

 
&lt;/details&gt;


&lt;p&gt;&lt;strong&gt;Rewrite&lt;/strong&gt;&lt;/p&gt;
$$\frac{1}{1+2x} - \frac{1-x}{1+x} \quad \text{for } |x| \ll 1$$&lt;p&gt;so that the expression is &lt;strong&gt;well-conditioned&lt;/strong&gt; in &lt;strong&gt;floating-point arithmetic&lt;/strong&gt;. Briefly &lt;strong&gt;justify&lt;/strong&gt; why the new term is well-conditioned.&lt;/p&gt;
&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution&lt;/summary&gt;
 
 $$
\frac{1}{1 + 2x} - \frac{1-x}{1 + x} = \frac{1+ x - (1-x)(1+ 2x)}{(1 + x)(1+2x)} = \frac{2x^2}{(1+x)(1+2x)}
$$
 
&lt;/details&gt;


&lt;p&gt;What is least quare problem?&lt;/p&gt;
&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution&lt;/summary&gt;
 
 &lt;p&gt;It is defined as&lt;/p&gt;
$$
Search \ x \in \mathbb{R}^n \ with \ |Ax - b|_2 = min!
$$&lt;p&gt;We do this when we cant solve \(Ax = b\) directly and thus instead solve it approximately.&lt;/p&gt;

 
&lt;/details&gt;


&lt;p&gt;How can we solve this?&lt;/p&gt;
&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution&lt;/summary&gt;
 
 &lt;p&gt;Using the normal equation&lt;/p&gt;
$$
A^TAx = A^Tb
$$&lt;p&gt;we get this by taking our least square problem to the power of two.&lt;/p&gt;

 
&lt;/details&gt;


&lt;p&gt;How can we solve the normal equation?&lt;/p&gt;
&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution&lt;/summary&gt;
 
 &lt;p&gt;We can use the singular decomposition.&lt;/p&gt;
$$
A^TA = V \Sigma U^T
$$
 
&lt;/details&gt;


&lt;h3 id="problem-62"&gt;Problem 62&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;What is the &lt;strong&gt;Raleigh-Constant&lt;/strong&gt; ?&lt;D-lt&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution&lt;/summary&gt;
 
 &lt;p&gt;Is defined as&lt;/p&gt;
$$
r(A, x) = \frac{x^TAx}{x^Tx}
$$&lt;p&gt;it approximates eigenvalues.&lt;/p&gt;
&lt;p&gt;We can use it as startvalue in inverse iteration with shift.&lt;/p&gt;

 
&lt;/details&gt;


&lt;ol start="2"&gt;
&lt;li&gt;What is the &lt;strong&gt;Kylov method&lt;/strong&gt;?&lt;/li&gt;
&lt;/ol&gt;
&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution&lt;/summary&gt;
 
 Also known as &lt;strong&gt;cg&lt;/strong&gt; method. It is an iterative method to solve sparse LGS.
 
&lt;/details&gt;


&lt;ol start="3"&gt;
&lt;li&gt;What is a &lt;strong&gt;matrixnorm&lt;/strong&gt;?&lt;/li&gt;
&lt;/ol&gt;
&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution&lt;/summary&gt;
 
 &lt;p&gt;We have defined the associated matrixnorm as&lt;/p&gt;
$$
||X||_A = \sup{x \neq 0} \frac{ ||xX||_A}{||x||}
$$&lt;p&gt;A norm is general has three attributes&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Positive definite
$$||A|| &gt; 0$$&lt;/li&gt;
&lt;li&gt;Triangle inequality
$$||AB|| &gt; ||A||||B||$$&lt;/li&gt;
&lt;li&gt;Homogeneous
$$||\lambda A|| = |\lambda|||A||$$&lt;/li&gt;
&lt;/ol&gt;

 
&lt;/details&gt;


&lt;ol start="4"&gt;
&lt;li&gt;Calculate for \(z = (1 \ -1 \ 1)^T\) the value of norm \(A\) with

$$
A LL^T, \quad L = \begin{pmatrix}
1 &amp; 0 &amp; 0 \\
-2 &amp; 1 &amp; 0 \\
1 &amp; 0 &amp; 1
\end{pmatrix}
$$&lt;/li&gt;
&lt;/ol&gt;
&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution&lt;/summary&gt;
 
 &lt;p&gt;It can be calculated with&lt;/p&gt;
$$
z^T LL^T z
$$
 
&lt;/details&gt;


&lt;ol start="5"&gt;
&lt;li&gt;What is &lt;strong&gt;Destruction&lt;/strong&gt;?&lt;/li&gt;
&lt;/ol&gt;
&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution&lt;/summary&gt;
 
 If we subtract two numbers from wach other which are nearly identical the most significant digits will become 0, while the least significant digits will counts, this leads to a result that is very inaccurate, the number explodes in size.
 
&lt;/details&gt;


&lt;ol start="5"&gt;
&lt;li&gt;What is &lt;strong&gt;Singular Value Decomposition&lt;/strong&gt;?&lt;/li&gt;
&lt;/ol&gt;
&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution&lt;/summary&gt;
 
 &lt;p&gt;If we have a matrix A then the singular value decomposition is&lt;/p&gt;
$$
A = V \sigma U^T, \quad \sigma = diag(\sigma_1, ..., \sigma_n), \quad \sigma_1 = \sqrt{\lambda_i}
$$
 
&lt;/details&gt;


&lt;ol start="6"&gt;
&lt;li&gt;Determine the solution of the problem
$$|Ax^* -b| = \min |Ax-b|$$with the help of singular value decomposition&lt;/li&gt;
&lt;/ol&gt;
&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution&lt;/summary&gt;
 
 &lt;p&gt;This can be solved using the normal equation&lt;/p&gt;
$$
A^TAx = A^Tb
$$&lt;p&gt;which we can express using the singular value decomposition&lt;/p&gt;
$$
(V \sigma U^T)^T (V \sigma U^T)x = (V \sigma U^T)^Tb \iff
U \sigma V V \sigma Ux = U \sigma V b \iff
x^* = U \sigma^{-1}
$$
 
&lt;/details&gt;


&lt;ol start="7"&gt;
&lt;li&gt;What is the lagrange basis? And why are the solution always unique?&lt;/li&gt;
&lt;/ol&gt;
&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution&lt;/summary&gt;
 
 $$
P(x) = \sum f_n L_n (x), \quad L_n = \prod_{n \neq m} \frac{x - x_n}{x_n - x_m}
$$&lt;p&gt;They are always 0, except where the roots are, there they are 1, we multiply that than with the function value at that place.&lt;/p&gt;
&lt;p&gt;Suppose there are &lt;strong&gt;two&lt;/strong&gt; polynomials ( p(x) ) and ( q(x) ) of degree ≤ n that both satisfy
&lt;/p&gt;
$$
p(x_i) = q(x_i) = y_i \quad \forall i.
$$&lt;p&gt;Consider their &lt;strong&gt;difference&lt;/strong&gt;:
&lt;/p&gt;
$$
r(x) = p(x) - q(x).
$$&lt;p&gt;Then:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;( r(x) ) is also a polynomial of degree ≤ n,&lt;/li&gt;
&lt;li&gt;and ( r(x_i) = 0 ) for all ( i = 0, \ldots, n. )&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;So ( r(x) ) has ( n+1 ) &lt;strong&gt;distinct roots&lt;/strong&gt; (since all ( x_i ) are distinct).
But a nonzero polynomial of degree ≤ n can have &lt;strong&gt;at most ( n )&lt;/strong&gt; roots.&lt;/p&gt;
&lt;p&gt;Therefore, ( r(x) ) must be the &lt;strong&gt;zero polynomial&lt;/strong&gt;, i.e. ( p(x) = q(x) ).&lt;/p&gt;

 
&lt;/details&gt;


&lt;ol start="8"&gt;
&lt;li&gt;What solve methods did we learn in the lecture?&lt;/li&gt;
&lt;/ol&gt;
&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution&lt;/summary&gt;
 
 &lt;ol&gt;
&lt;li&gt;Newton-method: to solve non linear problems.&lt;/li&gt;
&lt;li&gt;Jacobi, Gauß-Seidel method: To solve linear problems.&lt;/li&gt;
&lt;/ol&gt;

 
&lt;/details&gt;


&lt;ol start="9"&gt;
&lt;li&gt;What is the QR Algorithm? Why do we do it? Can we speed it up?&lt;/li&gt;
&lt;/ol&gt;
&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution&lt;/summary&gt;
 
 &lt;p&gt;We do it, because the convergence speed it bettert han cholesky but it has more requriemenst. Can be used to solve LGS or to determine eigenvalues like this&lt;/p&gt;
$$
A_k = QR
A_{k+1} RQ
$$&lt;p&gt;We can speed up convergence speed, by starting with an hessian matrix and a shift. To get the hessenbergform we do&lt;/p&gt;
$$
H = Q^TAQ
$$
 
&lt;/details&gt;


&lt;h3 id="problem-63"&gt;Problem 63&lt;/h3&gt;
&lt;p&gt;What is the Tikhonov Regularization? How can it be solved?&lt;/p&gt;
&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution&lt;/summary&gt;
 
 &lt;p&gt;When we have a least square problem \(|Ax - b| = min!\), we cab have the problem that \(A\) has bad condition, which leads to an increase of errors in the solution.
To solve this we can use the Tikhonov Regularization, the problem is then formulated as&lt;/p&gt;
$$
\frac{1}{2}|Ax - b|^2_2 + \frac{1}{2}\alpha |x|^2_2, \quad \alpha &gt; 0
$$&lt;p&gt;and the solution is&lt;/p&gt;
$$
x = (A^TA + \alpha I_n)^{-1}A^Tb
$$&lt;p&gt;When choosing \(\alpha\) keep in mind:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The bigger \(\alpha\), the bigger the approximations error.&lt;/li&gt;
&lt;li&gt;The smaller \(\alpha\), the bigger the conditioning error.&lt;/li&gt;
&lt;/ul&gt;

 
&lt;/details&gt;


&lt;p&gt;What is the trapezoid rule? What is the summed trapezoid rule? What is the general formula for the quadrature formula? For what are they used?&lt;/p&gt;
&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution&lt;/summary&gt;
 
 &lt;p&gt;Trapezoid rule&lt;/p&gt;
$$
\frac{b-a}{2}(f(a) + f(b))
$$&lt;p&gt;Summed Trapezoid rule&lt;/p&gt;
$$
T_n(f) = \sum_{n=1}^{N} \frac{b-a}{2}(f(a) + f(b))
$$&lt;p&gt;General formula&lt;/p&gt;
$$
Q(f) = \sum w_x f(x)
$$&lt;p&gt;They ared use to numericaly solve integrals.&lt;/p&gt;

 
&lt;/details&gt;


&lt;p&gt;What is the QR-Iteration? How does it work? What do we need to do that QR_iteration gives the same result as the ivnerse iteraiton with shift? What can we do to increase the speed of QR-iteration?&lt;/p&gt;
&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution&lt;/summary&gt;
 
 &lt;p&gt;QR-Iteration is used to find out the eigenvalues.&lt;/p&gt;
&lt;ol start="0"&gt;
&lt;li&gt;Choose \(\mu = A[n,n]\)&lt;/li&gt;
&lt;li&gt;
$$
A_k -\mu = Q_kR_k
$$&lt;/li&gt;
&lt;li&gt;
$$
A_{k+1} = R_kQ_k
$$&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;In inverse shift choose \(v = e^N\).&lt;/p&gt;
&lt;p&gt;To increase the speed we transform our matrix \(A\) into hessenbergfrom using \(H = Q^TAQ\).&lt;/p&gt;

 
&lt;/details&gt;


&lt;h3 id="problem-64"&gt;Problem 64&lt;/h3&gt;
&lt;p&gt;What is a preconditioning matrix? What is the Jacobi preconditioning matrix? What is an example of a preconditioning matrix?&lt;/p&gt;
&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution&lt;/summary&gt;
 
 &lt;p&gt;A preconditioning matrix \(B\), gets multiplied to our LGS in order to have better conditioning&lt;/p&gt;
$$
BAx = Bb
$$&lt;p&gt;Jacobi preconditioning is&lt;/p&gt;
$$
B = D^{-1}
$$&lt;p&gt;where \(A = L + D + R\).&lt;/p&gt;
&lt;p&gt;The identity matrix is a preconditioning matrix.&lt;/p&gt;

 
&lt;/details&gt;


&lt;p&gt;What are Kylov-methods? What are they used for?&lt;/p&gt;
&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution&lt;/summary&gt;
 
 &lt;p&gt;Examples include:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;CG-method&lt;/li&gt;
&lt;li&gt;GMRES-method&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;They are used to so solve iterative LGS.&lt;/p&gt;

 
&lt;/details&gt;


&lt;p&gt;How does a QR decomposition work? How is a householder transformation defined? What is another method to do the decomposition? What is the advantage of Givens compared to householder? What is the computation complexity of QR? What is the advnatage if A is tridiagonal(hessenberg)?&lt;/p&gt;
&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution&lt;/summary&gt;
 
 &lt;p&gt;We decompose&lt;/p&gt;
$$
A = QR
$$&lt;p&gt;with \(Q\) and orthogonal matrix and \(R\) upper triangular matrix.
We determine \(Q\) with the help of householder transformation and&lt;/p&gt;
$$
R = Q_N ... Q_2 Q_1 A
$$&lt;p&gt;and&lt;/p&gt;
$$
Q = Q_1 Q_2 ... Q_N
$$&lt;p&gt;A householder transformation is defined as follows&lt;/p&gt;
$$
Q = I - 2\frac{ww}{w^Tw}
$$&lt;p&gt;We can also use givens-rotations&lt;/p&gt;
$$
\begin{pmatrix}
c &amp; s \\
-s &amp; c
\end{pmatrix}, \quad c^2 + s^2 = 1
$$&lt;p&gt;Givens is better in spare matrices. needs fewer operations.&lt;/p&gt;
&lt;p&gt;Computational complexit is \(\frac{4}{3}N^3\).&lt;/p&gt;
&lt;p&gt;If the matrix is tridiagonal we can calculate the QR-decomposition in N operations.&lt;/p&gt;

 
&lt;/details&gt;


&lt;p&gt;Given a integral with a range of \(|b-a| &gt;&gt; 1\), how can this be approximated with a quadrature formuka? How does it formula look like? How does the error look when we double the number of roots? Which qudrature formula is the error otpimal?&lt;/p&gt;
&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution&lt;/summary&gt;
 
 &lt;p&gt;We use a summed quadrature formula. H&lt;/p&gt;
&lt;p&gt;The formula for the summed quardture formula is&lt;/p&gt;
$$
I_N(f) h \sum_{m = 1} \sum_{n = 1} w_n f(\phi_m(\xi_n))
$$&lt;p&gt;When we double the number of roots, the error goes down.&lt;/p&gt;
&lt;p&gt;The Gauß quadrature is optimal.&lt;/p&gt;

 
&lt;/details&gt;


&lt;p&gt;What happens during the lagrange format in polynomialinterpolation with äquidistant roots? How can we calculate a interpolationpolynomial? What is the name of the algorithm with which we calculate it?&lt;/p&gt;
&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution&lt;/summary&gt;
 
 &lt;p&gt;The condition with äquidistant roots is bad, and with that also the condition of the interpolation polynomial.&lt;/p&gt;
&lt;p&gt;Newton-method.&lt;/p&gt;
&lt;p&gt;Neville Scheme.&lt;/p&gt;

 
&lt;/details&gt;


&lt;p&gt;Given the non-linear system of equation&lt;/p&gt;
$$
-u^2 +v + 1 = 0, \quad uv = 0
$$&lt;p&gt;(i) determine the exact solution
(ii) do the first step of the newton method on the start value \((u_0, v_0 = (\pm \epsilon, 0)^T\)
(iii) discuss the choosens tart value.&lt;/p&gt;
&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution&lt;/summary&gt;
 
 &lt;p&gt;(i)
From \(uv = 0\), either \(u = 0\) or \(v =0\). If \(u=0\) then \(v=-1\) and with \(v=0\) then \(u= \pm 1\).&lt;/p&gt;
&lt;p&gt;(ii)
&lt;/p&gt;
$$
F' =
\begin{pmatrix}
-2u &amp; 1 \\
u &amp; v
\end{pmatrix}
$$&lt;p&gt;insert start value&lt;/p&gt;
$$
F'(u^0, v^0) =
\begin{pmatrix}
\pm2\epsilon &amp; 1 \\
0 &amp; \pm \epsilon
\end{pmatrix}
$$&lt;p&gt;and&lt;/p&gt;
$$
F(u^0, v^0) = (1 - \epsilon^2 \ 0)
$$&lt;p&gt;we have thus the LGS&lt;/p&gt;
$$
\begin{pmatrix}
\pm2\epsilon &amp; 1 \\
0 &amp; \pm \epsilon
\end{pmatrix} X = (1 - \epsilon^2 \ 0)
$$&lt;p&gt;from this we get \(X = (u, v) = (\pm \frac{1}{2}(1/\epsilon - \epsilon), 0)\).&lt;/p&gt;
&lt;p&gt;(iii)
start value was badly chosen, because we are in two separate convergent ranges, for \(\epsilon \to 0\) is the jacobi matrix not regular anymore and thus we cannot continue the method.&lt;/p&gt;

 
&lt;/details&gt;


&lt;h2 id="conclusion"&gt;Conclusion&lt;/h2&gt;


&lt;figure&gt;
 &lt;img style="display: block; margin-left: auto; margin-right: auto; width:50%" src="https://monkemanx.github.io/attachments/man_who_lost_it.jpg"&gt;
 &lt;figcaption style="margin-top: 20px"&gt;
 My pain is constant and sharp and I do not hope for a better world for anyone, in fact I want my pain to be inflicted on others. I want no one to escape.
 &lt;/figcaption&gt;
&lt;/figure&gt;

</description></item><item><title>Scotland Trip</title><link>https://monkemanx.github.io/articles/scotland_trip/</link><pubDate>Mon, 25 Aug 2025 12:00:00 +0000</pubDate><author>monkeman@cock.li (MonkeMan)</author><guid>https://monkemanx.github.io/articles/scotland_trip/</guid><description>&lt;p&gt;The following is a travel journal in which I describe my trip to Scotland. Before I start, I want to give a philosophical motivation for traveling, feel free to skip this if you are not interested.&lt;/p&gt;
&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details open&gt;
 &lt;summary&gt;Philosophical Reasoning&lt;/summary&gt;
 
 &lt;p&gt;I think the following words from &lt;a href="https://en.wikisource.org/wiki/Moral_letters_to_Lucilius/Letter_28"&gt;Seneca’s 28th letter&lt;/a&gt; are important:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;What pleasure is there in seeing new lands? Or in surveying cities and spots of interest? All your bustle is useless.
Do you ask why such flight does not help you? It is because you flee along with yourself. You must lay aside the burdens of the mind; until you do this, no place will satisfy you.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;One should not simply travel because there are problems at home, or because one is depressed and looking for distraction. For a while one might forget the problems, but sooner or later they slip through and one becomes unhappy again. (For example, see my reflections in &lt;a href="https://monkemanx.github.io/articles/namibia/"&gt;Day 4: Optimization Theory&lt;/a&gt;) in my Namibia Travel log.&lt;/p&gt;
&lt;p&gt;But I would go even further than Seneca. Not only do I think that traveling with such a goal is invalid, but also as he writes, &lt;em&gt;“What pleasure is there in seeing new land?”&lt;/em&gt;, there is no intrinsic goodness in experiencing either new or familiar things in themselves. Experiences are instrumental: they are good only insofar as they serve a higher intrinsic good.&lt;/p&gt;
&lt;p&gt;What is this higher good? If you have read my previous article (&lt;a href="https://monkemanx.github.io/articles/how_to_live/"&gt;How to Live&lt;/a&gt;), then you know that I propose &lt;strong&gt;virtue&lt;/strong&gt; as the only intrinsic good. As such, new experiences are only good insofar as they help us develop and nourish virtue.&lt;/p&gt;
&lt;p&gt;How can they do this? First, I didn’t travel to Scotland with sightseeing as my primary goal, but rather at the behest of a friend who invited me. Accepting the invitation and offering companionship was thus an act of &lt;strong&gt;friendship&lt;/strong&gt;. Second, this was my first trip alone outside my home country, which developed &lt;strong&gt;courage&lt;/strong&gt;. Third, I have a tendency to spend too much time sitting in my room, in other words, I’m prone to the vice of &lt;strong&gt;laziness&lt;/strong&gt;. Traveling helps counter that vice, cultivating the virtue of &lt;strong&gt;industriousness&lt;/strong&gt;, which in turn gives me more opportunities to practice virtue by being active in the world.&lt;/p&gt;

 
&lt;/details&gt;


&lt;p&gt;A while ago, a friend of mine, someone I’ve known online for almost ten years, invited me to visit him in Scotland. The starting point for this invitation came when I told him I wanted to try mushrooms for the first time, but I was nervous and had no trip, sitter. He offered to be one for me. So, I accepted the invitation with the thought that we could hang out in person, and that I could also do a bit of sightseeing in his city, Edinburgh, and perhaps in Scotland more broadly.&lt;/p&gt;
&lt;p&gt;Since he didn’t have any strict appointments for a while, and I didn’t either, I looked up the cheapest direct flights from Stuttgart to Edinburgh. Most flights with Eurowings were around 300 euros, but I found one on July 30th, just a few days after his invitation, for only 60 euros, with the return flight on August 8th also 60 euros. So I booked them, and just a few days later, without much planning beyond my goal of spending time with him and doing some sightseeing, I was on my way to Edinburgh.&lt;/p&gt;
&lt;h2 id="day-1-the-flight"&gt;Day 1: The Flight&lt;/h2&gt;
&lt;p&gt;Early in the morning of July 30th I made my way from my small hometown to Stuttgart, where my flight was departing. For that I used public transport. This is especially practical thanks to the recently introduced &lt;em&gt;Deutschlandticket&lt;/em&gt;, which costs roughly 50 euros per month and allows you to use almost all public transport in Germany (trains, buses, trams), with the exception of high-speed trains.&lt;/p&gt;
&lt;p&gt;During the train ride I found myself in a particular mood. The main reason why I wrote &lt;a href="https://monkemanx.github.io/articles/how_to_live/"&gt;my article &lt;em&gt;How to Live&lt;/em&gt;&lt;/a&gt;, and more broadly why I became interested in philosophy in the first place, is that I struggle with the meaning of life, or rather its apparent lack of it. Many people, when faced with such a question, turn to God, or they try to live a distracted life so as not to face the question again. But that was not good enough for me. I wanted the meaning of my life to be more grounded.&lt;/p&gt;
&lt;p&gt;Thus, I began my philosophical inquiry, which I outlined in that article (though the system is not yet complete, I still want to build on Paul Tillich’s account of &lt;em&gt;Grund&lt;/em&gt;, Nietzsche’s overcoming of &lt;em&gt;ressentiment&lt;/em&gt;, and the Buddhist account of desire). And although I believe my argument in that article is sound, and on an intellectual level I hold to it, emotions do not always keep pace with reason. In other words, sometimes the emotional reality does not correspond to the intellectual reality.&lt;/p&gt;
&lt;p&gt;We all know this: we may rationally understand there is no reason to fear something, yet still we feel fear. That doesn’t mean it’s impossible to align thought and feeling. The first step in overcoming any problem is recognizing it intellectually, and then waiting for emotion to follow. For example, to overcome the fear of spiders we first have to reason that, at least here in germany, the fear is not valid (in Australia, of course, it might be a different story). With time, hopefully, the emotion follows.&lt;/p&gt;
&lt;p&gt;Why do I explain all this? The reason I was in such a mood that morning was precisely because of this gap between intellect and feeling. Even though I know intellectually that all meaning and value are subjective (see my article &lt;a href="https://monkemanx.github.io/articles/where_the_eiffel_tower_is_is_not_obejctive/"&gt;Where the Eiffel Tower Is Is Not Objective&lt;/a&gt;), and that I myself choose &lt;a href="https://monkemanx.github.io/articles/how_to_live/"&gt;virtue as the good&lt;/a&gt;, I couldn’t help but &lt;em&gt;feel&lt;/em&gt; the meaningless of the object–subject world.&lt;/p&gt;
&lt;p&gt;I think the following words from a book I happened to be reading on the train sum it up well:&lt;/p&gt;
&lt;div class="complete-container"&gt;
 &lt;div&gt;&lt;/div&gt;
 &lt;div class="p-container"&gt;
 &lt;pre class="poem-pre"&gt;
 
The human heart is like a bowl with a little crack in the bottom, so that water is always leaking out.
And you have to keep pouring more and more in, to try and make up for it.
That no matter what you do in life, you're always losing things, either explicitly or in the abstract.
And the only way to make up for it is to keep adding new things to make up for it.
Because if you're not careful...
You won't be able to keep it up, and before you know it, you'll have nothing at all.
And then you'll be out of luck for good.

 &lt;/pre&gt;
 &lt;/div&gt;
 &lt;div&gt;&lt;/div&gt;
&lt;/div&gt;

&lt;style&gt;
.complete-container {
 display: flex;
 justify-content: center;
 align-items: center;
 flex-direction: row;
}

.p-container {
 max-width: 600px; 
 width: 100%; 
 margin: 0 20px;
 font-size: 16px;
 border-bottom: 2px solid #ccc; 
 padding-bottom: 10px; 
}

.poem-pre {
 white-space: pre-wrap; 
 text-align: left; 
}
&lt;/style&gt;


&lt;p&gt;But enough brooding, back to the trip. I arrived at the airport, the flight was delayed by an hour, and then I was up in the air. I had a really good nap and two hours later, which thanks to the nap felt more like thirty minutes, I was in Edinburgh.&lt;/p&gt;












&lt;figure style="display: block; margin: 0 auto; width: 100%; "&gt;
 &lt;img
 src="https://monkemanx.github.io/attachments/scotland/eurowing.jpg"
 loading="lazy"
 width=""
 height=""
 alt="Image"
 style="display: block; width: 100%; height: 100%; object-fit: contain; "
 &gt;
 
&lt;/figure&gt;

&lt;p&gt;My friend was already waiting with his car in the parking lot. Unfortunately, because of the delay he ended up waiting about an hour, which cost him 35 pounds in parking fees, crazy isn’t it?&lt;/p&gt;
&lt;p&gt;On the ride, he told me about the new UK age-restriction law on adult content (&lt;a href="https://www.independent.co.uk/tech/uk-porn-age-verification-b2795354.html"&gt;see here&lt;/a&gt;). It doesn’t just affect pornographic sites, but also things like Discord channels. You now need to send in a picture of your ID to get access, or just use a VPN.&lt;/p&gt;
&lt;p&gt;When I arrived at his home it was already afternoon. We ordered some pizza and watched soem anime, and that was the day.&lt;/p&gt;












&lt;figure style="display: block; margin: 0 auto; width: 100%; "&gt;
 &lt;img
 src="https://monkemanx.github.io/attachments/scotland/IMG_20250730_185504551.jpg"
 loading="lazy"
 width=""
 height=""
 alt="Image"
 style="display: block; width: 100%; height: 100%; object-fit: contain; "
 &gt;
 
&lt;/figure&gt;

&lt;h2 id="day-2-edinburgh"&gt;Day 2: Edinburgh&lt;/h2&gt;
&lt;p&gt;The place I was staying in was in the suburbs of Edinburgh, with a bus station just a minute away that could take you directly to the city center in about 30 minutes. Although that might sound long, it’s mostly because of how many bus stops there are in the city. I bet the same drive by car would have taken no longer than 10–15 minutes.&lt;/p&gt;
&lt;p&gt;Coming from Germany, I found the public transport in Edinburgh, especially the buses, both better and worse in different ways. Better, because of the sheer number of bus stops: you’re never more than five minutes away from one. And unlike my village, where a bus comes maybe every half hour, here they arrive almost constantly. Often there’s even a queue of up to three buses back-to-back at a station. I also really liked how many bus stops have digital displays showing when the next buses are due (we should definitely have this everywhere in Germany), and how easy it is to just pay by tapping your debit card—no questions asked.&lt;/p&gt;
&lt;p&gt;On the other hand, what was worse is the lack of interoperability between different bus and train companies. In Germany we have the &lt;em&gt;Deutschlandticket&lt;/em&gt;, which costs about 50 euros a month and lets you travel as much as you want (as long as it’s not on the very fast trains, the ICE) across all buses, trams, and regional trains. In Scotland, there’s no such unified ticket, every company does things differently, and there isn’t even a single app that shows you all possible routes. I found Google Maps worked best. In Germany, it’s normal to have one central travel app for all public transport.&lt;/p&gt;
&lt;figure style="margin: 10px; text-align: center;"&gt;
 &lt;video style="display: block; margin-left: auto; margin-right: auto; width:100%" controls&gt;
 &lt;source src="https://monkemanx.github.io/attachments/scotland/VID_20250807_190337993.mp4" type="video/mp4"&gt;
 Your browser does not support this embedded video.
 &lt;/video&gt;
&lt;/figure&gt;

&lt;p&gt;But enough about transport. In the morning my friend and I went to the city center to check out Scotland’s National Museum. Entrance was free, which I think is a very cool idea. If it’s the &lt;em&gt;national&lt;/em&gt; museum, then it makes sense that everyone in the country, rich or poor, can enjoy it. That said, I felt it would have been fair if foreigners had to pay. Free entry also means the museum is very full, so you don’t get much quietness, but instead a bustling atmosphere.&lt;/p&gt;
&lt;p&gt;The museum itself is huge and varied, with exhibits ranging from technology and science, to the history of Scotland, to collections of animals. You can also go up to the roof, which offers a great view of the city.&lt;/p&gt;







	






































	
	

	
		&lt;script src="https://monkemanx.github.io/shortcode-gallery/jquery-3.7.1.min.js"&gt;&lt;/script&gt;
	

	

	&lt;script src="https://monkemanx.github.io/shortcode-gallery/swipebox/js/jquery.swipebox.min.js"&gt;&lt;/script&gt;
	&lt;link rel="stylesheet" href="https://monkemanx.github.io/shortcode-gallery/swipebox/css/swipebox.min.css"&gt;

	&lt;script src="https://monkemanx.github.io/shortcode-gallery/justified_gallery/jquery.justifiedGallery.min.js"&gt;&lt;/script&gt;
	&lt;link rel="stylesheet" href="https://monkemanx.github.io/shortcode-gallery/justified_gallery/justifiedGallery.min.css"/&gt;


&lt;style&gt;
	

	
&lt;/style&gt;





&lt;div id="gallery-bcef433843c0ca1baf48237c499dadee-5-wrapper" class="gallery-wrapper"&gt;
&lt;div id="gallery-bcef433843c0ca1baf48237c499dadee-5" class="justified-gallery"&gt;
	
		

			
			

			
			
				
			

			
				
			

			
			
				
					
				
			


			
			

			&lt;div&gt;
				
				
					
					
				

				
				
					
					
				

				&lt;a href="https://monkemanx.github.io/scotland/museum/IMG_20250731_144852754.jpg"
					class="galleryImg"
					
					&gt;
					&lt;img
						width="600" height="338"

						
							src="https://monkemanx.github.io/scotland/museum/IMG_20250731_144852754_hu_63dea59e5b3a9c89.jpg"
						

						
					&gt;
				&lt;/a&gt;
			&lt;/div&gt;
		
	
		

			
			

			
			
				
			

			
				
			

			
			
				
					
				
			


			
			

			&lt;div&gt;
				
				
					
					
				

				
				
					
					
				

				&lt;a href="https://monkemanx.github.io/scotland/museum/IMG_20250731_151414566.jpg"
					class="galleryImg"
					
					&gt;
					&lt;img
						width="600" height="338"

						
							src="https://monkemanx.github.io/scotland/museum/IMG_20250731_151414566_hu_df4d280408bfe13b.jpg"
						

						
					&gt;
				&lt;/a&gt;
			&lt;/div&gt;
		
	
		

			
			

			
			
				
			

			
				
			

			
			
				
					
				
			


			
			

			&lt;div&gt;
				
				
					
					
				

				
				
					
					
				

				&lt;a href="https://monkemanx.github.io/scotland/museum/IMG_20250731_154253477.jpg"
					class="galleryImg"
					
					&gt;
					&lt;img
						width="600" height="338"

						
							src="https://monkemanx.github.io/scotland/museum/IMG_20250731_154253477_hu_68131489344afba7.jpg"
						

						
					&gt;
				&lt;/a&gt;
			&lt;/div&gt;
		
	
		

			
			

			
			
				
			

			
				
			

			
			
				
					
				
			


			
			

			&lt;div&gt;
				
				
					
					
				

				
				
					
					
				

				&lt;a href="https://monkemanx.github.io/scotland/museum/IMG_20250731_155420381.jpg"
					class="galleryImg"
					
					&gt;
					&lt;img
						width="600" height="338"

						
							src="https://monkemanx.github.io/scotland/museum/IMG_20250731_155420381_hu_fa73b7d7ee45224f.jpg"
						

						
					&gt;
				&lt;/a&gt;
			&lt;/div&gt;
		
	
&lt;/div&gt;
&lt;/div&gt;

&lt;script&gt;
	if (!("HSCGjQuery" in window)) {
		if (!window.jQuery) {
			throw new Error("jQuery is not loaded, hugo-shortcode-gallery wont work without it!");
		}
		window.HSCGjQuery = window.jQuery.noConflict(true);
	}

	
	
	
	
	
	;(function($) {

		$( document ).ready(() =&gt; {
			const gallery = $("#gallery-bcef433843c0ca1baf48237c499dadee-5");
			

			
			let swipeboxInstance = null;

			
			
			gallery.on('jg.complete', () =&gt; {
				

				swipeboxInstance = $('.galleryImg').swipebox(
					$.extend({},
						{ }
					)
				);
			});

			
			gallery.justifiedGallery($.extend(
				{
					rowHeight : "150",
					margins : "5",
					border : 0,
					randomize : false ,
					waitThumbnailsLoad : false,
					lastRow : "justify",
					captions : false,
					
					
				},
				{ }
			));

			
			
		});

	
	
	
	})(window.HSCGjQuery)
&lt;/script&gt;

&lt;p&gt;Afterwards my friend and I split up, he had other things to attend to, and I continued exploring the inner city. Most importantly, I walked along the Royal Mile, the historic street that leads up to the famous Edinburgh Castle. The Royal Mile has many little side alleys to wander into and explore. The street was packed with people, and for good reason: I visited in August, the month of the &lt;em&gt;Fringe Festival&lt;/em&gt;. Artists from all over the world come to perform, many in official halls and theaters, but also plenty right on the streets. Edinburgh was especially busy because of it.&lt;/p&gt;







	







































&lt;style&gt;
	

	
&lt;/style&gt;





&lt;div id="gallery-bcef433843c0ca1baf48237c499dadee-6-wrapper" class="gallery-wrapper"&gt;
&lt;div id="gallery-bcef433843c0ca1baf48237c499dadee-6" class="justified-gallery"&gt;
	
		

			
			

			
			
				
			

			
				
			

			
			
				
					
				
			


			
			

			&lt;div&gt;
				
				
					
					
				

				
				
					
					
				

				&lt;a href="https://monkemanx.github.io/scotland/royal-mile/IMG_20250731_163347495.jpg"
					class="galleryImg"
					
					&gt;
					&lt;img
						width="600" height="338"

						
							src="https://monkemanx.github.io/scotland/royal-mile/IMG_20250731_163347495_hu_a781dac193bbe924.jpg"
						

						
					&gt;
				&lt;/a&gt;
			&lt;/div&gt;
		
	
		

			
			

			
			
				
			

			
				
			

			
			
				
					
				
			


			
			

			&lt;div&gt;
				
				
					
					
				

				
				
					
					
				

				&lt;a href="https://monkemanx.github.io/scotland/royal-mile/IMG_20250731_163423813.jpg"
					class="galleryImg"
					
					&gt;
					&lt;img
						width="600" height="338"

						
							src="https://monkemanx.github.io/scotland/royal-mile/IMG_20250731_163423813_hu_c0e99bf868151f8a.jpg"
						

						
					&gt;
				&lt;/a&gt;
			&lt;/div&gt;
		
	
		

			
			

			
			
				
			

			
				
			

			
			
				
					
				
			


			
			

			&lt;div&gt;
				
				
					
					
				

				
				
					
					
				

				&lt;a href="https://monkemanx.github.io/scotland/royal-mile/IMG_20250731_163535817.jpg"
					class="galleryImg"
					
					&gt;
					&lt;img
						width="338" height="600"

						
							src="https://monkemanx.github.io/scotland/royal-mile/IMG_20250731_163535817_hu_411f7e920a0a811e.jpg"
						

						
					&gt;
				&lt;/a&gt;
			&lt;/div&gt;
		
	
		

			
			

			
			
				
			

			
				
			

			
			
				
					
				
			


			
			

			&lt;div&gt;
				
				
					
					
				

				
				
					
					
				

				&lt;a href="https://monkemanx.github.io/scotland/royal-mile/IMG_20250731_163726315.jpg"
					class="galleryImg"
					
					&gt;
					&lt;img
						width="600" height="338"

						
							src="https://monkemanx.github.io/scotland/royal-mile/IMG_20250731_163726315_hu_9640101b37b24657.jpg"
						

						
					&gt;
				&lt;/a&gt;
			&lt;/div&gt;
		
	
&lt;/div&gt;
&lt;/div&gt;

&lt;script&gt;
	if (!("HSCGjQuery" in window)) {
		if (!window.jQuery) {
			throw new Error("jQuery is not loaded, hugo-shortcode-gallery wont work without it!");
		}
		window.HSCGjQuery = window.jQuery.noConflict(true);
	}

	
	
	
	
	
	;(function($) {

		$( document ).ready(() =&gt; {
			const gallery = $("#gallery-bcef433843c0ca1baf48237c499dadee-6");
			

			
			let swipeboxInstance = null;

			
			
			gallery.on('jg.complete', () =&gt; {
				

				swipeboxInstance = $('.galleryImg').swipebox(
					$.extend({},
						{ }
					)
				);
			});

			
			gallery.justifiedGallery($.extend(
				{
					rowHeight : "200",
					margins : "5",
					border : 0,
					randomize : false ,
					waitThumbnailsLoad : false,
					lastRow : "justify",
					captions : false,
					
					
				},
				{ }
			));

			
			
		});

	
	
	
	})(window.HSCGjQuery)
&lt;/script&gt;

&lt;p&gt;I didn’t go into the castle itself, since I had heard it was expensive, had long wait times and wasn’t all that special. Besides, I wasn’t that curious, I’ve seen plenty of castles in Germany, like the Wartburg. Instead, I visited St. Giles’ Cathedral, which is a very beautiful place. Inside, there are a few exhibits about the religious conflicts between Protestantism and Catholicism. At the time, most of Scotland’s population was Protestant, but the monarch was Catholic. This created a general fear among the people that they might be forced back into Catholicism, leading to much conflict.&lt;/p&gt;












&lt;figure style="display: block; margin: 0 auto; width: 100%; "&gt;
 &lt;img
 src="https://monkemanx.github.io/attachments/scotland/IMG_20250731_165120553.jpg"
 loading="lazy"
 width=""
 height=""
 alt="Image"
 style="display: block; width: 100%; height: 100%; object-fit: contain; "
 &gt;
 
&lt;/figure&gt;

&lt;p&gt;For the last point on my itinerary, I made my way to Arthur’s Seat, a hill just outside of Edinburgh. Hiking up takes about 30 minutes, and another 30 to come back down. From the top you get a wonderful view of the city, though it’s also a very popular place, so you’ll never be alone. On my way up I even saw some kind of wild chicken, which was neat. I chilled up there for a while before making my way back home.&lt;/p&gt;












&lt;figure style="display: block; margin: 0 auto; width: 100%; "&gt;
 &lt;img
 src="https://monkemanx.github.io/attachments/scotland/IMG_20250731_175436462.jpg"
 loading="lazy"
 width=""
 height=""
 alt="Image"
 style="display: block; width: 100%; height: 100%; object-fit: contain; "
 &gt;
 
&lt;/figure&gt;

&lt;h2 id="day-3-edinburgh"&gt;Day 3: Edinburgh&lt;/h2&gt;
&lt;p&gt;In the morning I again headed into the city to see the things I hadn’t managed the previous day. My friend wasn’t feeling well, so I went by myself.&lt;/p&gt;
&lt;p&gt;My first stop was the Scottish Parliament, which is open to the public. Before going in you have to go through a security check. Architecturally it’s a very nice building. In the foyer there are exhibits about the construction of the parliament, including some models of it, as well as exhibits relating to democracy and voting, for example, when women were first allowed to vote, and when Scotland got its own parliament. You can also go into the parliament chamber itself and watch the senators arguing with each other. Sadly, when I was there nothing was happening, and the chamber was empty. Still, it was cool to see.&lt;/p&gt;
&lt;p&gt;Next on my list was the Palace of Holyroodhouse, the official royal palace in Scotland, still in use today. I thought it would be a good alternative to Edinburgh Castle, maybe less crowded. As you walk through the palace room by room you get an audio guide. Honestly, much of the commentary I found unnecessary, but there were two stories that really stood out.&lt;/p&gt;












&lt;figure style="display: block; margin: 0 auto; width: 100%; "&gt;
 &lt;img
 src="https://monkemanx.github.io/attachments/scotland/IMG_20250801_114011354.jpg"
 loading="lazy"
 width=""
 height=""
 alt="Image"
 style="display: block; width: 100%; height: 100%; object-fit: contain; "
 &gt;
 
&lt;/figure&gt;

&lt;p&gt;The first was about the room full of paintings of Scottish kings. These paintings were commissioned by one of the kings to bolster his own legitimacy. They are not historically accurate but more like imagined versions of what the kings might have looked like. Strikingly, all of them were painted with a hawk nose, added deliberately by the painter so that the past kings resembled the current king, making the hawk nose itself a symbol of “kingliness.” At one point soldiers stormed the palace and fought inside; to this day you can still see sword cuts on some of the paintings.&lt;/p&gt;
&lt;p&gt;The second story was about a queen of Scotland who was murdered in the palace. Legend says that if you look closely enough in one corner of a room you can still see the bloodstains.&lt;/p&gt;
&lt;p&gt;The palace also has a garden you can walk through (honestly, I wasn’t impressed, I’ve seen better gardens) and the ruins of a church that was once Catholic. With the decline of Catholicism in Scotland, the church fell into disuse and ruin. Overall, I would only recommend the palace if one is particularly interested in the monarchy.&lt;/p&gt;












&lt;figure style="display: block; margin: 0 auto; width: 100%; "&gt;
 &lt;img
 src="https://monkemanx.github.io/attachments/scotland/IMG_20250801_124325703.jpg"
 loading="lazy"
 width=""
 height=""
 alt="Image"
 style="display: block; width: 100%; height: 100%; object-fit: contain; "
 &gt;
 
&lt;/figure&gt;

&lt;p&gt;As a philosophy buff, I couldn’t pass up the chance to visit the grave of David Hume. He is most famous for standing on the side of empiricism in the great philosophical fight between empiricism and rationalism. (Here’s &lt;a href="https://monkemanx.github.io/paper-summary/enquiry_human_understanding/"&gt;a paper from him&lt;/a&gt; if you want to read.) Before coming to Edinburgh I didn’t even know he was buried there, but while searching for sightseeing spots I came across Calton Cemetery, which is in fact Hume’s resting place.&lt;/p&gt;












&lt;figure style="display: block; margin: 0 auto; width: 100%; "&gt;
 &lt;img
 src="https://monkemanx.github.io/attachments/scotland/IMG_20250801_134951693.jpg"
 loading="lazy"
 width=""
 height=""
 alt="Image"
 style="display: block; width: 100%; height: 100%; object-fit: contain; "
 &gt;
 
&lt;/figure&gt;

&lt;p&gt;Finding the grave took me much longer than expected, because the Calton burial grounds are split between “Old” and “New” cemeteries. If you just look up “Calton graveyard” on Google Maps you’ll get sent to the old one. It has a very cool atmosphere (I can imagine it being quite spooky at night), but Hume isn’t buried there. I recommend searching directly for “David Hume grave” instead, as this will guide you to the right place. I must have wandered around for two or three hours before finding it.&lt;/p&gt;












&lt;figure style="display: block; margin: 0 auto; width: 100%; "&gt;
 &lt;img
 src="https://monkemanx.github.io/attachments/scotland/IMG_20250801_150327427.jpg"
 loading="lazy"
 width=""
 height=""
 alt="Image"
 style="display: block; width: 100%; height: 100%; object-fit: contain; "
 &gt;
 
&lt;/figure&gt;

&lt;p&gt;Next to Calton Cemetery is also Calton Hill, which in my opinion offers a better view of Edinburgh than Arthur’s Seat. From the top, you can walk down the “David Hume Walk,” named after him because he used to stroll there regularly and advocated keeping the hill in its natural form so the people of Edinburgh could enjoy it. Ironically, walking down that path was one of the reasons it took me so long to find his grave.&lt;/p&gt;
&lt;p&gt;Down there, I also came across a very unique bookshop that I can highly recommend exploring.&lt;/p&gt;
&lt;p&gt;Before moving on to the final stop on my itinerary, I did a quick supermarket run to get some food. All I can say is: German bread is so much better. It’s insane. The bread I found was some kind of fluffy, sweet milk bread—more like cake than bread.&lt;/p&gt;
&lt;p&gt;For the final destination of the day I went to the Royal Botanic Garden. It has all kinds of plants, trees, and flowers, not only native to Scotland but from all around the world. For example, there’s an area for Chinese plants. One of the information signs explained that the garden regularly sends people abroad to find unique plants to bring back to Edinburgh.&lt;/p&gt;







	







































&lt;style&gt;
	

	
&lt;/style&gt;





&lt;div id="gallery-bcef433843c0ca1baf48237c499dadee-13-wrapper" class="gallery-wrapper"&gt;
&lt;div id="gallery-bcef433843c0ca1baf48237c499dadee-13" class="justified-gallery"&gt;
	
		

			
			

			
			
				
			

			
				
			

			
			
				
					
				
			


			
			

			&lt;div&gt;
				
				
					
					
				

				
				
					
					
				

				&lt;a href="https://monkemanx.github.io/scotland/botanic-garden/IMG_20250801_163243682.jpg"
					class="galleryImg"
					
					&gt;
					&lt;img
						width="600" height="338"

						
							src="https://monkemanx.github.io/scotland/botanic-garden/IMG_20250801_163243682_hu_f0df2934db59e975.jpg"
						

						
					&gt;
				&lt;/a&gt;
			&lt;/div&gt;
		
	
		

			
			

			
			
				
			

			
				
			

			
			
				
					
				
			


			
			

			&lt;div&gt;
				
				
					
					
				

				
				
					
					
				

				&lt;a href="https://monkemanx.github.io/scotland/botanic-garden/IMG_20250801_163302599.jpg"
					class="galleryImg"
					
					&gt;
					&lt;img
						width="600" height="338"

						
							src="https://monkemanx.github.io/scotland/botanic-garden/IMG_20250801_163302599_hu_f08cc131942715bb.jpg"
						

						
					&gt;
				&lt;/a&gt;
			&lt;/div&gt;
		
	
		

			
			

			
			
				
			

			
				
			

			
			
				
					
				
			


			
			

			&lt;div&gt;
				
				
					
					
				

				
				
					
					
				

				&lt;a href="https://monkemanx.github.io/scotland/botanic-garden/IMG_20250801_163432838.jpg"
					class="galleryImg"
					
					&gt;
					&lt;img
						width="600" height="338"

						
							src="https://monkemanx.github.io/scotland/botanic-garden/IMG_20250801_163432838_hu_141f9473f277899e.jpg"
						

						
					&gt;
				&lt;/a&gt;
			&lt;/div&gt;
		
	
		

			
			

			
			
				
			

			
				
			

			
			
				
					
				
			


			
			

			&lt;div&gt;
				
				
					
					
				

				
				
					
					
				

				&lt;a href="https://monkemanx.github.io/scotland/botanic-garden/IMG_20250801_163745532.jpg"
					class="galleryImg"
					
					&gt;
					&lt;img
						width="600" height="338"

						
							src="https://monkemanx.github.io/scotland/botanic-garden/IMG_20250801_163745532_hu_4b354eede1ec2d37.jpg"
						

						
					&gt;
				&lt;/a&gt;
			&lt;/div&gt;
		
	
		

			
			

			
			
				
			

			
				
			

			
			
				
					
				
			


			
			

			&lt;div&gt;
				
				
					
					
				

				
				
					
					
				

				&lt;a href="https://monkemanx.github.io/scotland/botanic-garden/IMG_20250801_164325850.jpg"
					class="galleryImg"
					
					&gt;
					&lt;img
						width="600" height="338"

						
							src="https://monkemanx.github.io/scotland/botanic-garden/IMG_20250801_164325850_hu_df7698d4c2bc39d6.jpg"
						

						
					&gt;
				&lt;/a&gt;
			&lt;/div&gt;
		
	
		

			
			

			
			
				
			

			
				
			

			
			
				
					
				
			


			
			

			&lt;div&gt;
				
				
					
					
				

				
				
					
					
				

				&lt;a href="https://monkemanx.github.io/scotland/botanic-garden/IMG_20250801_165137273.jpg"
					class="galleryImg"
					
					&gt;
					&lt;img
						width="600" height="338"

						
							src="https://monkemanx.github.io/scotland/botanic-garden/IMG_20250801_165137273_hu_6f46406bb4e59d0d.jpg"
						

						
					&gt;
				&lt;/a&gt;
			&lt;/div&gt;
		
	
&lt;/div&gt;
&lt;/div&gt;

&lt;script&gt;
	if (!("HSCGjQuery" in window)) {
		if (!window.jQuery) {
			throw new Error("jQuery is not loaded, hugo-shortcode-gallery wont work without it!");
		}
		window.HSCGjQuery = window.jQuery.noConflict(true);
	}

	
	
	
	
	
	;(function($) {

		$( document ).ready(() =&gt; {
			const gallery = $("#gallery-bcef433843c0ca1baf48237c499dadee-13");
			

			
			let swipeboxInstance = null;

			
			
			gallery.on('jg.complete', () =&gt; {
				

				swipeboxInstance = $('.galleryImg').swipebox(
					$.extend({},
						{ }
					)
				);
			});

			
			gallery.justifiedGallery($.extend(
				{
					rowHeight : "150",
					margins : "5",
					border : 0,
					randomize : false ,
					waitThumbnailsLoad : false,
					lastRow : "justify",
					captions : false,
					
					
				},
				{ }
			));

			
			
		});

	
	
	
	})(window.HSCGjQuery)
&lt;/script&gt;

&lt;p&gt;Although the variety is impressive, I found the garden lacked a cohesive vision. Because of that, I didn’t find it particularly beautiful, just interesting. In other words, I’ve seen better botanical gardens. Maybe it’s just that I was missing the sheer abundance of flowers, like at the &lt;em&gt;Bundesgartenschau&lt;/em&gt; in Germany.&lt;/p&gt;
&lt;h2 id="day-4-break-day"&gt;Day 4: Break Day&lt;/h2&gt;
&lt;p&gt;After walking across the city the previous two days, my body ached. So I decided that the fourth day would be a rest day. I just chilled with my friend and played some video games, namely &lt;em&gt;Far Cry&lt;/em&gt; and &lt;em&gt;Dying Light&lt;/em&gt;, both of which I had never played before. I must say, I was astonished at how good &lt;em&gt;Dying Light&lt;/em&gt; is, considering it’s nearly 15 years old.&lt;/p&gt;
&lt;p&gt;In the evening, my friend’s mom invited us to join her and her friends at the Frankenstein Pub, famous for its theme and for the Frankenstein figure that walks down the stairs into the pub at a certain time each day. Downstairs they had karaoke, and we joined in. Most people were doing the usual karaoke classics, but my friend decided to mix it up with a heavy metal song, lol.&lt;/p&gt;
&lt;p&gt;I also got complimented on my hair twice that night. At the time I had been growing it out for a few months, so I basically had a very scruffy afro.&lt;/p&gt;












&lt;figure style="display: block; margin: 0 auto; width: 100%; "&gt;
 &lt;img
 src="https://monkemanx.github.io/attachments/scotland/IMG_20250802_233937968.jpg"
 loading="lazy"
 width=""
 height=""
 alt="Image"
 style="display: block; width: 100%; height: 100%; object-fit: contain; "
 &gt;
 
&lt;/figure&gt;

&lt;h2 id="day-5-drugs"&gt;Day 5: Drugs&lt;/h2&gt;
&lt;p&gt;One of the main reasons for visiting my friend in the first place was that I wanted to try psychedelics but needed a tripsitter, and he offered to be one. So on this day I decided to take some shrooms, more precisely &lt;em&gt;Penis Envy&lt;/em&gt; (funny name).&lt;/p&gt;
&lt;p&gt;My motivation came from philosophical curiosity. If you’ve followed my more philosophical writings, you’ve probably noticed that I’ve come to value authentic subjective experience more and more, as opposed to objectivism. This has to do with the Heideggerian notion of &lt;em&gt;Dasein&lt;/em&gt;, which I find to be grounded in subjectivity by its very nature, and also with Buddhist and Paul Tillich, inspired notions of subjectivity as the ground of being.&lt;/p&gt;
&lt;p&gt;In short, I wanted to experience what Sam Harris calls &lt;em&gt;non-duality&lt;/em&gt;, where the watcher and the watched dissolve into one, subject and object merge, and there is no longer the sense of a person inside the body looking out at a world external to oneself. Perhaps it’s best expressed through the idiom Harris sometimes uses: &lt;em&gt;imagine yourself without a head&lt;/em&gt;.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;As you gaze at the world around you, take a moment to look for your
head. This may seem like a bizarre instruction. You might think, “Of
course, I can’t see my head. What’s so interesting about that?” Not so
fast. Simply look at the world, or at other people, and attempt to turn
your attention in the direction of where you know your head to be.
For instance, if you are having a conversation with another person,
see if you can let your attention travel in the direction of the other
person’s gaze. He is looking at your face—and you cannot see your
face. The only face present, from your point of view, belongs to the
other person. But looking for yourself in this way can precipitate a
sudden change in perspective, of the sort Harding describes.
Some people find it easier to trigger this shift in a slightly different
way: As you are looking out at the world, simply imagine that you
have no head.
Whichever method you choose, don’t struggle with this exercise.
It is not a matter of going deep within or of producing some
extraordinary experience. The view of headlessness is right on the
surface of consciousness and can be glimpsed the moment you
attempt to turn about. Pay attention to how the world appears in the
first instant, not after a protracted effort. Either you will see it
immediately or you won’t see it at all. And the resulting glimpse of
open awareness will last only a moment or two before thoughts
intervene. Simply repeat this glimpse, again and again, in as relaxed a
way as possible, as you go about your day.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;In the end, not much happened. I got an upset stomach, and after redosing twice it was already too late in the day to risk a higher dose—especially since I tend to get anxious in the dark. Still, my friend and I ended up with a really good psychedelic soundtrack out of the experience.&lt;/p&gt;




 
 


&lt;div class="video-container"&gt;
 &lt;iframe
 src="https://www.youtube.com/embed/oyJSV9nnt10"
 frameborder="0"
 allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
 allowfullscreen
 referrerpolicy="strict-origin-when-cross-origin"&gt;
 &lt;/iframe&gt;
&lt;/div&gt;

&lt;style&gt;
.video-container {
 width: 100%;
 margin: 0 auto;
}
.video-container iframe {
 width: 100%;
 aspect-ratio: 16 / 9;
 display: block;
}
&lt;/style&gt;

&lt;p&gt;Personally though, I’m more of an Ichiko Aoba fan, especially her live music and her work on &lt;em&gt;The First Rock&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;



 
 


&lt;div class="video-container"&gt;
 &lt;iframe
 src="https://www.youtube.com/embed/SB7PKTQR6TU"
 frameborder="0"
 allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
 allowfullscreen
 referrerpolicy="strict-origin-when-cross-origin"&gt;
 &lt;/iframe&gt;
&lt;/div&gt;

&lt;style&gt;
.video-container {
 width: 100%;
 margin: 0 auto;
}
.video-container iframe {
 width: 100%;
 aspect-ratio: 16 / 9;
 display: block;
}
&lt;/style&gt;





 
 


&lt;div class="video-container"&gt;
 &lt;iframe
 src="https://www.youtube.com/embed/OZXH9iXqFbI"
 frameborder="0"
 allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
 allowfullscreen
 referrerpolicy="strict-origin-when-cross-origin"&gt;
 &lt;/iframe&gt;
&lt;/div&gt;

&lt;style&gt;
.video-container {
 width: 100%;
 margin: 0 auto;
}
.video-container iframe {
 width: 100%;
 aspect-ratio: 16 / 9;
 display: block;
}
&lt;/style&gt;
&lt;/p&gt;
&lt;p&gt;I do still want to try psychedelics again—next time probably something more “pure,” like LSD. But that is a story for another time.&lt;/p&gt;
&lt;h2 id="day-6-7-sick"&gt;Day 6-7: Sick&lt;/h2&gt;
&lt;p&gt;Not much to tell this day. We both got sick, probably from the Frankenstein pub we had visited two days earlier. It felt like some kind of cold or flu. We spent most of the time just chilling in our beds.&lt;/p&gt;
&lt;p&gt;I watched the &lt;a href="https://en.wikipedia.org/wiki/Lord_of_Mysteries"&gt;LOTM&lt;/a&gt; anime, which is really beautiful, and read the manhwa &lt;em&gt;Monster Child&lt;/em&gt;. I love the story, also small ending spoiler, but I just want to merge into a little sphere and live happily forever inside it. &lt;em&gt;Henosis.&lt;/em&gt;&lt;/p&gt;
&lt;h2 id="day-8-pittlochry"&gt;Day 8: Pittlochry&lt;/h2&gt;
&lt;p&gt;Even though I was still sick, I hadn’t seen much of Scotland beyond Edinburgh, so I wanted to get out one more time and explore the Highlands. At first I considered going to the Isle of Skye, but decided it was too far away. Instead, I chose Pitlochry, a small town in the middle of the Highlands, which would allow me to explore the region a bit.&lt;/p&gt;
&lt;p&gt;Early in the morning I took the bus, as usual, into the center of Edinburgh. My plan was to catch an intercity bus to Pitlochry. That didn’t work out, twice I tried and both times even though I had booked tickets (which cost about 50 pounds each), the bus didn’t stop for me. Lesson learned: don’t take the bus, take the train! That worked perfectly.&lt;/p&gt;












&lt;figure style="display: block; margin: 0 auto; width: 100%; "&gt;
 &lt;img
 src="https://monkemanx.github.io/attachments/scotland/IMG_20250806_125619882.jpg"
 loading="lazy"
 width=""
 height=""
 alt="Image"
 style="display: block; width: 100%; height: 100%; object-fit: contain; "
 &gt;
 
&lt;/figure&gt;

&lt;p&gt;The first thing I did upon arriving was grab some lunch. Since I had never had fish and chips before, I decided to try it, it’s iconic in the United Kingdom. Honestly, I found it highly overrated: crispy, yes, but it tastes like all fried food and is rather bland.&lt;/p&gt;
&lt;p&gt;I then explored Pitlochry itself. The town has a very nice church, several distilleries, a huge dam with fish ladders, a theatre, and is generally very beautiful. I also checked out the neighboring forest, which has a short walk that includes a waterfall. Kinda neat, though I personally prefer my German forests, but it’s a short walk I would still recommend.&lt;/p&gt;
&lt;p&gt;For my place to stay, I booked a backpacker hotel that cost about 30 pounds a night. I was supposed to share a six-bed room with another guest, but they didn’t show up, so I had the whole room to myself. A funny coincidence: the Wi-Fi password was &lt;em&gt;“I love magic mushrooms.”&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;For dinner, I wasn’t very hungry, so I had a small plate full of grapes.&lt;/p&gt;







	







































&lt;style&gt;
	

	
&lt;/style&gt;





&lt;div id="gallery-bcef433843c0ca1baf48237c499dadee-19-wrapper" class="gallery-wrapper"&gt;
&lt;div id="gallery-bcef433843c0ca1baf48237c499dadee-19" class="justified-gallery"&gt;
	
		

			
			

			
			
				
			

			
				
			

			
			
				
					
				
			


			
			

			&lt;div&gt;
				
				
					
					
				

				
				
					
					
				

				&lt;a href="https://monkemanx.github.io/scotland/pitlochry/IMG_20250806_134548944.jpg"
					class="galleryImg"
					
					&gt;
					&lt;img
						width="600" height="338"

						
							src="https://monkemanx.github.io/scotland/pitlochry/IMG_20250806_134548944_hu_87faa38fa90ff4f0.jpg"
						

						
					&gt;
				&lt;/a&gt;
			&lt;/div&gt;
		
	
		

			
			

			
			
				
			

			
				
			

			
			
				
					
				
			


			
			

			&lt;div&gt;
				
				
					
					
				

				
				
					
					
				

				&lt;a href="https://monkemanx.github.io/scotland/pitlochry/IMG_20250806_135132121.jpg"
					class="galleryImg"
					
					&gt;
					&lt;img
						width="600" height="338"

						
							src="https://monkemanx.github.io/scotland/pitlochry/IMG_20250806_135132121_hu_df84f3f3dc671f37.jpg"
						

						
					&gt;
				&lt;/a&gt;
			&lt;/div&gt;
		
	
		

			
			

			
			
				
			

			
				
			

			
			
				
					
				
			


			
			

			&lt;div&gt;
				
				
					
					
				

				
				
					
					
				

				&lt;a href="https://monkemanx.github.io/scotland/pitlochry/IMG_20250806_140308916.jpg"
					class="galleryImg"
					
					&gt;
					&lt;img
						width="600" height="338"

						
							src="https://monkemanx.github.io/scotland/pitlochry/IMG_20250806_140308916_hu_e5d204dcc63d0fbc.jpg"
						

						
					&gt;
				&lt;/a&gt;
			&lt;/div&gt;
		
	
		

			
			

			
			
				
			

			
				
			

			
			
				
					
				
			


			
			

			&lt;div&gt;
				
				
					
					
				

				
				
					
					
				

				&lt;a href="https://monkemanx.github.io/scotland/pitlochry/IMG_20250806_140912300.jpg"
					class="galleryImg"
					
					&gt;
					&lt;img
						width="600" height="338"

						
							src="https://monkemanx.github.io/scotland/pitlochry/IMG_20250806_140912300_hu_cdcda5eb30350ce4.jpg"
						

						
					&gt;
				&lt;/a&gt;
			&lt;/div&gt;
		
	
		

			
			

			
			
				
			

			
				
			

			
			
				
					
				
			


			
			

			&lt;div&gt;
				
				
					
					
				

				
				
					
					
				

				&lt;a href="https://monkemanx.github.io/scotland/pitlochry/IMG_20250806_141247443.jpg"
					class="galleryImg"
					
					&gt;
					&lt;img
						width="600" height="338"

						
							src="https://monkemanx.github.io/scotland/pitlochry/IMG_20250806_141247443_hu_335bd985408d8e37.jpg"
						

						
					&gt;
				&lt;/a&gt;
			&lt;/div&gt;
		
	
		

			
			

			
			
				
			

			
				
			

			
			
				
					
				
			


			
			

			&lt;div&gt;
				
				
					
					
				

				
				
					
					
				

				&lt;a href="https://monkemanx.github.io/scotland/pitlochry/IMG_20250806_173146469.jpg"
					class="galleryImg"
					
					&gt;
					&lt;img
						width="600" height="338"

						
							src="https://monkemanx.github.io/scotland/pitlochry/IMG_20250806_173146469_hu_8b1b74423ea19c1d.jpg"
						

						
					&gt;
				&lt;/a&gt;
			&lt;/div&gt;
		
	
		

			
			

			
			
				
			

			
				
			

			
			
				
					
				
			


			
			

			&lt;div&gt;
				
				
					
					
				

				
				
					
					
				

				&lt;a href="https://monkemanx.github.io/scotland/pitlochry/IMG_20250806_174141914.jpg"
					class="galleryImg"
					
					&gt;
					&lt;img
						width="600" height="338"

						
							src="https://monkemanx.github.io/scotland/pitlochry/IMG_20250806_174141914_hu_4bfe9b8379f96dea.jpg"
						

						
					&gt;
				&lt;/a&gt;
			&lt;/div&gt;
		
	
		

			
			

			
			
				
			

			
				
			

			
			
				
					
				
			


			
			

			&lt;div&gt;
				
				
					
					
				

				
				
					
					
				

				&lt;a href="https://monkemanx.github.io/scotland/pitlochry/IMG_20250806_195524677.jpg"
					class="galleryImg"
					
					&gt;
					&lt;img
						width="600" height="338"

						
							src="https://monkemanx.github.io/scotland/pitlochry/IMG_20250806_195524677_hu_7cd7f7366af71006.jpg"
						

						
					&gt;
				&lt;/a&gt;
			&lt;/div&gt;
		
	
&lt;/div&gt;
&lt;/div&gt;

&lt;script&gt;
	if (!("HSCGjQuery" in window)) {
		if (!window.jQuery) {
			throw new Error("jQuery is not loaded, hugo-shortcode-gallery wont work without it!");
		}
		window.HSCGjQuery = window.jQuery.noConflict(true);
	}

	
	
	
	
	
	;(function($) {

		$( document ).ready(() =&gt; {
			const gallery = $("#gallery-bcef433843c0ca1baf48237c499dadee-19");
			

			
			let swipeboxInstance = null;

			
			
			gallery.on('jg.complete', () =&gt; {
				

				swipeboxInstance = $('.galleryImg').swipebox(
					$.extend({},
						{ }
					)
				);
			});

			
			gallery.justifiedGallery($.extend(
				{
					rowHeight : "150",
					margins : "5",
					border : 0,
					randomize : false ,
					waitThumbnailsLoad : false,
					lastRow : "justify",
					captions : false,
					
					
				},
				{ }
			));

			
			
		});

	
	
	
	})(window.HSCGjQuery)
&lt;/script&gt;

&lt;h2 id="day-9-hiking-ben-vrackie"&gt;Day 9: Hiking Ben Vrackie&lt;/h2&gt;
&lt;p&gt;The plan for the day was to hike Ben Vrackie. The whole trip up and down took about six hours. Part of the reason it took so long was that I didn’t have a car to drive to the trailhead, so I had to walk to it, which added at least an extra hour. On top of that, I was still sick from the previous days.&lt;/p&gt;
&lt;p&gt;That said, the landscape was absolutely beautiful. Finally, I felt like I was seeing something I couldn’t find in Germany. The mountain itself is bathed in a purple hue, and at the foot there’s a lovely little lake. I highly recommend it. Compared to other mountain climbs, it’s not particularly hard. I’ll let the images speak for the rest.&lt;/p&gt;
&lt;p&gt;After coming back down, I had lunch and bought some souvenirs for my parent: handmade soap and a wool scarf from Scotland. Then it was time to take the train back to Edinburgh.&lt;/p&gt;







	







































&lt;style&gt;
	

	
&lt;/style&gt;





&lt;div id="gallery-bcef433843c0ca1baf48237c499dadee-20-wrapper" class="gallery-wrapper"&gt;
&lt;div id="gallery-bcef433843c0ca1baf48237c499dadee-20" class="justified-gallery"&gt;
	
		

			
			

			
			
				
			

			
				
			

			
			
				
					
				
			


			
			

			&lt;div&gt;
				
				
					
					
				

				
				
					
					
				

				&lt;a href="https://monkemanx.github.io/scotland/ben-vrackie/IMG_20250807_090554035.jpg"
					class="galleryImg"
					
					&gt;
					&lt;img
						width="600" height="338"

						
							src="https://monkemanx.github.io/scotland/ben-vrackie/IMG_20250807_090554035_hu_ab30e5eb719d716e.jpg"
						

						
					&gt;
				&lt;/a&gt;
			&lt;/div&gt;
		
	
		

			
			

			
			
				
			

			
				
			

			
			
				
					
				
			


			
			

			&lt;div&gt;
				
				
					
					
				

				
				
					
					
				

				&lt;a href="https://monkemanx.github.io/scotland/ben-vrackie/IMG_20250807_093626991.jpg"
					class="galleryImg"
					
					&gt;
					&lt;img
						width="600" height="338"

						
							src="https://monkemanx.github.io/scotland/ben-vrackie/IMG_20250807_093626991_hu_b547b4b69a72d6a2.jpg"
						

						
					&gt;
				&lt;/a&gt;
			&lt;/div&gt;
		
	
		

			
			

			
			
				
			

			
				
			

			
			
				
					
				
			


			
			

			&lt;div&gt;
				
				
					
					
				

				
				
					
					
				

				&lt;a href="https://monkemanx.github.io/scotland/ben-vrackie/IMG_20250807_102224572.jpg"
					class="galleryImg"
					
					&gt;
					&lt;img
						width="600" height="338"

						
							src="https://monkemanx.github.io/scotland/ben-vrackie/IMG_20250807_102224572_hu_3856a20669cf8c2c.jpg"
						

						
					&gt;
				&lt;/a&gt;
			&lt;/div&gt;
		
	
		

			
			

			
			
				
			

			
				
			

			
			
				
					
				
			


			
			

			&lt;div&gt;
				
				
					
					
				

				
				
					
					
				

				&lt;a href="https://monkemanx.github.io/scotland/ben-vrackie/IMG_20250807_102305942.jpg"
					class="galleryImg"
					
					&gt;
					&lt;img
						width="600" height="338"

						
							src="https://monkemanx.github.io/scotland/ben-vrackie/IMG_20250807_102305942_hu_cf9d15eb7f900e65.jpg"
						

						
					&gt;
				&lt;/a&gt;
			&lt;/div&gt;
		
	
		

			
			

			
			
				
			

			
				
			

			
			
				
					
				
			


			
			

			&lt;div&gt;
				
				
					
					
				

				
				
					
					
				

				&lt;a href="https://monkemanx.github.io/scotland/ben-vrackie/IMG_20250807_104935370.jpg"
					class="galleryImg"
					
					&gt;
					&lt;img
						width="600" height="338"

						
							src="https://monkemanx.github.io/scotland/ben-vrackie/IMG_20250807_104935370_hu_fb3f4cc0ecf8d09c.jpg"
						

						
					&gt;
				&lt;/a&gt;
			&lt;/div&gt;
		
	
		

			
			

			
			
				
			

			
				
			

			
			
				
					
				
			


			
			

			&lt;div&gt;
				
				
					
					
				

				
				
					
					
				

				&lt;a href="https://monkemanx.github.io/scotland/ben-vrackie/IMG_20250807_110142902.jpg"
					class="galleryImg"
					
					&gt;
					&lt;img
						width="600" height="338"

						
							src="https://monkemanx.github.io/scotland/ben-vrackie/IMG_20250807_110142902_hu_d9648705fbbb6596.jpg"
						

						
					&gt;
				&lt;/a&gt;
			&lt;/div&gt;
		
	
		

			
			

			
			
				
			

			
				
			

			
			
				
					
				
			


			
			

			&lt;div&gt;
				
				
					
					
				

				
				
					
					
				

				&lt;a href="https://monkemanx.github.io/scotland/ben-vrackie/IMG_20250807_110948212.jpg"
					class="galleryImg"
					
					&gt;
					&lt;img
						width="600" height="338"

						
							src="https://monkemanx.github.io/scotland/ben-vrackie/IMG_20250807_110948212_hu_98c0433fb5c76b4c.jpg"
						

						
					&gt;
				&lt;/a&gt;
			&lt;/div&gt;
		
	
		

			
			

			
			
				
			

			
				
			

			
			
				
					
				
			


			
			

			&lt;div&gt;
				
				
					
					
				

				
				
					
					
				

				&lt;a href="https://monkemanx.github.io/scotland/ben-vrackie/IMG_20250807_114800941.jpg"
					class="galleryImg"
					
					&gt;
					&lt;img
						width="600" height="338"

						
							src="https://monkemanx.github.io/scotland/ben-vrackie/IMG_20250807_114800941_hu_d3f7381ae72d38df.jpg"
						

						
					&gt;
				&lt;/a&gt;
			&lt;/div&gt;
		
	
		

			
			

			
			
				
			

			
				
			

			
			
				
					
				
			


			
			

			&lt;div&gt;
				
				
					
					
				

				
				
					
					
				

				&lt;a href="https://monkemanx.github.io/scotland/ben-vrackie/IMG_20250807_114854999.jpg"
					class="galleryImg"
					
					&gt;
					&lt;img
						width="600" height="338"

						
							src="https://monkemanx.github.io/scotland/ben-vrackie/IMG_20250807_114854999_hu_8b52c1a6d3abebc2.jpg"
						

						
					&gt;
				&lt;/a&gt;
			&lt;/div&gt;
		
	
		

			
			

			
			
				
			

			
				
			

			
			
				
					
				
			


			
			

			&lt;div&gt;
				
				
					
					
				

				
				
					
					
				

				&lt;a href="https://monkemanx.github.io/scotland/ben-vrackie/IMG_20250807_115651120.jpg"
					class="galleryImg"
					
					&gt;
					&lt;img
						width="600" height="338"

						
							src="https://monkemanx.github.io/scotland/ben-vrackie/IMG_20250807_115651120_hu_766f6060a8aafc13.jpg"
						

						
					&gt;
				&lt;/a&gt;
			&lt;/div&gt;
		
	
		

			
			

			
			
				
			

			
				
			

			
			
				
					
				
			


			
			

			&lt;div&gt;
				
				
					
					
				

				
				
					
					
				

				&lt;a href="https://monkemanx.github.io/scotland/ben-vrackie/IMG_20250807_121707594.jpg"
					class="galleryImg"
					
					&gt;
					&lt;img
						width="600" height="338"

						
							src="https://monkemanx.github.io/scotland/ben-vrackie/IMG_20250807_121707594_hu_c02c4d8d35abb64e.jpg"
						

						
					&gt;
				&lt;/a&gt;
			&lt;/div&gt;
		
	
&lt;/div&gt;
&lt;/div&gt;

&lt;script&gt;
	if (!("HSCGjQuery" in window)) {
		if (!window.jQuery) {
			throw new Error("jQuery is not loaded, hugo-shortcode-gallery wont work without it!");
		}
		window.HSCGjQuery = window.jQuery.noConflict(true);
	}

	
	
	
	
	
	;(function($) {

		$( document ).ready(() =&gt; {
			const gallery = $("#gallery-bcef433843c0ca1baf48237c499dadee-20");
			

			
			let swipeboxInstance = null;

			
			
			gallery.on('jg.complete', () =&gt; {
				

				swipeboxInstance = $('.galleryImg').swipebox(
					$.extend({},
						{ }
					)
				);
			});

			
			gallery.justifiedGallery($.extend(
				{
					rowHeight : "150",
					margins : "5",
					border : 0,
					randomize : false ,
					waitThumbnailsLoad : false,
					lastRow : "justify",
					captions : false,
					
					
				},
				{ }
			));

			
			
		});

	
	
	
	})(window.HSCGjQuery)
&lt;/script&gt;

&lt;h2 id="day-10-flight"&gt;Day 10: Flight&lt;/h2&gt;
&lt;p&gt;Around 10 in the morning, my friend and I took a bus to the airport. It took over an hour and had around fifty stops. Before this trip, I had never been on a bus that stopped every two minutes and had so many stops.&lt;/p&gt;
&lt;p&gt;We said our goodbyes, and of course, the flight got delayed. Let me tell you: the airport in Stuttgart is much better than Edinburgh’s. It’s bigger, cleaner, and when walking to the terminal you’re not forced through dozens of shops blasting sales music. The terminal itself isn’t overcrowded, so you don’t have to squeeze shoulder to shoulder with other travelers.&lt;/p&gt;
&lt;p&gt;Just like my previous flight, it was relaxing and I finally got to finish the book &lt;em&gt;Introduction to Heidegger&lt;/em&gt;. I landed in Stuttgart successfully, and after a few more hours I was home, collapsing exhausted into my bed. Darkness soon overcame me, and I slept deeply.&lt;/p&gt;</description></item><item><title>How to live?</title><link>https://monkemanx.github.io/articles/how_to_live/</link><pubDate>Sun, 13 Jul 2025 10:00:00 +0000</pubDate><author>monkeman@cock.li (MonkeMan)</author><guid>https://monkemanx.github.io/articles/how_to_live/</guid><description>&lt;style&gt;
 .info {
 background-color: #e6f7ff; 
 padding: 15px; 
 border-radius: 5px; 
 margin-bottom: 15px; 
 }

 .info-title {
 font-size: 20px; 
 margin-bottom: 10px; 
 color: #000080; 
 font-weight: bold; 
 }
&lt;/style&gt;

&lt;div class="info"&gt;
 &lt;div class="info-title"&gt;Info&lt;/div&gt;
 &lt;p&gt;&lt;p&gt;This is an extended version of something I previously wrote. If you&amp;rsquo;re more interested in the core idea or essence, read &lt;a href="https://monkemanx.github.io/tangled_thoughts/philosophical_rambling_what_to_value/"&gt;Philosophical Ramblings #08: What to Value?&lt;/a&gt; instead.&lt;/p&gt;
&lt;p&gt;For this article, I used voice dictation and corrected the resulting errors using ChatGPT, so the style may feel a bit different from my other writings.&lt;/p&gt;
&lt;/p&gt;
&lt;/div&gt;

&lt;h2 id="1-we-should-only-value-intentions"&gt;1. We should only Value Intentions&lt;/h2&gt;
&lt;p&gt;One central question that has plagued humankind throughout history is: How should we live? What does the best possible life look like; and how must we act to achieve it?
In this article, I propose one answer to that question: a way to live the best possible life consistently, without relying on luck, a way of living that is entirely in your control.&lt;/p&gt;
&lt;p&gt;There are two caveats I want to note before you read this article.&lt;/p&gt;
&lt;p&gt;First, most of the core ideas presented here have already been explored in my previous writings. You can think of this piece more as a &lt;strong&gt;synthesis&lt;/strong&gt;, of them. If something feels underdeveloped or unfamiliar, I encourage you to follow the links throughout the article for deeper context.&lt;/p&gt;
&lt;p&gt;Second, when I use the words &lt;em&gt;should&lt;/em&gt; or &lt;em&gt;ought&lt;/em&gt;, I don’t mean them in the classical &lt;em&gt;moral&lt;/em&gt; sense, as something one is obligated to do for its own sake. Instead, I use them in a &lt;em&gt;practical, conditional&lt;/em&gt; sense:
If one wants to achieve a certain goal, then the action one &lt;em&gt;should&lt;/em&gt; take is the action that best fulfills that goal.
In this way, &lt;em&gt;should&lt;/em&gt; means &lt;em&gt;need&lt;/em&gt;.
This usage aligns with how &lt;em&gt;Elizabeth Anscombe&lt;/em&gt; defines &amp;ldquo;ought&amp;rdquo; in her essay &lt;em&gt;&lt;a href="https://monkemanx.github.io/articles/the_meaning_of_ought/"&gt;Modern Moral Philosophy&lt;/a&gt;&lt;/em&gt;: as a form of necessity relative to an end goal.&lt;/p&gt;
&lt;h3 id="11-meaning-and-value-depends-on-dasein"&gt;1.1. Meaning and Value Depends on &lt;em&gt;Dasein&lt;/em&gt;&lt;/h3&gt;
&lt;p&gt;The first point is that &lt;a href="https://monkemanx.github.io/articles/where_the_eiffel_tower_is_is_not_obejctive/"&gt;all meaning and purpose we as humans assign to things is &lt;strong&gt;subjective&lt;/strong&gt;&lt;/a&gt;. That means there is no meaning or purpose that is objectively true for all things or for all beings. Instead, meaning, purpose, &lt;a href="https://monkemanx.github.io/paper-summary/do_animals_have_beliefs/"&gt;belief&lt;/a&gt;, and value, depends on the concept of &lt;strong&gt;Dasein&lt;/strong&gt;, as formulated by Heidegger.&lt;/p&gt;
&lt;p&gt;Dasein refers to the special kind of existence that we human beings have. What is meant by this “special kind” of existence is that we possess certain built-in characteristics that shape how we experience the world.&lt;/p&gt;
&lt;p&gt;For example, we humans have two arms, two legs, and move through a three-dimensional space. This bodily structure means that, in general, we assume that when something is in front of us, we can reach out and grab it. That assumption isn’t based on pure logic, it arises from the nature of our embodied existence in the world. So we live in a mode of being where certain beliefs are practically built-in.&lt;/p&gt;
&lt;p&gt;For other beings, their mode of existence, their Dasein, is different. A fish, for instance, doesn’t have arms, so it would make no sense for it to “believe” it can reach out and grab something. That belief is simply not available to it, because of its structure and its way of being in the world.&lt;/p&gt;
&lt;p&gt;So when I speak of a “mode of existence,” I mean that a being exists in the world with certain physical and experiential structures, and these structures shape what beliefs are even available to it. From this, it follows that what we value and what we find meaningful also stems from this unique mode of being.&lt;/p&gt;
&lt;h3 id="12-we-can-change-our-beliefs"&gt;1.2. We can change our Beliefs&lt;/h3&gt;
&lt;p&gt;The second point relates to &lt;a href="https://plato.stanford.edu/entries/doxastic-voluntarism/"&gt;&lt;strong&gt;Doxastic Voluntarism&lt;/strong&gt;&lt;/a&gt;, the view that we can &lt;a href="https://monkemanx.github.io/tangled_thoughts/philosophy_philosophical_ramblings_what_is_belief/"&gt;change our beliefs&lt;/a&gt; through either direct or indirect means.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Direct belief control&lt;/strong&gt; refers to moments when we can decide what to believe, especially in cases of uncertainty. For example, if you leave your house in the morning and aren’t sure whether you locked the door, you might simply choose to believe you did, not based on new evidence, but out of practical necessity. In such uncertain situations, belief can sometimes be shaped by will.&lt;/p&gt;
&lt;p&gt;However, this kind of control has limits. Try, right now, to believe that the chair you’re sitting on or the floor you’re standing on isn’t real, it seems impossible. In cases like this, we can’t force ourselves to believe differently through direct effort.&lt;/p&gt;
&lt;p&gt;But there’s another kind of influence: &lt;strong&gt;indirect belief control&lt;/strong&gt;. This refers to long-term, environmental shaping of belief. For example, if someone changes their social surroundings, their group of friends, the media they consume, the conversations they have, this will often shift their political beliefs over time. A politically neutral person who surrounds themselves with left-leaning influences may gradually adopt left-leaning beliefs.&lt;/p&gt;
&lt;p&gt;The same seems to apply to religion. An atheist who starts spending time with religious people, attending church, reading religious books, and listening to spiritual music may gradually become more religious. Whether that change is good or bad is beside the point, the key idea is that beliefs can be shaped through &lt;strong&gt;long-term exposure&lt;/strong&gt;.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;“Do not waste time bothering whether you ‘love’ your neighbor; act as if you did. As soon as we do this we find one of the great secrets. When you are behaving as if you loved someone, you will presently come to love him.”&lt;/p&gt;
&lt;p&gt;― C. S. Lewis, Mere Christianity&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;This is what is called &lt;strong&gt;long-range voluntary control&lt;/strong&gt;, the idea that we can deliberately change our beliefs by immersing ourselves in specific environments over time. And there’s strong empirical evidence to support this, at least for many kinds of beliefs (though not all).&lt;/p&gt;
&lt;h3 id="13-the-stoic-principle-of-control"&gt;1.3. The Stoic Principle of Control&lt;/h3&gt;
&lt;p&gt;The third point comes from the &lt;a href="https://monkemanx.github.io/tangled_thoughts/quotes_epictetus8/"&gt;&lt;strong&gt;Stoic principle of control&lt;/strong&gt;&lt;/a&gt;, which holds that the only thing entirely within our power is &lt;em&gt;how we respond to things&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;Why is this the case? Let’s examine a few external factors.&lt;/p&gt;
&lt;p&gt;Take money, for example. To some degree, we can influence how much money we make by pursuing a good career, working hard, or developing certain skills. But now imagine you are born into a poor farming family in a rural region of Africa. In that situation, the chances of acquiring wealth are drastically reduced. In some contexts, achieving financial security may be nearly impossible, regardless of effort.&lt;/p&gt;
&lt;p&gt;The same is true of power or even health, and many other external things. Health is partially within our control: you can eat well, exercise, and avoid unhealthy habits. But imagine you&amp;rsquo;re born with a severe genetic disorder, that’s not something you chose, and there may be very little you can do to change it.&lt;/p&gt;
&lt;p&gt;In short, &lt;em&gt;external things are always subject to luck&lt;/em&gt;. That’s not to say we have &lt;em&gt;no&lt;/em&gt; influence over them, just that they aren’t &lt;em&gt;entirely&lt;/em&gt; up to us.&lt;/p&gt;
&lt;p&gt;Even things like memory are not guaranteed. You might develop Alzheimer’s later in life and lose access to your past. And your &lt;a href="https://en.wikisource.org/wiki/Moral_letters_to_Lucilius/Letter_49"&gt;past&lt;/a&gt; itself is already written, it cannot be changed, no matter how much you wish it could. The &lt;a href="https://monkemanx.github.io/tangled_thoughts/quotes_seneca6/"&gt;future&lt;/a&gt; is also beyond your direct control. It either unfolds as it will, or it doesn’t happen at all. Either way, you cannot fully determine it.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;“Life is divided into three parts: what was, what is and what shall be. Of these three periods, the present is short, the future is doubtful and the past alone is certain.”&lt;/p&gt;
&lt;p&gt;― Seneca, On the Shortness of Life: Life Is Long if You Know How to Use It&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;So what is fully within our control?&lt;/p&gt;
&lt;p&gt;The Stoics would say: &lt;a href="https://monkemanx.github.io/tangled_thoughts/quotes_epictetus2/"&gt;&lt;em&gt;our response to any situation&lt;/em&gt;&lt;/a&gt;. That is, the thoughts, judgments, and actions that arise from our character.&lt;/p&gt;
&lt;p&gt;For example, suppose a friend asks to borrow money from you. You may not have the financial ability to help them, that part may be out of your control. But you still have complete control over how you respond: with kindness, with honesty, with frustration, with indifference, that&amp;rsquo;s your decision. You could say, “I’m really sorry, I can’t help right now,” or “No, I don’t want to,” or even lash out in anger. But that choice belongs to you alone.&lt;/p&gt;
&lt;h3 id="14-pulling-it-all-together"&gt;1.4. Pulling It All Together&lt;/h3&gt;
&lt;p&gt;Let’s recap the argument so far:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;From the first point&lt;/strong&gt;, we learned that value is not objective, we can’t assign absolute meaning or purpose to things. Instead, all value is grounded in subjective experience.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;From the second point&lt;/strong&gt;, we learned that to some extent, we can change what we value and believe, especially through long-term, deliberate exposure to certain environments.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;From the third point&lt;/strong&gt;, we learned that the only thing fully under our control is how we react to the world; our intentions, our judgments, and our character.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;From this, a conclusion naturally follows:&lt;/p&gt;
&lt;p&gt;If I want to live the best possible life, and who wouldn’t, if they understood what that really means, then I should value something that is &lt;em&gt;entirely within my control&lt;/em&gt;. That means not wealth, not fame, not health, not even my memories or future outcomes: but my responses, my intentions, my character.&lt;/p&gt;
&lt;p&gt;This leads to a deeper implication: the only thing that should be valued is &lt;em&gt;intention&lt;/em&gt;, the ethical, conscious will behind our actions. Outcomes are neutral. Actions themselves, in isolation, do not carry value either. Only the intention behind the action, that is the authentic choice, aligned with one’s values, has real worth.&lt;/p&gt;
&lt;h2 id="2-from-valuing-intentions-to-valuing-virtue"&gt;2. From Valuing Intentions to Valuing Virtue&lt;/h2&gt;
&lt;p&gt;So far, the argument has led us to the conclusion that we should value intentions, the inner motivation behind our actions, rather than external things like money, power, or even outcomes and actions themselves. This inner focus offers us a kind of sovereignty: intentions are the only part of the moral equation fully within our control.&lt;/p&gt;
&lt;p&gt;But this alone doesn’t yet tell us how we should form or act on those intentions. After all, simply valuing intentions doesn&amp;rsquo;t answer whether those intentions should be kind or cruel, generous or selfish, noble or spiteful.&lt;/p&gt;
&lt;p&gt;For example, suppose a friend asks to borrow some money. One possible reaction would be to respond virtuously, with kindness, honesty, and generosity. But another response might be selfish or spiteful: for instance, saying, “No, I don’t want to help you. I’m keeping my money because I’m greedy or don’t like you.”&lt;/p&gt;
&lt;p&gt;Both responses still involve valuing intentions over outcomes. The greedy person isn&amp;rsquo;t making a utilitarian calculation about consequences; they&amp;rsquo;re acting based on an internal disposition, just as much as the generous person is.&lt;/p&gt;
&lt;p&gt;So the question becomes: why should we prefer virtuous intentions over vicious ones?&lt;/p&gt;
&lt;p&gt;Here’s the next step in the argument.&lt;/p&gt;
&lt;h3 id="21-vice-is-inseparable-from-external-valuation"&gt;2.1. Vice is Inseparable from External Valuation&lt;/h3&gt;
&lt;p&gt;The first reason to prefer virtue over vice: it’s nearly impossible to be &lt;em&gt;vicious&lt;/em&gt; without also valuing external outcomes, which contradicts our earlier conclusion that only intentions should be valued.&lt;/p&gt;
&lt;p&gt;Let’s revisit the example where a friend asks to borrow money, and you say, “No, I don’t want to, I’m a selfish person.” On the surface, this seems like an intentional act, but it’s tied to valuing something external, in this case, the money. You&amp;rsquo;re keeping the money because you view it as more important than helping your friend. That means you’re not just valuing intention; you’re implicitly placing value on an outcome, namely the possession of wealth.&lt;/p&gt;
&lt;p&gt;The same goes for other forms of vice. Suppose someone refuses to help their grandmother move groceries because they’re “lazy” or “don’t feel like it.” Again, even that reaction is based on valuing something external, comfort, time, or personal mood. All of these are outcomes, not intentions in the pure sense.&lt;/p&gt;
&lt;p&gt;Hence, vice depends on valuing outcomes, which contradicts our foundational claim that only intentions should be valued.
So if we want to consistently value only what is within our control, that is our intentions, then we must also shape those intentions toward virtue rather than vice.&lt;/p&gt;
&lt;h3 id="22-virtue-as-part-of-human-nature"&gt;2.2 Virtue as Part of Human Nature&lt;/h3&gt;
&lt;p&gt;Before we can present the second argument for why virtue is preferable to vice, we need to establish a few premises.&lt;/p&gt;
&lt;h4 id="221-why-value-consistency"&gt;2.2.1 Why Value Consistency?&lt;/h4&gt;
&lt;p&gt;The first guiding intuition is this: it&amp;rsquo;s better to value in a consistent and stable way rather than in a chaotic and constantly shifting manner. That is, instead of valuing generosity one day and stinginess the next, one should adopt a stable orientation.&lt;/p&gt;
&lt;p&gt;To clarify: this doesn’t mean one should never change their mind. Some environmental factors justify changing one&amp;rsquo;s response, say if your friend asks you for money to buy food versus money to buy a gun to harm others. But all things being equal, if the situation is functionally the same, our values should not shift randomly.&lt;/p&gt;
&lt;p&gt;Why adopt this principle of consistency?&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Simplicity: &lt;a href="https://en.wikipedia.org/wiki/Occam%27s_razor"&gt;Occam’s Razor&lt;/a&gt; suggests that, all else equal, we should prefer simpler systems. It&amp;rsquo;s easier to adopt a clear, static rule than a complex, dynamic one that changes with every situation.&lt;/li&gt;
&lt;li&gt;Habit formation: Humans are creatures of habit. If we consistently act on a stable principle, we develop habits and habits make moral behavior exponentially easier. Just as a bodybuilder gets better results by repeating a solid routine rather than reinventing the workout every day, so too do we become more virtuous by applying a stable ethical orientation.&lt;/li&gt;
&lt;/ol&gt;
&lt;h4 id="222-virtue-as-a-characteristic-of-every-action"&gt;2.2.2 Virtue as a Characteristic of Every Action&lt;/h4&gt;
&lt;p&gt;The next point is definitional: every action and reaction we perform lies somewhere on a &lt;a href="https://monkemanx.github.io/articles/aristotele_virtue_ethics/"&gt;scale between virtue and vice&lt;/a&gt;. This is because virtue, by classical definitions such as Aristotle’s, is the golden mean between two extremes, and vice lies at the extremes.&lt;/p&gt;
&lt;p&gt;For instance, suppose a friend asks to borrow money. Your options lie on a spectrum: stinginess on one end, reckless extravagance on the other. Virtue lies in the balanced middle, in choosing wisely based on reason and context. Similarly, if someone asks you afterward how you felt about helping your friend, you again have a spectrum: you might brag about your generosity (pride), downplay it with self-pity, or respond truthfully with modesty. You cannot escape this scale, every reaction lies somewhere on it.&lt;/p&gt;












&lt;figure style="display: block; margin: 0 auto; width: 70%; "&gt;
 &lt;img
 src="https://monkemanx.github.io/attachments/Aristotle_mean.png"
 loading="lazy"
 width=""
 height=""
 alt="Image"
 style="display: block; width: 100%; height: 100%; object-fit: contain; "
 &gt;
 
&lt;/figure&gt;

&lt;p&gt;The exact names or labels for virtues and vices may differ across cultures and people, but the structural reality remains: we always act within a spectrum where extremes tend to become vice, and the mean approximates virtue.&lt;/p&gt;
&lt;h4 id="223-choosing-the-golden-mean"&gt;2.2.3 Choosing the Golden Mean&lt;/h4&gt;
&lt;p&gt;With the two previous points in mind, that (1) every action lies on a scale of virtue/vice and (2) consistent habits are easier to maintain, we now face the question: Where on this scale should we position ourselves?&lt;/p&gt;
&lt;p&gt;The obvious answer might seem to be: “choose the virtuous mean,” since we tend to associate virtue with goodness. But we can&amp;rsquo;t just accept this at face value, the entire article has been about building from first principles, not presupposed conclusions.&lt;/p&gt;
&lt;p&gt;So why choose the virtuous middle and not one of the extremes?&lt;/p&gt;
&lt;p&gt;In short: because virtue is more in line with human nature, or as Heidegger might say, with our mode of being. Practicing virtue aligns with our nature and requires less existential friction than pursuing extremes of vice, which demand more internal conflict and are less sustainable.&lt;/p&gt;
&lt;p&gt;A clarification: just because something goes “against” human nature doesn’t make it morally wrong (e.g., opening a beer with a knife instead of a bottle opener isn’t “immoral,” just inefficient). But since we’ve already chosen to value intentions and since that valuation is free for us to define, we should value in such a way that makes practising the intentions the most easiest for us, that is by aligning them with our being.&lt;/p&gt;
&lt;h4 id="224--human-nature-and-the-core-of-morality"&gt;2.2.4 Human Nature and the Core of Morality&lt;/h4&gt;
&lt;p&gt;When I say virtue aligns with our mode of existence, I mean that just by being thrown in the world as humans (&lt;a href="https://en.wikipedia.org/wiki/Heideggerian_terminology#Geworfenheit"&gt;Geworfenheit&lt;/a&gt;): as beings who live, speak and act in the world, certain moral intuitions are &lt;a href="https://monkemanx.github.io/paper-summary/do_animals_have_beliefs/"&gt;built into our condition&lt;/a&gt;. Think of what philosopher Donald Davidson called a &lt;a href="https://monkemanx.github.io/paper-summary/rational_animals/"&gt;network of beliefs&lt;/a&gt;: we exist embedded in shared language, practices, and expectations. Whether morality was “invented” or not is irrelevant, it is &lt;a href="https://en.wikipedia.org/wiki/Heideggerian_terminology#Disclosure"&gt;disclosed&lt;/a&gt; to us through our &lt;a href="https://en.wikipedia.org/wiki/Heideggerian_terminology#Being-in-the-world"&gt;being-in-the-world&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;C.S. Lewis makes this point vividly:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;“Think of a country where people were admired for running away in battle, or where a man felt proud of double-crossing those who were kindest to him&amp;hellip; You might just as well try to imagine a country where two and two made five&amp;hellip; They have always agreed that you ought not to put yourself first.”
— &lt;em&gt;Mere Christianity&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Now, I am not claiming there’s an eternal moral law floating in the cosmos, nor that morality is just a cultural invention. Rather, I believe that certain core moral propositions arise naturally from our mode of being. These are not immutable laws, but deeply embedded conditions of human existence, like existing in time or needing communication.&lt;/p&gt;
&lt;p&gt;This morality exists in layers, like a matryoshka doll:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Innermost core&lt;/strong&gt;: basic moral intuitions we cannot shake off just by being conscious, social creatures.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Next layer&lt;/strong&gt;: the specific shape those morals take for humans.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Next&lt;/strong&gt;: social and cultural interpretations.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Outermost&lt;/strong&gt;: our individual, subjective experience.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This layered view helps us understand why morality can evolve without becoming meaningless, and how different societies can have genuinely different, yet valid moral frameworks, all arising from different ways of being-in-the-world.&lt;/p&gt;
&lt;p&gt;Now, consider how we actually &lt;em&gt;change&lt;/em&gt; our values or beliefs. As we discussed earlier, &lt;strong&gt;long-range voluntary belief change&lt;/strong&gt; is possible: we can slowly reshape what we believe or value by deliberately exposing ourselves to certain ideas, communities, or habits. However, this doesn’t work for all beliefs. Some are nearly impossible to adopt if they contradict how we are fundamentally structured as human beings.&lt;/p&gt;
&lt;p&gt;For instance, you likely can’t make yourself believe the floor beneath you doesn’t exist, no matter how hard you try. Your sensory experience and bodily structure make such a belief unsustainable.&lt;/p&gt;
&lt;p&gt;The same seems true for values. It’s far easier to train ourselves to &lt;em&gt;value virtue&lt;/em&gt; than to value &lt;em&gt;vice&lt;/em&gt;. Why?&lt;/p&gt;
&lt;p&gt;Because society, language, and shared practice already reinforce virtue. Traits like honesty, kindness, courage, and fairness are consistently admired. Vice, on the other hand, is more often discouraged, and harder to sustain without conflict, shame, or isolation.&lt;/p&gt;
&lt;p&gt;So if we want a value system that is sustainable, and resilient, then &lt;em&gt;virtue aligns better with our human condition&lt;/em&gt;, or our “mode of existence,” as Heidegger might say. Vice doesn’t. You can try to train yourself into valuing cruelty, betrayal, or greed, but it will be an uphill battle, one that goes against our embedded moral intuitions and social nature.&lt;/p&gt;
&lt;p&gt;Thus, the more deeply a value harmonizes with our existential structure, the easier it is to believe, embody, and sustain over time. This gives virtue not only moral weight but practical viability.&lt;/p&gt;
&lt;h3 id="23--an-honest-subjective-leap"&gt;2.3 An Honest Subjective Leap&lt;/h3&gt;
&lt;p&gt;This entire argument, from valuing intention to valuing virtuous intention, remains a subjective leap. It is not logically necessary; rather, it is an existential choice. One could imagine a person who is consistently malevolent, someone who finds it “easier” to act in selfish or destructive ways. But even then, I would urge such a person to make the leap: to deliberately train themselves toward virtue, as one might train the tastebuds to enjoy spinach despite disliking it.&lt;/p&gt;
&lt;p&gt;We choose virtue, not because it is metaphysically mandated, but because it is more deeply human.&lt;/p&gt;
&lt;h2 id="3-objections-and-responses"&gt;3. Objections and Responses&lt;/h2&gt;
&lt;h3 id="31-clarifying-the-role-of-externals"&gt;3.1 Clarifying the Role of Externals&lt;/h3&gt;
&lt;p&gt;One potential confusion must be cleared up. Earlier, I said we should value intentions because they’re independent of external things. But now I seem to say that depending on environmental factors, like your friend&amp;rsquo;s motivations, might change how we react. Isn’t that relying on externals again?&lt;/p&gt;
&lt;p&gt;No. The difference lies in how the external world is used.&lt;/p&gt;
&lt;p&gt;When we value external goods like money, success, or power, our happiness becomes unstable, we may or may not acquire these goods, and so our well-being is constantly threatened. But when we value intentions, we retain sovereignty. External factors merely provide the context in which we act, not the source of value.&lt;/p&gt;
&lt;p&gt;For instance:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;One day, your friend asks for money to pay rent — you judge lending it as virtuous.

Another day, he wants money to buy a gun and commit harm — you judge withholding it as virtuous.
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;In both cases, you are practicing virtue. You are not reacting based on what you get from the world, but on how you choose to respond to it, based on a stable ethical orientation.&lt;/p&gt;
&lt;h3 id="32-how-can-we-speak-about-control-in-a-fully-deterministic-world"&gt;3.2. How can we speak about control in a fully deterministic world?&lt;/h3&gt;
&lt;p&gt;One clarification I want to make is about what I mean when I say that virtue is “in our control.”&lt;/p&gt;
&lt;p&gt;I don’t mean control in the classical metaphysical sense, as in being free to choose otherwise in a given moment. I personally believe the world is &lt;a href="https://monkemanx.github.io/articles/about_freedom/#4-what-about-free-will"&gt;fully deterministic&lt;/a&gt;: every reaction we have is the result of our prior experiences, our current state, and our knowledge. Given the same inputs, we would always act the same way.&lt;/p&gt;
&lt;p&gt;So when I say that we are “in control” of virtue, I mean something more specific, control in the sense that philosopher &lt;a href="https://monkemanx.github.io/paper-summary/freedom_of_will_concept_of_person/"&gt;Harry Frankfurt describes it through the concept of second-order volitions&lt;/a&gt;. To illustrate: imagine someone wants to assassinate the president, but unbeknownst to them, a chip is implanted in their brain that would force them to kill the president if they ever decided &lt;em&gt;not&lt;/em&gt; to. If this person kills the president &lt;em&gt;because they want to&lt;/em&gt;, and not because they are forced, then this reflects their true will. According to Frankfurt, this kind of control, where our higher-order desires align with our actions, is the control I mean.
This kind of definition of will or control is explicitly what Heidegger means by &lt;a href="https://en.wikipedia.org/wiki/Authenticity_%28philosophy%29"&gt;Authenticity&lt;/a&gt;: the degree to which a person&amp;rsquo;s actions are congruent with their values and desires, despite external pressures toward social conformity.&lt;/p&gt;
&lt;p&gt;Similarly, if someone truly understands the argument I’ve laid out in this article, that intentions (how we react) are the only thing fully within our sphere, and everything external (outcomes, wealth, success) depends partly on luck, then this understanding becomes part of the causal structure shaping their reactions. In other words, knowing this deeply, leads one to live virtuously.&lt;/p&gt;
&lt;p&gt;But if instead, you value external things like outcomes or material success, no amount of knowledge can help you consistently achieve your ideal life, because those external things depend on luck and circumstances beyond your sphere of being.&lt;/p&gt;
&lt;p&gt;So, when I say virtue is in our control, I mean this: virtue depends entirely on how we react to things, and if we understand this clearly, the life we live depends entirely on ourselves. That is what true control means in this context.&lt;/p&gt;
&lt;h3 id="33-a-response-to-the-utilitarian-objection"&gt;3.3. A Response to the Utilitarian Objection&lt;/h3&gt;
&lt;p&gt;One objection to the position, of virtue as &amp;ldquo;life&amp;rsquo;s goal&amp;rdquo;, might come from a utilitarian. They might argue: “But acting virtuously often &lt;em&gt;leads&lt;/em&gt; to better outcomes! Doesn’t that make outcomes still important?”&lt;/p&gt;
&lt;p&gt;My answer is: not necessarily. Virtue is not about the result, it’s about the integrity of the intentions behind an action. Let’s use an example to illustrate this.&lt;/p&gt;
&lt;p&gt;Imagine a situation where a button sits in front of a person. If they press the button, 500 people will live. If they do &lt;em&gt;not&lt;/em&gt; press it, 500 people will die.&lt;/p&gt;
&lt;p&gt;According to utilitarian logic, pressing the button is the clearly better action, more lives saved means more utility. But now, imagine that the person in question has no hands and is bound to a bed. They literally &lt;em&gt;can’t&lt;/em&gt; press the button. The outcome, those 500 people dying, still happens.&lt;/p&gt;
&lt;p&gt;So: has something “bad” happened &lt;strong&gt;to&lt;/strong&gt; this person?&lt;/p&gt;
&lt;p&gt;To a utilitarian: yes, because they value outcomes, even if they’re outside the person’s control. The fact that the person &lt;em&gt;couldn’t&lt;/em&gt; press the button doesn&amp;rsquo;t matter to the utilitarian’s system. Something bad still happened, even though the person had no agency.&lt;/p&gt;
&lt;p&gt;But to someone who follows the framework I’ve laid out, where only intentions and reactions are valued, &lt;a href="https://monkemanx.github.io/tangled_thoughts/quotes_seneca2/"&gt;nothing bad has happened&lt;/a&gt;. Since the event was outside of their control, and since they had no intention of letting harm occur, their own life and value aren’t diminished. They stayed consistent with valuing only what’s in their power: their intentions.&lt;/p&gt;
&lt;p&gt;This is the core flaw in utilitarianism: it ties our value and happiness to &lt;em&gt;external things&lt;/em&gt; we cannot fully control. And that makes it a fragile foundation for living a good life.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;The Blessed One said, &amp;ldquo;When touched with a feeling of pain, the uninstructed run-of-the-mill person sorrows, grieves [..] and becomes distraught. So he feels two pains, physical &amp;amp; mental. Just as if they were to shoot a man with an arrow and, right afterward, were to shoot him with another one, so that he would feel the pains of two arrows; in the same way, when touched with a feeling of pain, the uninstructed run-of-the-mill person sorrows [..]&lt;/p&gt;
&lt;p&gt;Now, the well-instructed disciple of the noble ones, when touched with a feeling of pain, does not sorrow [&amp;hellip;] or become distraught. So he feels one pain: physical, but not mental. Just as if they were to shoot a man with an arrow and, right afterward, did not shoot him with another one, so that he would feel the pain of only one arrow.&lt;/p&gt;
&lt;p&gt;This is the difference, this the distinction, this the distinguishing factor between the well-instructed disciple of the noble ones and the uninstructed run-of-the-mill person&lt;/p&gt;
&lt;p&gt;― Sallatha Sutta: The Arrow, SN 36.6&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2 id="4-conclusion-from-first-principles-to-practice"&gt;4. Conclusion: From First Principles to Practice&lt;/h2&gt;
&lt;p&gt;I didn’t start out saying “external things are bad” or “virtue is good.” Instead, I started from first principles, asking:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;“If someone wants to live the best possible life, a life that is consistent, stable, and fully within their own control, then what should they value?”&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Again, by “should,” I don’t mean some kind of external moral rule. I mean: &lt;em&gt;given this goal, what is the best strategy to achieve it?&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;From that question, three core premises followed:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Value is not objective&lt;/strong&gt;, it is subjective, and based on our existence as Dasein (Heidegger).&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;We can change our beliefs and values&lt;/strong&gt;, especially over time and through indirect, environmental means (Doxastic Voluntarism).&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Only our intentions are fully under our control&lt;/strong&gt;, while everything else, outcomes, external things, memories, even our own bodies, are not (Stoicism).&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;From these three premises, the most consistent way to live a good life is to value only &lt;em&gt;intentions&lt;/em&gt;, and to shape those intentions in the direction of &lt;em&gt;virtue&lt;/em&gt;, because:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Virtuous values are easier to adopt and maintain in human society.&lt;/li&gt;
&lt;li&gt;Virtue does not require us to value external things.&lt;/li&gt;
&lt;li&gt;Vice inevitably draws us back into valuing external outcomes, which are fragile and uncontrollable.&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>DIY Home Network Rack – the Lack Rack</title><link>https://monkemanx.github.io/articles/diy_lack_rack/</link><pubDate>Tue, 08 Jul 2025 10:00:00 +0000</pubDate><author>monkeman@cock.li (MonkeMan)</author><guid>https://monkemanx.github.io/articles/diy_lack_rack/</guid><description>&lt;p&gt;Since my last article on my &lt;a href="https://monkemanx.github.io/articles/homelab_upgrade/"&gt;Homelab&lt;/a&gt;, my Homelab has changed quite a bit. Namely, I’ve added a Raspberry Pi that acts both as the entry point to my network via Netbird (similar to Tailscale but better) and as a coordinator between my services. In addition, I added a managed switch and a KVM to be able to debug my server remotely. But this is not what this article is about. Hopefully, I will soon have time to write more about that.&lt;/p&gt;












&lt;figure style="display: block; margin: 0 auto; width: 70%; "&gt;
 &lt;img
 src="https://monkemanx.github.io/attachments/why_is_server_home.jpeg"
 loading="lazy"
 width=""
 height=""
 alt="Image"
 style="display: block; width: 100%; height: 100%; object-fit: contain; "
 &gt;
 
&lt;/figure&gt;

&lt;p&gt;With the increasing size of my homelab, I decided it was no longer acceptable for all my equipment to just lie around loosely connected with each other. Instead, I wanted to tidy things up by having one central place where I could put all my equipment securely mounted, but also easily movable if needed.&lt;/p&gt;
&lt;p&gt;Thus, I decided that I needed a network/server rack: basically a closet where one can mount all their equipment. But sadly, I don’t have the time or money for a big, beautiful server rack (there’s a joke in there somewhere). So, something small was needed. I first looked around on Amazon and then AliExpress for something affordable but still big enough to fit my SFF (small form factor) server PC. Most options were either too expensive or not big enough. I found something on &lt;a href="https://shorturl.at/Ctl7q"&gt;AliExpress&lt;/a&gt;, but then decided against it because even though I was already paying nearly 80 bucks, this looked too cheap.&lt;/p&gt;












&lt;figure style="display: block; margin: 0 auto; width: 60%; "&gt;
 &lt;img
 src="https://monkemanx.github.io/attachments/server_rack_meme.jpg"
 loading="lazy"
 width=""
 height=""
 alt="Image"
 style="display: block; width: 100%; height: 100%; object-fit: contain; "
 &gt;
 
&lt;/figure&gt;

&lt;p&gt;This is when I came across the &lt;a href="https://wiki.eth0.nl/index.php/LackRack"&gt;DIY Lack Rack&lt;/a&gt;, an invention more than 20 years old and a trusty friend of every networking enthusiast. The more I read about it, the more I realized that building one’s first baby Lack Rack is almost a rite of passage for any homelabbing zealot. I just needed to build one.&lt;/p&gt;
&lt;p&gt;So, what is a DIY Lack Rack? Despite how fancy it sounds, it is quite simple: multiple side tables from IKEA called LACK, stacked together. Why these particular tables from IKEA? They have two benefits: first, they are cheap; second, the space between the legs of the table is exactly 19 inches, which is the standard width for most server and networking equipment.&lt;/p&gt;
&lt;p&gt;So, what do we need? It depends on your needs. I am building a very basic variant of the Lack Rack, but the beauty of the DIY Lack Rack is that it can be &lt;a href="https://wiki.eth0.nl/index.php/LackRack"&gt;easily expanded&lt;/a&gt;. First, you need to figure out how much space you need, which determines the number of tables you&amp;rsquo;ll need. For my basic case, two are enough. In addition, you will need some screws and angle metal brackets. I also recommend buying a set of wheels so you can more easily move the rack around. And, of course, you need all the equipment you want to put in there, such as switches or plugs. If you have anything that isn’t exactly 19 inches wide but want to place it in the rack, I recommend using double-sided KU Tape (self-adhesive tape) to strap them in place.&lt;/p&gt;
&lt;p&gt;Thus, in total, we need:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;2x IKEA Lack Tables&lt;/li&gt;
&lt;li&gt;4x Angle Brackets&lt;/li&gt;
&lt;li&gt;16x Screws&lt;/li&gt;
&lt;li&gt;4x Caster Wheels&lt;/li&gt;
&lt;li&gt;&lt;em&gt;(Optional)&lt;/em&gt; Wood Glue&lt;/li&gt;
&lt;li&gt;&lt;em&gt;(Optional)&lt;/em&gt; KU Tape&lt;/li&gt;
&lt;/ul&gt;












&lt;figure style="display: block; margin: 0 auto; width: 70%; "&gt;
 &lt;img
 src="https://monkemanx.github.io/attachments/DIY_Lack_Rack_1.jpg"
 loading="lazy"
 width=""
 height=""
 alt="Image"
 style="display: block; width: 100%; height: 100%; object-fit: contain; "
 &gt;
 
 &lt;figcaption style="text-align: center; margin-top: 0.5rem;"&gt;&lt;i&gt;Not all equipment is shown here.&lt;/i&gt;&lt;/figcaption&gt;
 
&lt;/figure&gt;

&lt;p&gt;The first step is to open all the packages you have received and gather all the materials in one place. Then we can begin. For this, we proceed just like building a regular IKEA table: first, insert all the screws into the tabletop, then attach all the legs. Together, this will later become the top of the rack.&lt;/p&gt;












&lt;figure style="display: block; margin: 0 auto; width: 70%; "&gt;
 &lt;img
 src="https://monkemanx.github.io/attachments/DIY_Lack_Rack_2.jpg"
 loading="lazy"
 width=""
 height=""
 alt="Image"
 style="display: block; width: 100%; height: 100%; object-fit: contain; "
 &gt;
 
&lt;/figure&gt;

&lt;p&gt;Now we can add the bottom of the rack (which is at the top in the picture). For this, we use the second Lack table and place it underneath the first one (again in the picture its on the top). For extra stability, I added wood glue, but I don’t think this is strictly necessary if you use angle brackets, so you can skip the glue if you prefer.&lt;/p&gt;












&lt;figure style="display: block; margin: 0 auto; width: 70%; "&gt;
 &lt;img
 src="https://monkemanx.github.io/attachments/DIY_Lack_Rack_3.jpg"
 loading="lazy"
 width=""
 height=""
 alt="Image"
 style="display: block; width: 100%; height: 100%; object-fit: contain; "
 &gt;
 
 &lt;figcaption style="text-align: center; margin-top: 0.5rem;"&gt;&lt;i&gt;I let the glue harden for half an hour and placed a bit of weight on top to secure it tightly.&lt;/i&gt;&lt;/figcaption&gt;
 
&lt;/figure&gt;

&lt;p&gt;After that, we can use the angle brackets to secure the rack more tightly. Make sure the screws you choose are neither too long nor too short. Personally, I used the table I glued the legs to as the bottom, since it’s a bit less secure than the other half, which has screws in it.&lt;/p&gt;


&lt;figure height="653px"&gt;
 &lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width:80%" src="https://monkemanx.github.io/attachments/DIY_Lack_Rack_4.jpg"&gt;
 &lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width:80%" src="https://monkemanx.github.io/attachments/DIY_Lack_Rack_5.jpg"&gt;
&lt;/figure&gt;


&lt;p&gt;We are almost done! Now, we can add the wheels to the rack to make the whole thing roll around nicely.&lt;/p&gt;












&lt;figure style="display: block; margin: 0 auto; width: 70%; "&gt;
 &lt;img
 src="https://monkemanx.github.io/attachments/DIY_Lack_Rack_6.jpg"
 loading="lazy"
 width=""
 height=""
 alt="Image"
 style="display: block; width: 100%; height: 100%; object-fit: contain; "
 &gt;
 
&lt;/figure&gt;

&lt;p&gt;Lastly, we can add all of our equipment to the rack. If you have server-mounted equipment, you can screw it into the legs, but be careful the legs are only really stable enough to hold weight at the top. So, if you want to screw multiple devices into the rack, either use more tables and always screw &lt;a href="https://bakerstreetforensics.com/2022/02/28/diy-home-network-rack-the-lack-rack/"&gt;them in at the top&lt;/a&gt;, or screw them in from the bottom up so they rest on top of each other to support the weight.&lt;/p&gt;
&lt;p&gt;Since I don’t have any rack-mounted equipment, I just used tape to securely stick everything to the tables.&lt;/p&gt;












&lt;figure style="display: block; margin: 0 auto; width: 70%; "&gt;
 &lt;img
 src="https://monkemanx.github.io/attachments/DIY_Lack_Rack_7.jpg"
 loading="lazy"
 width=""
 height=""
 alt="Image"
 style="display: block; width: 100%; height: 100%; object-fit: contain; "
 &gt;
 
&lt;/figure&gt;

&lt;p&gt;And that’s it, you should now be able to build your own DIY Lack Rack. But don’t limit yourself to what I’ve shown here. The beauty of the Lack Rack is that it’s DIY, so you can build it to fit your specific needs.&lt;/p&gt;</description></item><item><title>The Eiffel Tower is NOT in Paris!</title><link>https://monkemanx.github.io/articles/where_the_eiffel_tower_is_is_not_obejctive/</link><pubDate>Sun, 01 Jun 2025 08:00:00 +0000</pubDate><author>monkeman@cock.li (MonkeMan)</author><guid>https://monkemanx.github.io/articles/where_the_eiffel_tower_is_is_not_obejctive/</guid><description>&lt;style&gt;
 .info {
 background-color: #e6f7ff; 
 padding: 15px; 
 border-radius: 5px; 
 margin-bottom: 15px; 
 }

 .info-title {
 font-size: 20px; 
 margin-bottom: 10px; 
 color: #000080; 
 font-weight: bold; 
 }
&lt;/style&gt;

&lt;div class="info"&gt;
 &lt;div class="info-title"&gt;Info&lt;/div&gt;
 &lt;p&gt;&lt;p&gt;The basis of this text is the paper summary &lt;a href="https://monkemanx.github.io/paper-summary/what_it_is_like_to_be_a_bat/"&gt;&lt;em&gt;What Is It Like to Be a Bat?&lt;/em&gt;&lt;/a&gt; and Heidegger&amp;rsquo;s concept of &lt;a href="https://en.wikipedia.org/wiki/Dasein"&gt;&lt;em&gt;Dasein&lt;/em&gt;&lt;/a&gt;. I have not read any primary sources by Heidegger; therefore, if any argument here seems questionable, the fault lies with me and not with Heidegger. I recommend turning to his work &lt;em&gt;Being and Time&lt;/em&gt;, where he elaborates on this concept far better and more accurately than I ever could.&lt;/p&gt;
&lt;p&gt;Also important is, &lt;a href="https://monkemanx.github.io/paper-summary/on_senses_and_references/"&gt;&lt;em&gt;On Sense and Reference&lt;/em&gt;&lt;/a&gt; which is implicitly relevant when I discuss language and meaning. What I describe as &amp;ldquo;could have been expressed otherwise&amp;rdquo; can be thought of as &lt;em&gt;senses&lt;/em&gt; in the context of that paper.&lt;/p&gt;
&lt;/p&gt;
&lt;/div&gt;

&lt;h2 id="in-defense-of-the-statement-the-eiffel-tower-is-in-paris-being-subjective"&gt;In Defense of the Statement “The Eiffel Tower Is in Paris” Being Subjective&lt;/h2&gt;
&lt;p&gt;A few days ago, I had an argument with fellow students about whether the statement &lt;em&gt;“The Eiffel Tower is in Paris”&lt;/em&gt; is subjective or not. Most of them said it was an objective sentence, while I argued that it has subjective characteristics. Unfortunately, I wasn’t really able to convince them; partly because my argument was rather unstructured, even though I still believe it holds.&lt;/p&gt;
&lt;p&gt;I want to take the opportunity in this article to explain why this statement and other statements that at first glance appear entirely objective, actually contain elements of subjectivity. More broadly, the central thesis of this article is:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;Dasein&lt;/em&gt;, i.e., human existence, this special form of subjectivity, is a necessary condition for all meaning and purpose. Meaning and purpose do not make sense in a context devoid of &lt;em&gt;Dasein&lt;/em&gt;; &lt;em&gt;Dasein&lt;/em&gt; precedes them.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Before I begin the actual argument, I want to clarify that I do &lt;strong&gt;not&lt;/strong&gt; think the statement &lt;em&gt;“The Eiffel Tower is in Paris”&lt;/em&gt; is purely subjective. On the contrary, I would say that it is &lt;strong&gt;mostly&lt;/strong&gt; objective. What I’m arguing is simply that it is &lt;strong&gt;not purely&lt;/strong&gt; objective, and that there is some inherent subjectivity embedded in it. Even if you already agree with that point, I believe the broader argument I make here is still interesting and worth considering.&lt;/p&gt;
&lt;p&gt;One more note: Throughout this text, I use terms like &lt;em&gt;meaning&lt;/em&gt;, &lt;em&gt;purpose&lt;/em&gt;, &lt;em&gt;function&lt;/em&gt;, and &lt;em&gt;goal&lt;/em&gt; somewhat interchangeably. I’m aware that these words have important distinctions, but I conflate them here for didactic purposes.&lt;/p&gt;












&lt;figure style="display: block; margin: 0 auto; width: 80%; "&gt;
 &lt;img
 src="https://monkemanx.github.io/attachments/discussing.jpg"
 loading="lazy"
 width=""
 height=""
 alt="Image"
 style="display: block; width: 100%; height: 100%; object-fit: contain; "
 &gt;
 
&lt;/figure&gt;

&lt;h2 id="dasein-or-human-existence-as-a-requirement-for-meaning"&gt;Dasein or Human Existence as a Requirement for Meaning&lt;/h2&gt;
&lt;p&gt;I want to begin with a simple example that most people would likely agree with, and then work my way toward the main argument.&lt;/p&gt;
&lt;p&gt;When we look at a knife and ask ourselves what its function is, most people would say that its function is to cut things. We use knives to cut bread, tomatoes, and much more and this is indeed their typical function. But we can also use a knife to open a beer by levering off the cap. We might even (though unwisely) use it as a hammer to drive a nail into the wall, or as a wedge to stabilize a wobbly chair. Still, these use cases are clearly suboptimal and not the &lt;em&gt;true&lt;/em&gt; function of a knife. Why?&lt;/p&gt;
&lt;p&gt;Because if we had wanted a tool to open beer bottles, we would have created a bottle opener. If we had wanted to hammer nails, we would have designed a hammer. And if we wanted something to stabilize a chair, we definitely wouldn’t have made it sharp and dangerous.&lt;/p&gt;
&lt;p&gt;In other words, the knife’s function is determined by human design. Humans wanted a tool for cutting, so we made knives. The purpose or function of a knife is thus contingent on human existence, on what Heidegger calls &lt;em&gt;Dasein&lt;/em&gt;. Therefore, &lt;em&gt;Dasein&lt;/em&gt; precedes the meaning of the knife. Without human existence (besides the fact that knives likely wouldn’t exist), the knife has no meaning. We give it meaning.&lt;/p&gt;
&lt;p&gt;I think most people are open to this kind of argument and would agree that other human-made objects, like forks, houses, streets, cars, instruments, and phones, can be viewed the same way. These objects were designed with specific purposes in mind and thus derive their meaning from &lt;em&gt;Dasein&lt;/em&gt;. Their functions can’t be understood independently of it.&lt;/p&gt;
&lt;p&gt;We can see this more clearly if we imagine a future in which humanity is extinct and a new intelligent alien species, very different from us—has evolved on Earth. If they were to conduct archaeology and find a knife, isolated from all context, and ask themselves what it was for, it’s unlikely they’d deduce its exact purpose without reference to human existence.&lt;/p&gt;
&lt;p&gt;They might think humans were 20 meters tall and used knives as toothpicks. They could believe it was a musical instrument or even an idol used in rituals. A very clever alien archaeologist might guess that it was used for cutting, but they would never know, independently of &lt;em&gt;Dasein&lt;/em&gt;, exactly &lt;em&gt;what&lt;/em&gt; we cut with it, or the full scope of its meaning and cultural significance. For instance, they wouldn’t know we used it in the “knife game,” where one places the palm on the table and rapidly stabs between the fingers (and how would they, if they don’t even know we &lt;em&gt;had&lt;/em&gt; fingers?).&lt;/p&gt;
&lt;p&gt;This is because a knife’s function isn’t simply what it was designed for in isolation, it includes its associations and uses within the broader context of human life. As Wittgenstein puts it:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;For a large class of cases—though not for all—in which we employ the word &amp;lsquo;meaning&amp;rsquo; it can be defined thus: the meaning of a word is its use in the language.&lt;/p&gt;
&lt;p&gt;~ &lt;em&gt;Philosophical Investigations&lt;/em&gt;, Aphorism 43&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;But this argument can be extended beyond man-made objects. Take &lt;em&gt;consciousness&lt;/em&gt;, for example. One definition of consciousness we might work with is: a thing is conscious if and only if it has a &lt;strong&gt;subjective experience&lt;/strong&gt; of what it means to be.&lt;/p&gt;
&lt;p&gt;This is a lot to unpack, and we need to clarify a few terms, especially &lt;em&gt;subjective&lt;/em&gt; and &lt;em&gt;objective&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;I won’t give strict definitions, but I’ll offer some useful associations. &lt;em&gt;Subjectivity&lt;/em&gt; often refers to situations where multiple different, possibly contradictory views can all be valid. For instance, one person might say, “The Eiffel Tower shines so bright and is so tall—it’s beautiful!” while another says, “It’s just a bunch of steel rods arranged in an awkward way. How ugly.” These views contradict each other, yet we wouldn’t call either person &lt;em&gt;wrong&lt;/em&gt;. Most people agree that aesthetics, what we call “beauty”, is highly subjective (unless you&amp;rsquo;re an aesthetic objectivist).&lt;/p&gt;
&lt;p&gt;Subjectivity also involves perspective. Two people may live through the same day; one might call it a good day, the other a bad one. When we talk about something being &lt;em&gt;subjective&lt;/em&gt;, we are seeing it through the lens of a &lt;em&gt;subject&lt;/em&gt;, that is a conscious being who experiences the world.&lt;/p&gt;
&lt;p&gt;Heidegger uses the term &lt;em&gt;Dasein&lt;/em&gt; instead of “subject,” and his concept is broader, it includes not only the individual’s subjective experience but also their being-in-the-world, their context, history, and possibilities.&lt;/p&gt;
&lt;p&gt;So what does it mean to look at something &lt;em&gt;objectively&lt;/em&gt;? The word “objective” comes from “object”, to look at something as an object is to strip away all subjectivity, all experiential content, and look only at its properties and characteristics as if from a third-person, detached view.&lt;/p&gt;
&lt;p&gt;But this leads us to a problem: if consciousness &lt;em&gt;is&lt;/em&gt; subjective experience, and we try to investigate it objectively (i.e., by removing the very subjectivity that defines it), then we strip away exactly what we set out to understand. In treating consciousness like an object, we remove the subjectivity that makes it what it is. The more we try to push it into the realm of objectivity, the more we lose the essence of what we’re investigating.&lt;/p&gt;
&lt;p&gt;We can think of subjectivity and objectivity not as binary categories but as points on a spectrum. The further we move toward objectivity, the more we risk losing the subjective essence of certain things.&lt;/p&gt;
&lt;p&gt;So just as we cannot understand the meaning or function of a knife apart from &lt;em&gt;Dasein&lt;/em&gt;, we also cannot understand the meaning or purpose of consciousness if we abstract it from its foundation: human existence.&lt;/p&gt;
&lt;p&gt;This leads to a profound implication: If we investigate the world and our lives purely through the subject-object lens, we will not find meaning or purpose. Only through &lt;em&gt;Dasein&lt;/em&gt;: through subjective, lived experience, embedded in culture, language, and context, does meaning emerge.&lt;/p&gt;
&lt;p&gt;Which leads us to the conclusion:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;The purpose and meaning of something depends on &lt;em&gt;Dasein&lt;/em&gt;.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2 id="why-language-presupposes-human-existence"&gt;Why Language Presupposes Human Existence&lt;/h2&gt;
&lt;p&gt;How does all of this relate back to our simple sentence, &amp;ldquo;The Eiffel Tower is in Paris&amp;rdquo;? If what I have argued so far is true, then &lt;strong&gt;language itself is also given meaning through human existence&lt;/strong&gt;. Human existence (&lt;em&gt;Dasein&lt;/em&gt;) precedes language and defines its purpose.&lt;/p&gt;
&lt;p&gt;That &lt;em&gt;Dasein&lt;/em&gt; comes before language should be fairly uncontroversial. Language did not appear as a unified, top-down system. Rather, it emerged organically from individuals attempting to communicate in diverse cultural contexts. As a result, we have many different languages, shaped by the needs, values, and historical trajectories of different communities. These differences reflect how deeply language is tied to lived experience and subjective interpretation.&lt;/p&gt;
&lt;p&gt;Take, for example, the English word &lt;em&gt;home&lt;/em&gt; and the German word &lt;em&gt;Heimat&lt;/em&gt;. While &lt;em&gt;home&lt;/em&gt; can refer to a physical house or a personal feeling of comfort, &lt;em&gt;Heimat&lt;/em&gt; evokes a deeper sense of cultural belonging and historical rootedness. It is less individualistic and more collective, reflecting a shared identity.&lt;/p&gt;
&lt;p&gt;This difference can partly be traced back to historical context. During the Romantic period, England was already a unified nation, while Germany remained fragmented into many small principalities. Romantic thinkers and poets in Germany, concerned with cultural unification, emphasized &lt;em&gt;Heimat&lt;/em&gt; as a shared concept. This was later amplified by German Idealist philosophers like Fichte, Schelling, and Hegel, who stressed the importance of a shared &lt;em&gt;Geist&lt;/em&gt; (spirit) in cultural life.&lt;/p&gt;
&lt;p&gt;This example shows clearly how the &lt;strong&gt;meaning of language arises from the subjective and historical context of its speakers&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;The influence of &lt;em&gt;Dasein&lt;/em&gt; on language is also evident in more recent developments. Words like “internet” or “computer” only came into use because the corresponding technologies were invented. Interestingly, the word “computer” originally referred to any device capable of computation, including calculators. Today, we reserve the term for desktops or laptops, and calling a simple calculator a “computer” feels outdated or strange. What defines a word’s meaning is its use and that use is shaped by people, by &lt;em&gt;Dasein&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;That language is deeply subjective is also evident in poetry. Some people love certain poets, while others find their work dull or inaccessible. We can analyze a poem through an objective-subjective lens, examining literary devices, meter, symbolism, and cultural references. For example, trochaic meter is often associated with ominous or serious tones due to its falling rhythm, while anapestic meter feels more playful because of its rising rhythm.&lt;/p&gt;
&lt;p&gt;Yet no amount of objective analysis can fully explain what it &lt;em&gt;feels&lt;/em&gt; like to hear or read a particular poem. We might judge a poem as technically poor, full of clichés, awkward phrasing, or misused devices, yet it can still move someone profoundly. Conversely, a technically brilliant poem might leave a reader cold. Why?&lt;/p&gt;
&lt;p&gt;Because pure objectivity strips the poem of its subjective resonance. It ignores how the poem is experienced. Only by considering both the technical structure &lt;em&gt;and&lt;/em&gt; the reader’s response, by embracing the subjectivity of experience, can we explain why a “bad” poem can be loved, and a “good” one disliked.&lt;/p&gt;
&lt;p&gt;Let us now return to our original sentence: &lt;strong&gt;“The Eiffel Tower is in Paris.”&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Even this seemingly objective sentence is deeply shaped by subjectivity. Consider the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;What do we mean by “Paris”?&lt;/strong&gt; Do we mean the administrative city? A broader metropolitan area? A symbolic idea?&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Why choose this phrasing?&lt;/strong&gt; We could have said: “The Eiffel Tower is located in Paris,” or “The Eiffel Tower can be found in France.” Each variation shades meaning slightly differently.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;What is the context of the statement?&lt;/strong&gt; Without additional information, one person might interpret it as a factual assertion, while another might hear it as an invitation to visit Paris.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The subjectivity here operates in at least two ways:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Choice in how the statement is expressed&lt;/strong&gt;: The speaker could have chosen other words or constructions to communicate the same basic idea.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Interpretation by the listener&lt;/strong&gt;: Different people may understand or respond to the statement differently, depending on context.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;And both these layers, the expression and the interpretation, are deeply rooted in &lt;em&gt;Dasein&lt;/em&gt;, in lived human experience.&lt;/p&gt;
&lt;h2 id="criticism-arent-you-overcomplicating-things"&gt;Criticism: “Aren’t You Overcomplicating Things?”&lt;/h2&gt;
&lt;p&gt;One might object that this whole discussion is needlessly complicated. Why not simply accept that the statement &lt;em&gt;“The Eiffel Tower is in Paris”&lt;/em&gt; means exactly what it says? It’s a clear, factual statement that any sane person would agree with. Why drag subjectivity into it?&lt;/p&gt;
&lt;p&gt;I want to address this objection in two ways.&lt;/p&gt;
&lt;h3 id="complexity-is-not-inherently-a-flaw"&gt;Complexity Is Not Inherently a Flaw&lt;/h3&gt;
&lt;p&gt;To argue that a theory is wrong simply because it is “too complicated” is not, by itself, a valid criticism. Nature is often far more complex than our intuitions would prefer. Take, for example, gravity: Newton’s model is simple and elegant, but ultimately incomplete. Einstein’s general theory of relativity, although far more complex, involving curved space-time and complex calculus, offers a deeper and more accurate explanation. Complexity, in itself, does not falsify a theory; sometimes, complexity is required to reflect how things actually are.&lt;/p&gt;
&lt;h3 id="parsimony-vs-explanatory-power"&gt;Parsimony vs. Explanatory Power&lt;/h3&gt;
&lt;p&gt;If we take the objection more seriously, it likely appeals to the &lt;em&gt;principle of parsimony&lt;/em&gt; (also known as Occam’s Razor), which suggests that, all else being equal, the simpler theory is preferable. This is a reasonable heuristic, but only &lt;strong&gt;when all else is truly equal&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;In this case, the more complex, subjectivist account offers &lt;strong&gt;greater explanatory power&lt;/strong&gt;. That is, it explains phenomena that a purely objective model cannot, especially the ambiguity, flexibility, and context-dependence inherent in how we use language.&lt;/p&gt;
&lt;p&gt;Recall the earlier example of poetry: If language were purely objective, we would be unable to explain why a technically well-crafted poem can be experienced as dull, while a structurally “weaker” poem can move someone deeply. This discrepancy is only understandable when we acknowledge the subjective component of linguistic meaning. The same logic applies, albeit to a lesser extent, even to factual, seeming sentences like “The Eiffel Tower is in Paris.” As I argued earlier, the &lt;strong&gt;formulation&lt;/strong&gt;, &lt;strong&gt;interpretation&lt;/strong&gt;, and &lt;strong&gt;context&lt;/strong&gt; of such a sentence involve human choices and human experience i.e. Dasein.&lt;/p&gt;
&lt;h3 id="the-fregean-distinction-sense-and-reference"&gt;The Fregean Distinction: Sense and Reference&lt;/h3&gt;
&lt;p&gt;Another important objection invokes the distinction from Frege’s classic essay &lt;em&gt;On Sense and Reference&lt;/em&gt;. According to Frege, we can distinguish between:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The &lt;strong&gt;sense&lt;/strong&gt; (&lt;em&gt;Sinn&lt;/em&gt;) of a sentence — how the sentence presents its meaning, and&lt;/li&gt;
&lt;li&gt;The &lt;strong&gt;reference&lt;/strong&gt; (&lt;em&gt;Bedeutung&lt;/em&gt;) — the actual object or fact the sentence is about.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;In the case of “The Eiffel Tower is in Paris,” the &lt;strong&gt;sense&lt;/strong&gt; can vary: we could say “The Eiffel Tower is located in France” or “The Eiffel Tower stands in the 7th arrondissement,” each emphasizing a different framing or nuance. These variations are clearly influenced by context, perspective, and intention, i.e. subjective elements.&lt;/p&gt;
&lt;p&gt;But what about the &lt;strong&gt;reference&lt;/strong&gt;? The referential object, the actual physical situation, seems at first glance, to be purely objective: the Eiffel Tower either is or is not in Paris. This appears to leave no room for subjectivity.&lt;/p&gt;
&lt;p&gt;And yet, I argue that &lt;strong&gt;even this reference level is not free from subject-dependence&lt;/strong&gt;.&lt;/p&gt;












&lt;figure style="display: block; margin: 0 auto; width: 70%; "&gt;
 &lt;img
 src="https://monkemanx.github.io/attachments/1730644714686.jpg"
 loading="lazy"
 width=""
 height=""
 alt="Image"
 style="display: block; width: 100%; height: 100%; object-fit: contain; "
 &gt;
 
&lt;/figure&gt;

&lt;h2 id="why-space-is-not-objective"&gt;Why “Space” Is Not Objective&lt;/h2&gt;
&lt;p&gt;Our fundamental question now is: &lt;strong&gt;Is the matter of fact (not the sentence) “The Eiffel Tower is in Paris” dependent on Dasein, on human existence?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;To that, I would answer: &lt;strong&gt;yes&lt;/strong&gt;. Concepts like “Eiffel Tower,” “Paris,” “is in,” and even “location” all presuppose a world in which &lt;em&gt;places&lt;/em&gt;, &lt;em&gt;landmarks&lt;/em&gt;, and &lt;em&gt;spatial relations&lt;/em&gt; already make sense. But this &lt;em&gt;world&lt;/em&gt; is not simply “out there”, it is disclosed to us by &lt;em&gt;Dasein&lt;/em&gt;. That is, it appears meaningfully only through the lived experience of human beings.&lt;/p&gt;
&lt;p&gt;When we say “is in,” we are not describing a neutral, mathematical spatial relation. The phrase carries &lt;strong&gt;pragmatic, embodied, and lived meanings&lt;/strong&gt;: how we name things, how we orient ourselves in space, and most importantly, how we &lt;strong&gt;navigate&lt;/strong&gt; and &lt;strong&gt;inhabit&lt;/strong&gt; space.&lt;/p&gt;
&lt;p&gt;Now imagine an alien species radically different from us, not only in appearance, but in sensory apparatus, internal structure, and existential mode. Perhaps they perceive the world through smell, magnetic fields, or air pressure gradients. Maybe they’re not even three-dimensional, or exist as distributed cosmic network, a kind of non-localized, fluid presence that doesn’t recognize “here” and “there” in any meaningful way.&lt;/p&gt;
&lt;p&gt;For such beings, the very concept of “Paris” might not exist. Nor would “Eiffel Tower.” Even the relation “is in” might be meaningless. Perhaps their entire spatial logic is topological instead, totally alien to us.&lt;/p&gt;
&lt;p&gt;If a member of this species were to say, “The Eiffel Tower is &lt;em&gt;not&lt;/em&gt; in Paris,” while we say, “It &lt;em&gt;is&lt;/em&gt;,” we wouldn’t necessarily say one of us is wrong. Rather, we would recognize that their &lt;strong&gt;mode of being&lt;/strong&gt;, their &lt;em&gt;Dasein&lt;/em&gt;, discloses a different world. The meaning of “is in” depends on the existential structure of the being using it. &lt;strong&gt;Space&lt;/strong&gt;, then, is not an absolute container, but something interpreted and understood from within a particular mode of existence.&lt;/p&gt;
&lt;p&gt;What matters here is not whether such aliens actually exist, but that we can imagine them coherently. This shows that &lt;strong&gt;there are multiple reasonable ways&lt;/strong&gt; in which the concept “The Eiffel Tower is in Paris” might be valid or not. If a concept can be viewed from multiple intelligible perspectives, then it cannot be purely objective, it must have a &lt;strong&gt;subjective&lt;/strong&gt; dimension.&lt;/p&gt;
&lt;p&gt;To bring this closer to home, consider the idea of &lt;strong&gt;reason&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;Imagine trying to explain human-style reasoning to a single ant. Would it understand “reasoning” as we do? Unlikely. Ants operate within &lt;strong&gt;swarm intelligence&lt;/strong&gt;. What we define as reason, autonomous deliberation, self-reflection, logical inference, is not part of the ant’s world. Its “rationality” is embedded in pheromone trails, local responsiveness, and collective behavior. Its “goals” are inseparable from the structure of the colony.&lt;/p&gt;
&lt;p&gt;But this does not make the ant wrong and us right, it simply reveals a different mode of being. Trying to teach an ant about Maths or deductive logic would be like teaching a dog to use a knife and fork for eating. Reason, then, like space, is &lt;strong&gt;not a universal standard&lt;/strong&gt;. It is shaped by the kind of being that is doing the reasoning.&lt;/p&gt;
&lt;p&gt;So just as reason is grounded in &lt;em&gt;Dasein&lt;/em&gt;, so too are spatial relations. There is no neutral, God’s eye view from which to assess what space “really” is. No disembodied place from which to say definitively whether a tower is “in” a city.&lt;/p&gt;
&lt;p&gt;Thus, even the matter of fact “The Eiffel Tower is in Paris” is dependent on &lt;strong&gt;our human mode of being&lt;/strong&gt;, on our way of perceiving, naming, navigating, and disclosing the world. There are no facts outside of a &lt;em&gt;world&lt;/em&gt;, and there is no world that is not already for a &lt;em&gt;whom&lt;/em&gt;—a being for whom things appear meaningfully.&lt;/p&gt;
&lt;h2 id="conclusion"&gt;Conclusion&lt;/h2&gt;
&lt;p&gt;To put it simply: &lt;strong&gt;“The Eiffel Tower is in Paris” seems objective&lt;/strong&gt;, but it only makes sense within a world in which landmarks, places, and spatial relations show up as meaningful. That world is disclosed through *Dasein, through human existence.&lt;/p&gt;
&lt;p&gt;Different kinds of beings, aliens, ants disclose different worlds, in which even concepts like “location” or “fact” may not appear at all. And if what counts as a “fact” depends on the kind of being, then there are no pure matters of fact. There is only &lt;strong&gt;meaning&lt;/strong&gt;, grounded in the structures of the respective being.&lt;/p&gt;












&lt;figure style="display: block; margin: 0 auto; width: 70%; "&gt;
 &lt;img
 src="https://monkemanx.github.io/attachments/1747932875065233.jpg"
 loading="lazy"
 width=""
 height=""
 alt="Image"
 style="display: block; width: 100%; height: 100%; object-fit: contain; "
 &gt;
 
&lt;/figure&gt;
</description></item><item><title>A Commentary on the 9th Sermon of Meister Eckhart</title><link>https://monkemanx.github.io/articles/commentary_9th_sermon_eckhart/</link><pubDate>Fri, 23 May 2025 08:00:00 +0000</pubDate><author>monkeman@cock.li (MonkeMan)</author><guid>https://monkemanx.github.io/articles/commentary_9th_sermon_eckhart/</guid><description>&lt;style&gt;
 .info {
 background-color: #e6f7ff; 
 padding: 15px; 
 border-radius: 5px; 
 margin-bottom: 15px; 
 }

 .info-title {
 font-size: 20px; 
 margin-bottom: 10px; 
 color: #000080; 
 font-weight: bold; 
 }
&lt;/style&gt;

&lt;div class="info"&gt;
 &lt;div class="info-title"&gt;Info&lt;/div&gt;
 &lt;p&gt;&lt;p&gt;I have based this commentary on the original German text as published by &lt;a href="https://en.wikipedia.org/wiki/Reclam"&gt;Reclam&lt;/a&gt;. The translation is my own, created with the assistance of ChatGPT.&lt;/p&gt;
&lt;p&gt;Please note that this is purely my personal interpretation of the sermon. I have no formal training in theology or medieval studies, so my reading should be taken with a grain of salt.&lt;/p&gt;
&lt;p&gt;Finally, I should mention that I am more familiar with the Greek philosophical tradition than with traditional Christian scholarship, and this naturally biases my perspective in that direction.&lt;/p&gt;
&lt;/p&gt;
&lt;/div&gt;

&lt;h2 id="about-meister-eckhart"&gt;About Meister Eckhart&lt;/h2&gt;
&lt;p&gt;&lt;a href="https://en.wikipedia.org/wiki/Meister_Eckhart"&gt;Meister Eckhart&lt;/a&gt; was a 13th-century German theologian, Catholic priest, and member of the &lt;a href="https://en.wikipedia.org/wiki/Dominican_Order"&gt;Dominican Order&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;He is best known for his sermons, which he delivered in German to lay audiences; an unusual choice at a time when Latin was the standard language of the clergy. His sermons are deeply mystical, characterized by rich and often poetic language. Although he was accused of heresy by the Church, many of the charges were later dropped.&lt;/p&gt;
&lt;h2 id="sermon-9"&gt;Sermon 9&lt;/h2&gt;
&lt;div class="primary-text"&gt;
 &amp;ldquo;Like the morning star in the midst of the mist and like the full moon in its days and like the shining sun, so did he shine in the temple of God.&amp;rdquo;
Now I hold on to the last word: &amp;ldquo;temple of God.&amp;rdquo;
What is &amp;ldquo;God,&amp;rdquo; and what is the &amp;ldquo;temple of God&amp;rdquo;?
&lt;/div&gt;

&lt;p&gt;The sermon begins with a quote from the &lt;a href="https://en.wikipedia.org/wiki/Book_of_Sirach"&gt;Book of Sirach&lt;/a&gt; (&lt;a href="https://biblia.com/bible/douayrheims/sirach/50/6-10"&gt;Sirach 50:6&lt;/a&gt;). This book is part of the Catholic Bible but not included in the Protestant canon, so don’t be surprised if you have trouble finding it.&lt;/p&gt;
&lt;p&gt;While the passage in Sirach describes the outward appearance of the high priest Simon, son of Onias, Eckhart reinterprets this imagery. He shifts it from something external to a symbol of the inner life. Simon is no longer simply a historical priest, but becomes a figure for the soul enlightened by God. Likewise, the temple is no longer a physical structure, but a representation of the soul itself. This symbolic transposition will become clearer as the sermon progresses.&lt;/p&gt;
&lt;p&gt;From this point, Eckhart poses the central question that shapes the rest of the sermon: he seeks to uncover the metaphysical reality of God. Who is God, truly?&lt;/p&gt;
&lt;div class="primary-text"&gt;
 &lt;p&gt;Twenty-four masters came together and wanted to speak about what God is. They came at the appointed time, and each presented his statement, of which I now choose two or three.&lt;/p&gt;
&lt;p&gt;The first said: &amp;ldquo;God is something in comparison to which all changeable and temporal things are nothing, and everything that has being is insignificant before Him.&amp;rdquo;
The second said: &amp;ldquo;God is something that necessarily stands above being, that in itself needs nothing, but is needed by all things.&amp;rdquo;
The third said: &amp;ldquo;God is a rationality that lives solely through the knowledge of itself.&amp;rdquo;&lt;/p&gt;

&lt;/div&gt;

&lt;p&gt;Eckhart now gives us three competing definitions of what God could be. The first master definition fits with traditions such as &lt;a href="https://en.wikipedia.org/wiki/Anselm_of_Canterbury"&gt;Anselm&lt;/a&gt;, who defined God as the greatest conceivable being.&lt;/p&gt;
&lt;p&gt;The third master definition is more in line with the concept of the logos, as formulated by Aristotle and the Stoics. Although the Stoic concept of logos is more on the cosmic level, Aristotle’s conception is more fitting, which can be seen through:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Therefore Mind thinks itself, if it is that which is best; and its thinking is a thinking of thinking.&lt;/p&gt;
&lt;p&gt;~ Metaphysics, Book 12, 1074b&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;The second definition is the one Eckhart wants to focus on in his subsequent text. It is clearly inspired by the Neoplatonic thought of &amp;ldquo;The One&amp;rdquo;:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;And all of these up to the Good are beautiful, but &lt;strong&gt;it itself is above&lt;/strong&gt; Beauty and is the transcendent ruler of all that is best, all that is in the intelligible world&lt;/p&gt;
&lt;p&gt;~ Ennead 1.8(51)§1.8.2.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;In Neoplatonic thought, the One is identified with God, and everything stems from it. Every being is dependent on it, while it is necessary and not in need of anything. It overflows purely from its own abundance. Furthermore, all things seek to return to the One, because they yearn for it and need it as their source.&lt;/p&gt;
&lt;div class="primary-text"&gt;
 &lt;p&gt;I set aside the first and the last and speak of the second, which says that God must necessarily stand above being. Whatever has being, time, or place does not reach up to God—He is beyond it. God is in all creatures insofar as they have being, and yet He is beyond them. The very thing He is in all creatures, He is also beyond them; what is one in many things must necessarily be beyond those things.&lt;/p&gt;
&lt;p&gt;Some masters believed that the soul was only in the heart. This is not so, and in this regard great masters have erred. The soul is whole and entire in the foot and entire in the eye and in every single limb.&lt;/p&gt;
&lt;p&gt;If I take a segment of time, it is neither today nor yesterday. But if I take the Now, it encompasses all time within itself. The Now in which God created the world is as close to the present time as the Now in which I am now speaking, and the Last Day is as close to this Now as the day that was yesterday.&lt;/p&gt;

&lt;/div&gt;

&lt;p&gt;Eckhart states: &lt;em&gt;&amp;ldquo;He is in all creatures, He is also beyond them;&amp;rdquo;&lt;/em&gt;, what does he mean by that?&lt;/p&gt;
&lt;p&gt;Eckhart believes that God is fundamentally different from everything else that exists. Asking questions like &amp;ldquo;Where does God exist?&amp;rdquo; (Place) or &amp;ldquo;Did God always exist?&amp;rdquo; (Time) doesn’t make any sense. It&amp;rsquo;s like asking, &lt;em&gt;&amp;ldquo;Is the number four blue?&amp;rdquo;&lt;/em&gt; — a &lt;a href="https://en.wikipedia.org/wiki/Category_mistake"&gt;category error&lt;/a&gt;. Just as numbers and colors belong to different categories, so too do God, time, and space. God is beyond all of them.&lt;/p&gt;
&lt;p&gt;At the same time, Eckhart also believes that God is within everything. This again echoes the Neoplatonic notion of &lt;em&gt;The One&lt;/em&gt;, where God is like a concentrated force from which everything else emanates. Like a fountain overflowing with water, God overflows and produces creation. Because creation comes from God, it is part of Him. All created things contain a spark of divinity simply by the nature of how they came into existence. This is why Eckhart says &lt;em&gt;&amp;ldquo;The soul is whole and entire&amp;hellip;&amp;rdquo;&lt;/em&gt;, here &amp;ldquo;soul&amp;rdquo; refers to the divine spark. It is not located in any particular place but is in everything. The soul’s essence is indivisible and unconfined by space.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;How, then, do they[the intelligible world] arise out of aimple One? [&amp;hellip;]&lt;/p&gt;
&lt;p&gt;In fact, it is because there was nothing in that that all things come from it, and, in order that Being should exist, it is not Being but the gernarot of it. [&amp;hellip;]&lt;/p&gt;
&lt;p&gt;All these things are the One and not the one; they are the one, because they are from it; they are not the One, becaue it endowed them with what they are while remaining by itself.&amp;quot;&lt;/p&gt;
&lt;p&gt;~ Ennead 5.2(11)&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;A similar notion appears in the work of Paul Tillich, who speaks of God as the &lt;em&gt;Grund&lt;/em&gt; (ground) of being, that which makes existence possible in the first place. God is &lt;strong&gt;becoming&lt;/strong&gt;, the power by which something arises from nothing. He gives creation the ability to resist non-being, and through that, becomes part of it.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;The being of God is being-itself. The being of God cannot be understood as the existence of a being alongside others or above others. If God is a being, he is subject to the categories of finitude, especially to space and substance. Even if he is called the “highest being” in the sense of the “most perfect” and the “most powerful” being, this situation is not changed. [&amp;hellip;]&lt;/p&gt;
&lt;p&gt;Many confusions in the doctrine of God and many apologetic weaknesses could be avoided if God were understood first of all as being-itself or as the ground of being. [&amp;hellip;]&lt;/p&gt;
&lt;p&gt;Therefore, instead of saying that God is first of all being-itself, it is possible to say that he is the power of being in everything and above everything, the infinite power of being.&lt;/p&gt;
&lt;p&gt;~ Paul Tillich, Systematic Theology, Vol 1, Part 2, Chapter 2, B3a)&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Lastly, Eckhart’s treatment of time serves to clarify that God is also beyond temporality. God&amp;rsquo;s act of creation is not merely a past event, it is something eternally present. God&amp;rsquo;s “Now” encompasses past, present, and future simultaneously.&lt;/p&gt;
&lt;div class="primary-text"&gt;
 &lt;p&gt;A master says: &amp;ldquo;God is something that acts in eternity, undivided in itself, that needs no one&amp;rsquo;s help nor any tool, and remains in itself; that needs nothing, yet is needed by all things and to which all things strive as to their ultimate goal.&amp;rdquo;
This goal has no manner—it grows out of manner and expands beyond it.
Saint Bernard says: &amp;ldquo;To love God is manner without manner.&amp;rdquo;&lt;/p&gt;
&lt;p&gt;A physician who wants to heal a sick person has no fixed manner of health in mind, no specific degree to which he wants to make the person well. He certainly has a method by which he wants to heal him, but how healthy he wants to make him—that is without manner: as healthy as he possibly can.&lt;/p&gt;
&lt;p&gt;How much we should love God is subject to no fixed manner; as much as we are able to—that is without manner.&lt;/p&gt;

&lt;/div&gt;

&lt;p&gt;The idea of God as &lt;em&gt;“that toward which all things strive as to their ultimate goal”&lt;/em&gt; is a classical Greek doctrine echoed by thinkers like Aristotle, who speaks of God as the &lt;em&gt;prime mover&lt;/em&gt;: the first in a chain of causal events in his &lt;a href="https://en.wikipedia.org/wiki/Unmoved_mover"&gt;unmoved mover argument&lt;/a&gt;. This concept also appears in Neoplatonism, particularly in Plotinus, who sees the soul as yearning to return to &lt;em&gt;the One&lt;/em&gt;. This idea is deeply connected to Eckhart’s notion of love for God.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;The soul in its nature loves God and longs to be at one with Him in the noble love of a daughter for a noble father; but coming to human birth and lured by the courtships of this sphere, she takes up with another love, a mortal, leaves her father and falls.&lt;/p&gt;
&lt;p&gt;But one day coming to hate her shame, she puts away the evil of earth, once more seeks the father, and finds her peace.&lt;/p&gt;
&lt;p&gt;~ Enneads VI, 6.9(09), §6.9.9&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Eckhart does not merely repeat these ideas but adapts them within a Christian framework, in line with theologians like St. Augustine. Consider this famous line from &lt;em&gt;Confessions&lt;/em&gt;:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;O Lord, and our heart is restless until it rests in you.&lt;/p&gt;
&lt;p&gt;~ Confessions&lt;/p&gt;
&lt;/blockquote&gt;
&lt;div class="primary-text"&gt;
 &lt;p&gt;Every thing acts according to its being; no thing is capable of acting beyond its being. Fire cannot act outside of wood. God, however, acts beyond being, into the expanse, wherever He is able to move Himself: He acts in non-being. Before there was being, God was already acting. He brought about being when there was no being yet.&lt;/p&gt;
&lt;p&gt;Crude-minded masters say that God is pure being. But He stands as far above being as the highest angel is above a gnat! I would be speaking falsely if I were to call God a being—just as if I were to call the sun pale or black. God is neither this nor that.&lt;/p&gt;
&lt;p&gt;And a master says: whoever thinks he has known God—even if he has recognized something—has not recognized God.&lt;/p&gt;
&lt;p&gt;However, when I have said that God is not a being, but rather beyond being, I have not thereby denied Him being; on the contrary: I have exalted it in Him. If I perceive copper in gold, then it is present, and it is present in a higher way than it is in itself.&lt;/p&gt;
&lt;p&gt;Saint Augustine says: &amp;ldquo;God is wise without wisdom, good without goodness, mighty without might.&amp;rdquo;&lt;/p&gt;

&lt;/div&gt;

&lt;p&gt;This again goes back to the notion that calling God a &lt;em&gt;being&lt;/em&gt; is a category error. Eckhart criticizes theologians like Thomas Aquinas, who famously refers to God as &lt;strong&gt;being itself&lt;/strong&gt; with the phrase:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Ostensum est autem supra, cum de divina simplicitate ageretur, quod Deus est &lt;strong&gt;ipsum esse per se subsistens&lt;/strong&gt;.
(It has been shown above, when treating of the divine simplicity, that &lt;strong&gt;God is being itself subsisting&lt;/strong&gt;.)&lt;/p&gt;
&lt;p&gt;~ Summa Theologiae, Prima Pars, Question 44, Article 1&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;By prescribing certain properties to God, we also limit His power. For example, if we say a table is made of wood, then it cannot be made of stone. Similarly, if we say God is a being, or even &lt;em&gt;being itself&lt;/em&gt;, then God is bound by the restrictions that apply to beings. Another example of a category error is saying “call the sun pale or black.” One I prefer is: &lt;em&gt;“Music is delicious.”&lt;/em&gt; We can say music is like a delicious meal, but music is not edible and therefore not delicious. Calling it that would be a category error—a meaningless statement that does not make sense. For more on this, see my article on the &lt;a href="https://monkemanx.github.io/articles/ontological_argument_and_apophatic_theology/#43-limitation-of-god"&gt;Ontological Argument&lt;/a&gt;, where I discuss this topic further.&lt;/p&gt;
&lt;p&gt;The second part of this section is that just because I can’t say God &lt;em&gt;is&lt;/em&gt; a being or &lt;em&gt;is&lt;/em&gt; wise, it does not mean I lessen Him or put Him down. In fact, the opposite is true: by saying God &lt;em&gt;is&lt;/em&gt; wise or a being, I place God in the same category as humans, but He is far beyond us. Thus, we cannot describe God in human concepts.&lt;/p&gt;
&lt;p&gt;That is not to say we cannot talk about God. But just like Eckhart says, when we describe God using human concepts like &lt;em&gt;Good&lt;/em&gt; or &lt;em&gt;Wise&lt;/em&gt;, what we do is not state how God really is, but rather use metaphors that attempt to approximate Him—much like saying &lt;em&gt;“music is delicious.”&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;However, Eckhart thinks we can only truly approach God through &lt;strong&gt;negative theology&lt;/strong&gt; by describing what God &lt;em&gt;is not&lt;/em&gt;. For example, God is not being; He is beyond it. God is not wise; He is beyond wisdom.&lt;/p&gt;
&lt;div class="primary-text"&gt;
 &lt;p&gt;Lesser masters teach in schools that all beings are divided into ten modes of being, and they deny all of these to God. None of these modes touches God, yet He lacks none of them either.&lt;/p&gt;
&lt;p&gt;The first, which possesses the most being and from which all things receive their being, is substance; and the last, which contains the least being, is called relation. And this relation is equal in God—the Greatest One, who possesses the most being. They all share the same archetype in God. In God, the archetypes of all things are equal; but they are archetypes of unequal things. The highest angel, the soul, and the gnat all have the same archetype in God.&lt;/p&gt;
&lt;p&gt;God is neither goodness nor being. Goodness adheres to being and is no broader than being; for if there were no being, there would be no goodness, and being is purer still than goodness.&lt;/p&gt;
&lt;p&gt;God is neither good nor better nor best of all. Whoever says that God is good does Him as much injustice as one who would call the sun black.&lt;/p&gt;

&lt;/div&gt;

&lt;p&gt;The &lt;em&gt;ten modes of being&lt;/em&gt; refer to Aristotle’s &lt;a href="https://stgb.substack.com/p/aristotles-ten-categories-of-being"&gt;categories&lt;/a&gt;, which were later adapted by scholastic thinkers like Aquinas:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Of things said without any combination, each signifies either &lt;strong&gt;substance&lt;/strong&gt; or &lt;strong&gt;quantity&lt;/strong&gt; or &lt;strong&gt;qualification&lt;/strong&gt; or a &lt;strong&gt;relative&lt;/strong&gt; or &lt;strong&gt;where&lt;/strong&gt; or &lt;strong&gt;when&lt;/strong&gt; or &lt;strong&gt;being-in-a-position&lt;/strong&gt; or &lt;strong&gt;having&lt;/strong&gt; or &lt;strong&gt;doing&lt;/strong&gt; or &lt;strong&gt;being-affected&lt;/strong&gt;. To give a rough idea, examples of &lt;em&gt;substance&lt;/em&gt; are man, horse; of &lt;em&gt;quantity:&lt;/em&gt; four-foot, five-foot; of &lt;em&gt;qualification:&lt;/em&gt; white, grammatical; of a &lt;em&gt;relative:&lt;/em&gt; double, half, larger; of &lt;em&gt;where:&lt;/em&gt; in the Lyceum, in the market-place; of &lt;em&gt;when:&lt;/em&gt; yesterday, last-year; of &lt;em&gt;being-in-a-position:&lt;/em&gt; is-lying, is-sitting; of &lt;em&gt;having:&lt;/em&gt; has-shoes-on, has-armour-on; of &lt;em&gt;doing:&lt;/em&gt; cutting, burning; of &lt;em&gt;being-affected:&lt;/em&gt; being-cut, being-burned.&lt;/p&gt;
&lt;p&gt;~ Organon, Categories, 1b25–2a4&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;All these categories, used in the scholastic tradition to describe everything from apples and chairs to morality and love, simply do &lt;strong&gt;not&lt;/strong&gt; apply to God. We cannot say God &lt;em&gt;has&lt;/em&gt; them, nor can we say God &lt;em&gt;lacks&lt;/em&gt; them. As Eckhart puts it: &lt;em&gt;&amp;ldquo;None of these modes touches God, yet He lacks none of them either.&amp;rdquo;&lt;/em&gt; God is beyond these categories.&lt;/p&gt;
&lt;p&gt;When Eckhart speaks about &lt;em&gt;archetypes&lt;/em&gt;, he means these kinds of Platonic ideas, abstract concepts we derive by stepping back from particular everyday objects to something more general. For example, there are many different apples, but all share the same archetype or Platonic idea of “apple.”&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Well then, here are three beds: one existing in nature, which is made by God, as I think that we may say&amp;ndash;for no one else can be the maker?&lt;/p&gt;
&lt;p&gt;No.&lt;/p&gt;
&lt;p&gt;There is another which is the work of the carpenter?&lt;/p&gt;
&lt;p&gt;Yes.&lt;/p&gt;
&lt;p&gt;And the work of the painter is a third?&lt;/p&gt;
&lt;p&gt;Yes.&lt;/p&gt;
&lt;p&gt;Beds, then, are of three kinds, and there are three artists who superintend them: God, the maker of the bed, and the painter?&lt;/p&gt;
&lt;p&gt;Yes, there are three of them. [&amp;hellip;]&lt;/p&gt;
&lt;p&gt;God knew this, and He desired to be the real maker of a real bed, not a particular maker of a particular bed, and therefore He created a bed which is &lt;strong&gt;essentially and by nature one only&lt;/strong&gt; [The Form].&lt;/p&gt;
&lt;p&gt;~ Republic, Book 10, 597b–598d&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;When Eckhart says that this archetype is shared &lt;em&gt;in&lt;/em&gt; God, he means that these general ideas behind everyday objects come from God—the Platonic ideals reside in God.&lt;/p&gt;
&lt;p&gt;Furthermore, there is no hierarchical difference between creatures from God’s perspective: a gnat or an ant is the same as an angel. It doesn’t matter whether it is an ant or an angel—both belong to this world, part of being—but only God is beyond that. In that sense, an ant or an angel are the same to Him.&lt;/p&gt;
&lt;p&gt;Just as we cannot ascribe modes of being to God, we also cannot ascribe &lt;em&gt;goodness&lt;/em&gt; to Him, since goodness is a property or predicate that arises &lt;em&gt;from&lt;/em&gt; beings. But God transcends being, and thus also transcends goodness.&lt;/p&gt;
&lt;p&gt;Therefore, if we say God &lt;em&gt;is&lt;/em&gt; good, we insult Him, because we pull Him down to the level of ants and angels. Saying &lt;em&gt;“God is good”&lt;/em&gt; is as wrong as saying &lt;em&gt;“the sun is black.”&lt;/em&gt;&lt;/p&gt;
&lt;div class="primary-text"&gt;
 &lt;p&gt;Yet God Himself says: “No one is good except God alone.” (Mark 10:18)
What is good? That which communicates itself. We call a person good who is sociable and beneficial. That is why a pagan master says: “A hermit is neither good nor evil in this sense, for he is neither sociable nor useful.”&lt;/p&gt;
&lt;p&gt;God is the most self-communicating of all. No thing communicates from its own essence, for all creatures are nothing in and of themselves. What they communicate, they have received from another. They also do not give themselves. The sun gives its light and yet remains where it is; fire gives its heat and yet remains fire. But God communicates what is His own, because He is what He is from Himself, and in all the gifts He gives, He first gives Himself.&lt;/p&gt;
&lt;p&gt;He gives Himself as God, as He is, in all His gifts—according to the capacity of the one who is able to receive Him.&lt;/p&gt;
&lt;p&gt;Saint James says: “Every good gift is from above, coming down from the Father of lights.” (James 1:17)&lt;/p&gt;

&lt;/div&gt;

&lt;p&gt;Here, Eckhart addresses a deep theological question:
&lt;strong&gt;If God is truly beyond all being and beyond all categories, including goodness, why does scripture call God “good”?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;To answer this, Eckhart links goodness to &lt;strong&gt;self-communication&lt;/strong&gt;. He argues that something is called “good” when it &lt;em&gt;gives of itself&lt;/em&gt; or &lt;em&gt;interacts benevolently with others&lt;/em&gt;. This makes sense when we consider the etymology of “morality”, which comes from the Latin &lt;em&gt;moralis&lt;/em&gt;, meaning something like &lt;em&gt;pertaining to manners or conduct&lt;/em&gt;—that is, how one acts toward others. So: if goodness is a kind of relational behavior, how can someone be “good” in complete isolation?&lt;/p&gt;
&lt;p&gt;This is why God is the &lt;strong&gt;ultimate form of goodness&lt;/strong&gt;:&lt;/p&gt;
&lt;p&gt;&lt;em&gt;God is the most self-communicating of all.&lt;/em&gt;
All things come from Him. Everything we share or give to others ultimately has its origin in God. And unlike us, whose giving is separate from our essence (I can give without &lt;em&gt;being&lt;/em&gt; the gift), God’s essence &lt;em&gt;is&lt;/em&gt; the act of giving itself.&lt;/p&gt;
&lt;p&gt;So in this sense, we humans can &lt;em&gt;have&lt;/em&gt; goodness as a quality or attribute, while God &lt;em&gt;is&lt;/em&gt; goodness itself—&lt;em&gt;not as a moral quality, but as infinite self-giving being&lt;/em&gt;.
At first glance, this seems to contradict Eckhart’s earlier claim that God is beyond all categories, including goodness. But Eckhart would say: *&lt;em&gt;his contradiction is not a flaw—it is the point&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;There are two reasons why this contradiction is essential:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Mysticism thrives on paradox&lt;/strong&gt;. When we reach the limits of what language and logic can express, we begin to touch the divine. Only where language fails, where it breaks apart in contradiction, do we start to approach God, who is beyond all form, word, and concept.&lt;/li&gt;
&lt;li&gt;When we say &lt;strong&gt;“God is goodness,”&lt;/strong&gt; we do not mean He fits within our usual human category of goodness. Instead, we mean &lt;strong&gt;He is the source from which all real goodness flows&lt;/strong&gt;.
This is where the analogy helps:&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Ice is a form of water, but water is beyond ice: it can be solid, liquid, or gas.
In this way, &lt;em&gt;goodness is like ice&lt;/em&gt;, and &lt;em&gt;God is like water&lt;/em&gt;. Goodness &lt;em&gt;emerges from&lt;/em&gt; God but does not exhaust what God is. God is the source and ground of all goodness, without being &lt;em&gt;limited&lt;/em&gt; to it.&lt;/p&gt;
&lt;div class="primary-text"&gt;
 &lt;p&gt;When we grasp God in being, we grasp Him in His courtyard, for being is His courtyard in which He dwells. But where is He then in His temple, in which He appears as holy? Rationality is the temple of God. Nowhere does God dwell more truly than in His temple—in rationality, as that other master said: God is a rationality that lives solely in the knowledge of itself, remaining alone in itself, where nothing has ever touched Him, for He alone is there in His stillness.&lt;/p&gt;
&lt;p&gt;God, in the knowledge of Himself, knows Himself in Himself.&lt;/p&gt;

&lt;/div&gt;

&lt;p&gt;Here we use a spatial metaphor to differentiate between two levels of understanding God:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Courtyard:&lt;/strong&gt; We are near the house of God but not inside it, a superficial and indirect knowledge of God. We do not know His true essence.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;The Temple:&lt;/strong&gt; We are inside God’s house, representing a more intimate knowledge of God.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;The first understanding, the &lt;em&gt;courtyard&lt;/em&gt;, is how God appears to us through His &lt;strong&gt;works&lt;/strong&gt;, that is through Scripture (the Bible) and His Creation (nature), which we observe every day. In short, it is knowledge gained through outward experience.&lt;/p&gt;
&lt;p&gt;The second, more intimate understanding of God is &lt;em&gt;in rationality&lt;/em&gt;. Here, &lt;em&gt;rationality&lt;/em&gt; does &lt;strong&gt;not&lt;/strong&gt; mean the kind of logical, argumentative, syllogistic thinking typical of analytic philosophy (e.g., statements like 1 + 1 = 2). Instead, it refers to deep contemplation and mystical experience—shifting from looking outward to looking inward. Think more in line with continental philosophers: rather than harsh logical statements, the truth is found in poetry, music, and beauty. It is a truth more &lt;em&gt;felt&lt;/em&gt; and &lt;em&gt;experienced immediately&lt;/em&gt; than deduced.&lt;/p&gt;
&lt;p&gt;This rationality is not obtained through outward looking but by turning inward in solitude, “remaining alone in itself”, and stillness, “is there in His stillness.”&lt;/p&gt;
&lt;p&gt;The final sentence is tautological, that is, true by definition. This is no accident. It portrays God as completely self-referential and utterly closed to all external grasping—a paradoxical God who is also open, because we can draw near to Him through this self-referential stillness in solitude.&lt;/p&gt;
&lt;div class="primary-text"&gt;
 &lt;p&gt;Now let us consider [cognition] in the soul, which possesses a tiny drop of rationality, a little spark, a small branch. The soul has powers that operate within the body.&lt;/p&gt;
&lt;p&gt;There is one power through which a person digests; this works more at night than during the day—through it a person grows and gains strength. The soul also has a power in the eye, through which the eye is so sensitive and fine that it does not perceive things in their rawness as they are in themselves; rather, they must first be filtered and refined through the air and the light. This is because the eye has the soul with it.&lt;/p&gt;
&lt;p&gt;Another power is in the soul, with which it remembers. This power forms within itself images of things that are not present, so that I recognize these things just as well as if I were seeing them with my eyes—indeed, even better. I can easily imagine a rose in winter. And with this power the soul operates in non-being, and in doing so it follows God, who also works in non-being.&lt;/p&gt;

&lt;/div&gt;

&lt;p&gt;Building on the theme of rationality and deep contemplation, at the very core of our being, our soul—there is a spark of divinity given by God.
This divinity cannot be &lt;em&gt;seen&lt;/em&gt; with our ordinary eyes, the ones we use to perceive everyday objects like chairs, trees, or other people. Instead, to &lt;em&gt;see&lt;/em&gt; this divinity, we must use our soul and look inward through exhaustive meditation. This divinity is hidden and quiet, “active more at night than by day.”&lt;/p&gt;
&lt;p&gt;This idea of an inner divine spark goes back to the Greeks, such as the Stoics:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;God is near you, he is with you, he is within you. This is what I mean, Lucilius: a holy spirit indwells within us, one who marks our good and bad deeds, and is our guardian.&lt;/p&gt;
&lt;p&gt;~ Seneca, Letter XLI: &amp;ldquo;On the God Within Us&amp;rdquo;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Additionally, our soul has the power to remember. Here, &lt;em&gt;see&lt;/em&gt; means the inward perception described above, not ordinary sight. When we see divinity inwardly, we also recognize it as such. This reminds of Plato’s dialogue &lt;em&gt;Meno&lt;/em&gt;, where he argues that knowledge is nothing other than the soul recalling what it has forgotten:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;The soul, then, as being immortal, and having been born again many times, and having seen all things that exist, whether in this world or in the world below, has knowledge of them all; and it is no wonder that she should be able to call to remembrance all that she ever knew about virtue, and about everything; for as all nature is akin, and the soul has learned all things; there is no difficulty in her eliciting or as men say learning, out of a single recollection all the rest, if a man is strenuous and does not faint; for all enquiry and all learning is but recollection&amp;quot;&lt;/p&gt;
&lt;p&gt;~ Meno, 81d&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;But the power Eckhart describes with &lt;em&gt;remembering&lt;/em&gt; goes beyond simple recalling. It is a power to create, to reach into non-being and possibility. It enacts what God does and thus moves beyond what exists. In doing so, it comes closer to God, who Himself is beyond all that exists.&lt;/p&gt;
&lt;div class="primary-text"&gt;
 &lt;p&gt;A pagan master says: “The soul that loves God grasps Him under the veil of goodness.”
All of what has been mentioned so far are still the words of pagan masters; they recognized nothing except by the natural light. I have not yet reached the words of the holy masters, who recognized in a much higher light.&lt;/p&gt;
&lt;p&gt;This one says: “The soul that loves God, loves Him under the veil of goodness.”
Rationality strips away from God the veil of goodness and grasps Him bare, where He is stripped of goodness, of being, and of all names.&lt;/p&gt;

&lt;/div&gt;

&lt;p&gt;It is a mistake to try to understand God through human notions of goodness, to “grasp Him under the veil of goodness.” When we impose our limited, human concepts on God, we inevitably fail to see Him as He truly is. This is the stance of a &amp;ldquo;Pagan Master.&amp;rdquo;&lt;/p&gt;
&lt;p&gt;True knowledge of God does not come from conceptualizing or defining Him within familiar categories. Instead, it arises when we love God despite our inability to fully comprehend Him.&lt;/p&gt;
&lt;p&gt;Only by suspending all preconceived knowledge and concepts—letting go of what we think we know, and turning inward to the depths of our own being can we begin to encounter God in His true essence. Then, and only then, can we be called a &amp;ldquo;Holy Master.&amp;rdquo;&lt;/p&gt;
&lt;div class="primary-text"&gt;
 &lt;p&gt;I said in school that rationality is nobler than will, and yet both belong to this [higher] light. But a master in another school said that will is nobler than rationality, because will takes things as they are in themselves, whereas rationality takes things as they are in itself. This is true. An eye is nobler in itself than an eye painted on a wall.&lt;/p&gt;
&lt;p&gt;But I say that rationality is nobler than will. Will takes God under the garment of goodness. Rationality takes God bare, as He is stripped of goodness and of being. Goodness is a garment under which God is hidden, and will takes God under the garment of goodness. If there were no goodness in God, my will would not desire Him.&lt;/p&gt;
&lt;p&gt;Whoever were to clothe a king on the day of his coronation in gray garments would not have dressed him fittingly. I am not blessed because God is good. I never want to desire that God bless me through His goodness, for He would not be able to do so. I am blessed solely because God is rational and I recognize this.&lt;/p&gt;
&lt;p&gt;A master says: “It is God’s rationality on which the being of the angel wholly depends.”
One might ask where the being of an image truly resides: in the mirror or in that from which it proceeds. It resides more truly in that from which it proceeds. The image is in me, from me, and toward me. As long as the mirror stands unchanged before my face, my image remains in it; if the mirror falls, the image vanishes.&lt;/p&gt;
&lt;p&gt;The being of the angel depends on the presence of divine rationality, in which he recognizes himself.&lt;/p&gt;

&lt;/div&gt;

&lt;p&gt;Eckhart differentiates between &lt;strong&gt;rationality&lt;/strong&gt; and &lt;strong&gt;will&lt;/strong&gt;. Rationality is a deep contemplative focus on the inner essence, a kind of pure knowing. The will, by contrast, is the power of the soul that chooses and desires—it is about longing.&lt;/p&gt;
&lt;p&gt;Some say the will of God is better than His rationality because the will sees things as they truly are, unfiltered and direct, while rationality perceives things more like how they appear, less immediate, more mediated.&lt;/p&gt;
&lt;p&gt;Eckhart uses the metaphor of an eye to clarify this: the eye represents the will that sees reality directly, while a painting of an eye or its reflection sees the world filtered through artifice or distortion.&lt;/p&gt;
&lt;p&gt;However, Eckhart disagrees with the idea that will is superior. He argues that rationality is actually superior because it “takes God bare,” apprehending God in pure nakedness, while will “takes God under the garment of goodness,” meaning it grasps God only through mediated qualities like goodness.&lt;/p&gt;
&lt;p&gt;How does this make sense? Shouldn’t it be the opposite—that will, as direct desire, is unfiltered, while rationality is more mediated?&lt;/p&gt;
&lt;p&gt;For Eckhart, the will relates to love and desire, which are necessarily connected to the concept of goodness. While will may be more primitive or come before rationality, it is still filtered through what Aristotle calls the “irrational part of the soul” or “animal parts.” Aristotle explains:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;That one element in the soul is &lt;strong&gt;irrational&lt;/strong&gt; and one has a rational principle. [&amp;hellip;]
For we praise the rational principle of the continent man and of the incontinent, and the part of their soul that has such a principle, since it urges them aright and towards the best objects; but there is found in them also another element naturally opposed to the rational principle, which fights against and resists that principle.&lt;/p&gt;
&lt;p&gt;~ Nicomachean Ethics, Chapter 13&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;If we try to grasp God through the will, we always see Him through a lens of desire and thus through goodness (because only godo things can be desired). But God transcends goodness, so we can only understand Him through a more contemplative measure—rationality. Although rationality is also biased, contemplation gives us a chance to recognize and strip away those biases. The will, being more primitive, does not offer that opportunity.&lt;/p&gt;
&lt;p&gt;As a metaphor, Eckhart speaks of “clothing a king on the day of his coronation in gray garments,” symbolizing that calling God merely “good” is inadequate and inappropriate, like dressing a King in beggers clothes.&lt;/p&gt;
&lt;p&gt;Only when we have stripped God from the “veil of goodness”, that is, when we no longer look at God through human concepts like goodness—can we see Him as He truly is.&lt;/p&gt;
&lt;p&gt;Eckhart further illustrates the importance of rationality with the metaphor of angels: the being of angels depends on the presence of divine rationality. They recognize their own being in God’s rationality; thus, angels are like images in a mirror, while God is the source of the image. Without God’s rationality, their being would vanish, just as an image disappears if the mirror falls.&lt;/p&gt;
&lt;div class="primary-text"&gt;
 &lt;p&gt;&amp;ldquo;Like the morning star in the midst of the fog.&amp;rdquo; I focus on the little word &amp;ldquo;quasi,&amp;rdquo; which means &amp;ldquo;just like&amp;rdquo; or &amp;ldquo;as if.&amp;rdquo; The children in school call this a &amp;ldquo;modifier.&amp;rdquo; This is what I have in mind in all my sermons.&lt;/p&gt;
&lt;p&gt;The most essential thing one can say about God is &amp;ldquo;Word&amp;rdquo; and &amp;ldquo;Truth.&amp;rdquo; God called Himself a Word. Saint John said: &amp;ldquo;In the beginning was the Word&amp;rdquo; (John 1:1), and he means that there should be a modifier with this Word.&lt;/p&gt;
&lt;p&gt;Just like the &amp;ldquo;free star,&amp;rdquo; after which Friday is named—the Venus: it has many names. When it rises before the sun and appears earlier than the sun, it is called &amp;ldquo;the morning star.&amp;rdquo; But when it follows the sun, so that the sun sets earlier, it is called &amp;ldquo;the evening star.&amp;rdquo; Sometimes it moves above the sun, sometimes below the sun. Among all the stars, it remains constantly near the sun. It never moves farther from or closer to it.&lt;/p&gt;
&lt;p&gt;It stands for a person who wants to reach this goal; such a person should always be near to God and present to Him, so that nothing may remove him from God—not happiness nor misfortune, nor any creature.&lt;/p&gt;

&lt;/div&gt;

&lt;p&gt;The section begins with a return to the opening of the sermon, citing the Book of Sirach, where the *&lt;em&gt;morning star&lt;/em&gt;: representing Venus, becomes a symbol for our soul seeking God. Our soul shines bright like the morning star amid confusion and fog.&lt;/p&gt;
&lt;p&gt;Eckhart focuses on the word &lt;strong&gt;&amp;ldquo;quasi&amp;rdquo;&lt;/strong&gt; (“as if” or “like”), emphasizing that whenever he speaks about God, he does &lt;strong&gt;not&lt;/strong&gt; describe God as He truly is. Instead, he offers analogies or approximations. This holds true even for his statements about God—they are metaphorical, not literal descriptions.&lt;/p&gt;
&lt;p&gt;Continuing the analogy, &lt;a href="https://www.skyatnightmagazine.com/space-science/venus-morning-star-evening-star"&gt;Venus is known both as the &lt;strong&gt;morning star&lt;/strong&gt; and the &lt;strong&gt;evening star&lt;/strong&gt;&lt;/a&gt;, a fact famously used by philosopher Frege when discussing &lt;a href="paper-summary/on_senses_and_references/"&gt;language, meaning, and reference&lt;/a&gt; (Though that’s a side note here). Venus always remains close to the sun, never straying far—sometimes below it, sometimes above, sometimes before it, sometimes after it, but always near.&lt;/p&gt;
&lt;p&gt;In this metaphor, the &lt;strong&gt;sun&lt;/strong&gt; represents God and divinity, and &lt;strong&gt;Venus&lt;/strong&gt; represents us—more precisely, our soul. Just as Venus never leaves the sun’s proximity, so too should our soul remain steadfastly close to God.&lt;/p&gt;
&lt;p&gt;In other words, &lt;strong&gt;spiritual steadfastness&lt;/strong&gt;: the soul’s constant nearness to God, is key.&lt;/p&gt;
&lt;div class="primary-text"&gt;
 &lt;p&gt;He continues: “Like the full moon in its days.” The moon exercises dominion over all moist nature. The moon is never as close to the sun as when it is full and receives its light directly from the sun. However, because it is closer to the earth than any other star, it has two disadvantages: it is pale and spotted, and it loses its light. It is never as strong as when it is farthest from the earth, for then it causes the sea to ebb the most; the more it wanes, the less it can do this.&lt;/p&gt;
&lt;p&gt;The more the soul is elevated above earthly things, the more powerful it is. Whoever recognized nothing but creatures would never think of a sermon, for every creature is full of God and is a book.&lt;/p&gt;
&lt;p&gt;A person who wants to reach what has just been spoken of here—this is the whole point of the entire discourse—must be like the morning star: always present to God and always near Him, equally close, raised above all earthly things, and be an attribute to the Word.&lt;/p&gt;

&lt;/div&gt;

&lt;p&gt;The quote from Sirach continues, introducing the symbol of the &lt;strong&gt;moon&lt;/strong&gt;, which represents a &lt;strong&gt;full soul&lt;/strong&gt;. Just as the moon receives its light directly from the sun, a full soul is completely open and oriented toward God, reflecting divine illumination.&lt;/p&gt;
&lt;p&gt;The stars that are nearer to God symbolize higher beings, such as angels, who remain closer to God’s presence. Compared to them, even if our soul is full and directed toward God, we lose the sun’s light more quickly, illustrating how we stray from God’s path through distractions.&lt;/p&gt;
&lt;p&gt;It is often when we are farthest from God—in the sense of detachment from worldly concerns—that we are most spiritually powerful. This represents a distance from mundane affairs and daily troubles.&lt;/p&gt;
&lt;p&gt;Detachment is a major theme for Eckhart and earlier thinkers like Plotinus, both emphasizing that closeness to the material world weakens the soul. Plotinus writes:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;In fact, purification would be leaving it [The Soul] alone and not with others [The Senses] or not looking at something else [External Things] and in consequence not having beliefs [Opinions] which are alien to it [Believing Pleasure, Pain of importance] – whatever is the nature of the beliefs or of the affections [Emtions, Desire, Fears, ect.], as has been said – and not looking at images [Fantasies froom Desire] or making affections derived from them.&lt;/p&gt;
&lt;p&gt;~ Ennead 3.6(26)§3.6.5.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;All creatures have God within them, but spiritual insight arises only when one focuses on the divine. Like the morning star that forever hovers near the sun, we too should hover near God, high above the earth and its desires.&lt;/p&gt;
&lt;div class="primary-text"&gt;
 &lt;p&gt;There is a spoken word—that is the angel, the human, and all creatures. There is another word, thought and spoken; in this, it can happen that I imagine something. Yet there is another word that never ever comes forth; it is rather eternally within the one who speaks it. It is always in a state of being received in the Father who speaks it, and yet it remains abiding.&lt;/p&gt;
&lt;p&gt;Rationality works entirely inwardly. The finer and more spiritual a thing is, the more powerfully it works inwardly. And the stronger and finer the rationality is, the more what it recognizes becomes united with it, and the more it becomes one with it.&lt;/p&gt;
&lt;p&gt;This is not the case with physical things; the stronger they are, the more they work outwardly.&lt;/p&gt;
&lt;p&gt;God’s blessedness lies in the inward working of rationality, where the Word abides.&lt;/p&gt;
&lt;p&gt;There the soul should be an attribute and work a single work with God, to grasp its blessedness in the knowledge floating within itself—in that very place where God is blessed.&lt;/p&gt;

&lt;/div&gt;

&lt;p&gt;God is often associated with the &lt;strong&gt;Word&lt;/strong&gt; in Christianity and with the &lt;strong&gt;Logos&lt;/strong&gt; in ancient Greek philosophy, both meaning the same, &lt;em&gt;Logos&lt;/em&gt; being Greek for &lt;em&gt;word&lt;/em&gt;.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;In the beginning the &lt;strong&gt;Word&lt;/strong&gt; already existed.
The Word was with God,
and the Word was God.
He existed in the beginning with God.
God created everything through him,
and nothing was created except through him.
The Word gave life to everything that was created,
and his life brought light to everyone.&lt;/p&gt;
&lt;p&gt;~ John 1:1-4&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;Of this &lt;em&gt;logos&lt;/em&gt; which holds always, humans prove to be uncomprehending, both before they hear it and after hearing it for the first time.
For although all things come to be in accordance with this &lt;em&gt;logos&lt;/em&gt;, they are like the unexperienced experiencing words and deeds such a I explain when I distinguish each thing according to its nature and show how it is.
Other men are unaware of what they do when they are awake just as they are forgetful of what they do when they are asleep.&lt;/p&gt;
&lt;p&gt;~ Heraclitus, Fragment B1&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;This word, &lt;em&gt;Logos&lt;/em&gt;, can be separated into three levels:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Spoken outwardly:&lt;/strong&gt; These are angels, humans, and all other creatures. They are &lt;em&gt;spoken&lt;/em&gt; in the sense that they are created by God.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Thought and spoken:&lt;/strong&gt; This is the imaginative world, which we can think of as &lt;em&gt;spoken&lt;/em&gt; in this sense.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;The Word that never comes:&lt;/strong&gt; This is the eternal and unchanging world of the Word/&lt;em&gt;Logos&lt;/em&gt;. It does not exist in our reality or world but exists only in eternal unity in God, &amp;ldquo;eternally within the one who speaks.&amp;rdquo; It is always in a state of &amp;ldquo;becoming,&amp;rdquo; as Paul Tillich would say, &amp;ldquo;always in a state of being received.&amp;rdquo;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;We come closer to the good, &lt;em&gt;the Word that never comes&lt;/em&gt;, by looking inward through &lt;em&gt;thought and spoken&lt;/em&gt;, because &amp;ldquo;God&amp;rsquo;s blessedness lies there&amp;rdquo;, not in the outward physical things &lt;em&gt;spoken outwardly&lt;/em&gt;. We should engage in this inward looking through rationality, in a contemplative and meditative process.&lt;/p&gt;
&lt;p&gt;Our souls should not be merely servants of God but an attribute of Him; we should participate in God&amp;rsquo;s own being. This reminds us of other mystics who speak of a deep union with God:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;I saw no difference between God and our substance: but as it were all God; and yet mine understanding took that our substance is in God: that is to say, that God is God, and our substance is a creature in God.&lt;/p&gt;
&lt;p&gt;~ Revelations of Divine Love, The Fourteenth Revelation, Chapter 54&lt;/p&gt;
&lt;/blockquote&gt;
&lt;div class="primary-text"&gt;
 That we may always be an attribute to this Word, may the Father, this very Word, and the Holy Spirit help us. Amen.
&lt;/div&gt;

&lt;p&gt;I want to end with the following thought:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Poetry itself does not matter; what matters is what the poem points to—what it allows us to see, feel, and most of all, hear. If poetry were ever to fully reach its goal, to find precisely what it aims at, this would lead to the annihilation of poetry.
The idea of decreation is important, since the only way we can draw close to the thing itself is by approaching it through negatives, by using the logic of poetry—of ascension and negation—that proceeds through contradiction, antitheses, and paradox.
Disjointed opposites do not result in anything positive; rather, it is through the continuous work of negation that words can point darkly toward what surpasses them. The thing itself can only find voice when words break.&lt;/p&gt;
&lt;p&gt;~ On Mysticism: The Experience of Ecstasy&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;In the end, the content of Meister Eckhart’s sermon is not what truly matters; what matters is what it aims at, the unintelligible connection with the divine that it provides us.&lt;/p&gt;</description></item><item><title>AI: The Final Insult to Humanity</title><link>https://monkemanx.github.io/articles/insult_to_humanity/</link><pubDate>Thu, 08 May 2025 16:00:00 +0000</pubDate><author>monkeman@cock.li (MonkeMan)</author><guid>https://monkemanx.github.io/articles/insult_to_humanity/</guid><description>&lt;style&gt;
 .info {
 background-color: #e6f7ff; 
 padding: 15px; 
 border-radius: 5px; 
 margin-bottom: 15px; 
 }

 .info-title {
 font-size: 20px; 
 margin-bottom: 10px; 
 color: #000080; 
 font-weight: bold; 
 }
&lt;/style&gt;

&lt;div class="info"&gt;
 &lt;div class="info-title"&gt;Info&lt;/div&gt;
 &lt;p&gt;A bit shorter than usual, but I liked this too much to banish it to &lt;a href="https://monkemanx.github.io/tangled_thoughts/"&gt;Tangled Thoughts&lt;/a&gt;, where no one, including me, would ever see it again.&lt;/p&gt;
&lt;/div&gt;

&lt;h2 id="insult-to-humanity-kränkung-der-menschheit"&gt;Insult to Humanity &lt;em&gt;(Kränkung der Menschheit)&lt;/em&gt;&lt;/h2&gt;
&lt;p&gt;&amp;ldquo;Insult to humanity&amp;rdquo; is a term coined by the founder of psychoanalysis, &lt;strong&gt;Sigmund Freud&lt;/strong&gt;. It refers to the gradual dethroning of humanity from its perceived central and superior position in the universe due to various scientific advancements:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Cosmological Insult:&lt;/strong&gt; The &lt;strong&gt;Copernican Revolution&lt;/strong&gt; marked a paradigm shift—from the belief that the Earth was stationary at the center of the universe, to the understanding that the Sun is at the center of the solar system and the Earth orbits around it. (There’s a great anime about this: &lt;a href="https://en.wikipedia.org/wiki/Orb:_On_the_Movements_of_the_Earth"&gt;&lt;em&gt;Orb: On the Movements of the Earth&lt;/em&gt;&lt;/a&gt;)&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Biological Insult:&lt;/strong&gt; With the discovery of the &lt;a href="https://en.wikipedia.org/wiki/Evolution"&gt;&lt;strong&gt;theory of evolution&lt;/strong&gt;&lt;/a&gt; by Charles Darwin, humans were no longer seen as uniquely created by God but as part of the animal kingdom, shaped by the same natural processes as all other life.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Psychological Insult:&lt;/strong&gt; The discovery of the &lt;a href="https://en.wikipedia.org/wiki/Unconscious_mind"&gt;&lt;strong&gt;unconscious mind&lt;/strong&gt;&lt;/a&gt; revealed that much of human behavior is not governed by conscious thought, but by hidden, unconscious processes. (My favorite example is the &lt;a href="https://en.wikipedia.org/wiki/Hungry_judge_effect"&gt;&lt;em&gt;hungry judge effect&lt;/em&gt;&lt;/a&gt;).&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id="why-am-i-talking-about-this"&gt;Why am I talking about this?&lt;/h2&gt;
&lt;p&gt;There’s a fascinating phenomenon emerging on the internet: artists are expressing deep frustration with artificial intelligence. Painters criticize models like &lt;strong&gt;Stable Diffusion&lt;/strong&gt; and &lt;strong&gt;DALL·E&lt;/strong&gt;, which can generate images in various styles at high quality. Writers and programmers similarly protest large language models (LLMs) capable of producing text, stories, and code with impressive fluency (Gemini 2.5 can produce whole &lt;a href="https://youtu.be/K0h_PS_1XiE?si=wNMGCi7z5Q3hzaqU"&gt;applications&lt;/a&gt;). But this reaction may point to something much bigger.&lt;/p&gt;
&lt;p&gt;We might be witnessing a &lt;strong&gt;fourth insult to humanity&lt;/strong&gt;:&lt;/p&gt;
&lt;ol start="4"&gt;
&lt;li&gt;&lt;strong&gt;Computational Insult:&lt;/strong&gt; The realization that many abilities once thought to be uniquely human—such as creativity, strategy, and language can now be replicated by machines. Think of &lt;strong&gt;AlphaGo&lt;/strong&gt;, &lt;strong&gt;GPT-4&lt;/strong&gt;, &lt;strong&gt;Claude&lt;/strong&gt;, and &lt;strong&gt;Stable Diffusion&lt;/strong&gt;.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;This could explain the intense emotional reaction. With each of the historical insults, humanity’s privileged position in the cosmos has been diminished. But until recently, we still believed we were &lt;em&gt;uniquely creative&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;That only &lt;strong&gt;we&lt;/strong&gt; could make brilliant Go moves.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;a href="https://scilogs.spektrum.de/hlf/beyond-the-ai-paradox-are-machines-capable-of-genuine-creativity/"&gt;Wrong&lt;/a&gt;.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;That only &lt;strong&gt;we&lt;/strong&gt; could produce beautiful paintings.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;a href="https://www.nytimes.com/2022/09/02/technology/ai-artificial-intelligence-artists.html"&gt;Wrong&lt;/a&gt;.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;That only &lt;strong&gt;we&lt;/strong&gt; could write pleasing prose and poems.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;a href="https://edition.cnn.com/2024/01/19/style/rie-kudan-akutagawa-prize-chatgpt/index.html"&gt;Wrong&lt;/a&gt;.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;That only &lt;strong&gt;we&lt;/strong&gt; could make anime opening sounds.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;a href="https://www.youtube.com/watch?v=8ef6dSvKMLQ"&gt;Wrong&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;That only &lt;strong&gt;we&lt;/strong&gt; could craft alluring songs and soundscapes.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;a href="https://decrypt.co/304164/beatles-win-first-grammy-awarded-ai-song"&gt;Wrong&lt;/a&gt;.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;And so on. Better examples are emerging every day.&lt;/p&gt;
&lt;p&gt;This last bastion of human ingenuity, our creative spirit, has been shaken. In combination with the ongoing secularization and meaning crisis, this has lit the fuse on a barrel of black powder, a psychological explosion of anguish, denial, and resistance.&lt;/p&gt;
&lt;h2 id="what-is-a-human"&gt;What Is a Human?&lt;/h2&gt;
&lt;p&gt;The fundamental question before us is none other than: &lt;strong&gt;&amp;ldquo;What is a human?&amp;rdquo;&lt;/strong&gt; And how does this relate to &lt;strong&gt;meaning&lt;/strong&gt;?&lt;/p&gt;
&lt;p&gt;The ancient Greeks, particularly the Stoics, believed that the world was embedded with a &lt;em&gt;telos&lt;/em&gt;, a purpose or reason for being. By examining what made one thing unique compared to another, one could discover its &lt;em&gt;telos&lt;/em&gt;, and through that, its meaning. For example, what makes a fisherman uniquely special? It is that he fishes. Thus, the job, goal, &lt;em&gt;telos&lt;/em&gt;, and meaning of a fisherman is to fish. Similarly, a construction worker&amp;rsquo;s &lt;em&gt;telos&lt;/em&gt; is to build.&lt;/p&gt;
&lt;p&gt;We can apply this reasoning to ourselves: what makes humans uniquely special when compared to everything else in nature? Whatever that is would point us to our &lt;em&gt;telos&lt;/em&gt;. For the ancient Greeks, what made us special was &lt;em&gt;reason&lt;/em&gt;, we were the only beings in nature capable of rational thought.&lt;/p&gt;
&lt;p&gt;But as we’ve seen, even this has been eroded by the rise of large language models. LLMs now regularly outperform humans in many &lt;a href="https://ai.meta.com/blog/meta-llama-3/"&gt;reasoning benchmarks&lt;/a&gt;, they are even better than us in judging &lt;a href="https://www.nature.com/articles/s41598-024-79048-0"&gt;social situations&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;A very similar question, often asked before the rise of LLMs, was: &lt;em&gt;What differentiates humans from animals?&lt;/em&gt; Common answers included &lt;strong&gt;emotion&lt;/strong&gt;, &lt;strong&gt;reason&lt;/strong&gt;, and &lt;strong&gt;consciousness&lt;/strong&gt;. But none of these hold up—animals possess all of them, albeit to a lesser degree.&lt;/p&gt;
&lt;p&gt;So what is left?&lt;/p&gt;
&lt;p&gt;Before the emergence of artificial intelligence models, the go-to answer was &lt;strong&gt;language&lt;/strong&gt;. No other animal can convey abstract concepts as we do. Sure, some animals can communicate simple messages like “Look there! Danger!”, but the ability to abstract and share that abstraction is what drove the success of the human species.&lt;/p&gt;
&lt;p&gt;Yet this too has now been challenged. LLMs have become so skilled in conversation that the &lt;strong&gt;Turing Test&lt;/strong&gt; is no longer taken seriously as a measure of consciousness or intelligence—because machines are now &lt;a href="https://arxiv.org/abs/2503.23674"&gt;regularly passing it&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id="my-perspective"&gt;My Perspective&lt;/h2&gt;
&lt;p&gt;I believe this is one of the greatest things that could have happened to us as a species, not because of the scientific and material progress AI promises to deliver, but because it breaks the illusion that humans occupy a uniquely special place in the cosmos once and for all. There are no more comforting lies to hide behind. Now, each of us must confront the existential angst head-on.&lt;/p&gt;
&lt;p&gt;If humans are no longer uniquely special, then we are left with two possibilities: either &lt;em&gt;everything&lt;/em&gt; is special, or &lt;em&gt;nothing&lt;/em&gt; is.&lt;/p&gt;
&lt;p&gt;If everything is special, this new picture strongly supports &lt;a href="https://en.wikipedia.org/wiki/Pantheism"&gt;pantheism&lt;/a&gt;, the belief that nature and God are one, as held by the Stoics, Spinoza, and, to some extent, Schopenhauer. For if everything is special, what makes everything special if not a spark of divinity embedded in all things?&lt;/p&gt;
&lt;p&gt;On the other hand, if nothing is special, then we must create our own meaning on Earth. Be it, as Nietzsche proposed, through the exercise of power; as Camus suggested, through rebellion; or as Sartre argued, by choosing a set of values and committing to them with sincerity.&lt;/p&gt;
&lt;p&gt;But this decision, as Kierkegaard described, between everything or nothing, between faith or reason, a world filled with mystery or one governed by logic, the divine or the mundane, Jerusalem or Athens, comfort in the bosom of Mother Nature or in the precision of mathematics and science, is &lt;strong&gt;criterialess&lt;/strong&gt;. There is no guiding principle, no objective signpost to lead the way. It is a choice that must be made &lt;strong&gt;axiomatically&lt;/strong&gt;, and each of us must make it. There is no way around it. Even not choosing is, in itself, a choice.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;So choose, and choose wisely.&lt;/strong&gt;&lt;/p&gt;</description></item><item><title>Ontological Argument and Apophatic theology</title><link>https://monkemanx.github.io/articles/ontological_argument_and_apophatic_theology/</link><pubDate>Sun, 04 May 2025 08:00:00 +0000</pubDate><author>monkeman@cock.li (MonkeMan)</author><guid>https://monkemanx.github.io/articles/ontological_argument_and_apophatic_theology/</guid><description>&lt;style&gt;
 .info {
 background-color: #e6f7ff; 
 padding: 15px; 
 border-radius: 5px; 
 margin-bottom: 15px; 
 }

 .info-title {
 font-size: 20px; 
 margin-bottom: 10px; 
 color: #000080; 
 font-weight: bold; 
 }
&lt;/style&gt;

&lt;div class="info"&gt;
 &lt;div class="info-title"&gt;Info&lt;/div&gt;
 &lt;p&gt;&lt;p&gt;This is a follow-up to the article &lt;a href="https://monkemanx.github.io/articles/nature_of_god/"&gt;&amp;ldquo;Nature of God&amp;rdquo;&lt;/a&gt;, discussing why it makes sense to imagine God as an entity that possesses all attributes in their maximal form—and why this view is ultimately inadequate to fully describe God.&lt;/p&gt;
&lt;p&gt;The topic, of this article, is already addressed in Aquinas&amp;rsquo;s &lt;em&gt;Summa Theologiae&lt;/em&gt;, though I have not yet read it, so take everything in here with a grain of salt.&lt;/p&gt;
&lt;/p&gt;
&lt;/div&gt;

&lt;style&gt;
 .info {
 background-color: #e6f7ff; 
 padding: 15px; 
 border-radius: 5px; 
 margin-bottom: 15px; 
 }

 .info-title {
 font-size: 20px; 
 margin-bottom: 10px; 
 color: #000080; 
 font-weight: bold; 
 }
&lt;/style&gt;

&lt;div class="info"&gt;
 &lt;div class="info-title"&gt;Info&lt;/div&gt;
 &lt;p&gt;This article should be read as an intellectual thought experiment, rather than a statement of belief.&lt;/p&gt;
&lt;/div&gt;

&lt;p&gt;Recently, I had a conversation with a friend about the ontological argument, during which I realized that I do not fully understand it. In this article, I want to explore the argument further—though in a specific direction, selectively rather than exhaustively—and show how this can lead to apophatic theology, a tradition in which one approaches the divine through negation rather than by ascribing positive attributes to it.&lt;/p&gt;
&lt;h2 id="1-ontological-argument"&gt;1. Ontological Argument&lt;/h2&gt;
&lt;p&gt;The ontological argument can be explained quite intuitively as follows:
Imagine a thing—it could be anything: a shoe, a horse, or something else entirely. But let’s stick with the shoe for now. Now, imagine a shoe that would be &lt;em&gt;greater&lt;/em&gt;—where “greater” means better in some way—than the original shoe you thought of. Perhaps this greater shoe is made of a softer, more elastic material, or maybe it has new, impressive properties or abilities, like automatically moisturizing the soles of your feet.&lt;/p&gt;
&lt;p&gt;We can continue this line of reasoning indefinitely: always imagining an even better shoe. Eventually, we may arrive at a concept of a shoe that is omniscient (all-knowing), omnipotent (all-powerful), and so on. At the end of this process stands the &lt;em&gt;greatest possible being&lt;/em&gt;—what we might call &lt;em&gt;God&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;Now, the argument goes: this greatest being must also possess the property of &lt;em&gt;existence&lt;/em&gt;, because a thing that exists is greater than a thing that does not exist. Since we are imagining the &lt;em&gt;greatest&lt;/em&gt; being, it must include all properties that would make it greater—including existence.&lt;/p&gt;
&lt;p&gt;But this leads to a surprising implication: &lt;strong&gt;God exists&lt;/strong&gt;. Why? Because we defined God as the greatest being, and said that existence is one of the properties that makes something greater. If God did &lt;em&gt;not&lt;/em&gt; exist, then existence would not be one of the properties of the greatest being. But we &lt;em&gt;did&lt;/em&gt; say it is—therefore, God must exist.&lt;/p&gt;
&lt;p&gt;That’s the ontological argument in a nutshell. It can be formalized as follows (among other versions):&lt;/p&gt;
&lt;blockquote&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Definition&lt;/strong&gt;: God is the greatest conceivable being.&lt;/li&gt;
&lt;li&gt;We can conceive of such a being.&lt;br&gt;
 2.1. If what we conceive is not the greatest yet, we can always imagine something greater.
 2.2. This progression of greatness must eventually converge.&lt;/li&gt;
&lt;li&gt;A being that exists in reality is greater than one that exists only in the imagination.&lt;/li&gt;
&lt;li&gt;If the greatest being exists only in the imagination, then we can imagine a greater being—one that also exists.&lt;/li&gt;
&lt;li&gt;But we cannot imagine a being greater than the greatest conceivable being.&lt;/li&gt;
&lt;li&gt;Therefore, the greatest conceivable being must exist in reality.&lt;/li&gt;
&lt;li&gt;This being is what we call &lt;strong&gt;God&lt;/strong&gt;.&lt;/li&gt;
&lt;/ol&gt;
&lt;/blockquote&gt;
&lt;p&gt;Importantly, this line of reasoning depends on the assumption that we can always imagine something greater, until we arrive at the greatest possible being.&lt;/p&gt;
&lt;p&gt;Naturally, this argument has been criticized in many ways. One might challenge its premises: for instance, by arguing that the concept of a “greatest” being is ill-defined (what does it &lt;em&gt;really&lt;/em&gt; mean for one being to be greater than another?). Or one might reject the idea that the progression of greatness must converge—that is, perhaps there is no maximal being, just an endless hierarchy. Others might argue that the human mind is incapable of conceiving such a being in the first place.&lt;/p&gt;
&lt;p&gt;But that’s not the angle I want to pursue. I want to go a bit deeper: &lt;em&gt;why does this argument work at all?&lt;/em&gt;
Could we, for example, replace “greatest being” with “all-powerful being,” or even with something like a unicorn or an island?&lt;/p&gt;
&lt;p&gt;Let’s examine two common criticisms of the ontological argument.&lt;/p&gt;
&lt;h3 id="11-the-perfect-island-argument"&gt;1.1 The &amp;ldquo;Perfect Island&amp;rdquo; Argument&lt;/h3&gt;
&lt;p&gt;This argument, originally proposed by the monk &lt;em&gt;Gaunilo of Marmoutiers&lt;/em&gt;, goes as follows:&lt;/p&gt;
&lt;blockquote&gt;
&lt;ol&gt;
&lt;li&gt;Imagine the most perfect island: “that island than which no greater island can be conceived.”&lt;/li&gt;
&lt;li&gt;It is greater for this island to exist in reality than only in the imagination.&lt;/li&gt;
&lt;li&gt;If it exists only in the imagination, then a greater island (one that exists) can be conceived.&lt;/li&gt;
&lt;li&gt;Therefore, the perfect island must exist in reality.&lt;/li&gt;
&lt;/ol&gt;
&lt;/blockquote&gt;
&lt;p&gt;Clearly, this seems absurd. Just because we imagine a perfect island doesn’t mean such an island actually exists.&lt;/p&gt;
&lt;h3 id="12-the-imperfect-being-argument"&gt;1.2. The &amp;ldquo;Imperfect Being&amp;rdquo; Argument&lt;/h3&gt;
&lt;p&gt;Now let’s suppose someone defines &lt;em&gt;God&lt;/em&gt; not as the greatest conceivable being, but simply as an &lt;em&gt;all-powerful&lt;/em&gt; (omnipotent) being—without requiring omniscience or moral perfection. This could be called the “imperfect being” argument:&lt;/p&gt;
&lt;blockquote&gt;
&lt;ol&gt;
&lt;li&gt;God is defined as an all-powerful being.&lt;/li&gt;
&lt;li&gt;If an all-powerful being did not exist, then it would lack the power to exist.&lt;/li&gt;
&lt;li&gt;Therefore, an all-powerful being must exist.&lt;/li&gt;
&lt;/ol&gt;
&lt;/blockquote&gt;
&lt;p&gt;Again, this feels wrong. Just because something &lt;em&gt;could&lt;/em&gt; have the power to exist doesn&amp;rsquo;t mean it &lt;em&gt;does&lt;/em&gt; exist.&lt;/p&gt;
&lt;p&gt;So why don’t we accept these arguments, but are sometimes tempted to accept the original ontological argument for God?&lt;/p&gt;
&lt;p&gt;To address this, I want to draw two important distinctions that show why the ontological argument, as presented above, ultimately falls short:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;em&gt;The difference between contingency and necessity.&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;&lt;em&gt;The homogeneity of the divine nature.&lt;/em&gt; i.e. Divine Simplicity&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;These distinctions help show why a perfect island (which is contingent) or an imperfect being (which is not fully divine) do not fit the same logical structure as the God of classical theism.&lt;/p&gt;
&lt;p&gt;But then, I want to take things one step further—and argue that, in the end, these distinctions, while intellectually interesting, &lt;strong&gt;don’t actually matter&lt;/strong&gt;.&lt;/p&gt;
&lt;h2 id="2-contingency-vs-necessity"&gt;2. Contingency vs. Necessity&lt;/h2&gt;
&lt;p&gt;Very broadly, we say a thing is &lt;strong&gt;contingent&lt;/strong&gt; when it &lt;em&gt;could have been otherwise&lt;/em&gt;—that is, it does not have to exist or could exist in a different way depending on circumstances. In contrast, a thing is &lt;strong&gt;necessary&lt;/strong&gt; if it &lt;em&gt;could not have been otherwise&lt;/em&gt;—its existence is required in all possible circumstances.&lt;/p&gt;
&lt;p&gt;If we imagine the existence of multiple possible worlds or universes, then a thing is &lt;strong&gt;necessary&lt;/strong&gt; if it exists in &lt;em&gt;all&lt;/em&gt; of them. A necessary being exists independently; its existence depends on nothing outside of itself. A &lt;strong&gt;contingent&lt;/strong&gt; being, by contrast, exists in some possible worlds but not others. For instance, there might be a parallel universe in which television was never invented—thus, the TV is contingent. Its existence depends on historical and material conditions.&lt;/p&gt;
&lt;p&gt;On the other hand, in all possible worlds, 2 + 2 = 4. This mathematical truth is often considered &lt;strong&gt;necessary&lt;/strong&gt;—although even that is not entirely uncontroversial (&lt;a href="https://philosophy.stackexchange.com/questions/37969/why-is-22-4-a-necessary-truth"&gt;see here&lt;/a&gt;).&lt;/p&gt;
&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Another Argument for God being Nessecary&lt;/summary&gt;
 
 &lt;p&gt;Let’s now consider God: is God contingent or necessary?&lt;/p&gt;
&lt;p&gt;One reason we might think God is necessary comes from Aristotle’s &lt;a href="https://en.wikipedia.org/wiki/Unmoved_mover"&gt;Unmoved Mover&lt;/a&gt; argument. It goes like this: everything in our universe has a cause. Rain falls because clouds become oversaturated; you decide to eat because you’re hungry. These causes themselves have causes—clouds form from evaporated water; you’re hungry because you haven’t eaten.&lt;/p&gt;
&lt;p&gt;This chain of causes continues backward. One natural question arises: what is at the &lt;em&gt;end&lt;/em&gt; of this chain? One possibility is that the chain goes on infinitely. But if every cause relies on a prior cause, then the entire chain hangs on nothing—like trying to suspend a chain from the sky with no support. So, Aristotle argues, there must be a &lt;em&gt;first cause&lt;/em&gt;, an unmoved mover, which itself was not caused by anything else. This, he identifies as &lt;strong&gt;God&lt;/strong&gt;.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Unmoved Mover Argument (in short):&lt;/strong&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Things are in motion (or undergo change).&lt;/li&gt;
&lt;li&gt;Whatever is moved is moved by another.&lt;/li&gt;
&lt;li&gt;This chain of movers cannot go on to infinity.&lt;/li&gt;
&lt;li&gt;Therefore, there must be a first unmoved mover—God.&lt;/li&gt;
&lt;/ol&gt;
&lt;/blockquote&gt;
&lt;p&gt;If this reasoning is valid, then God is not contingent but &lt;em&gt;necessary&lt;/em&gt;. Since this logic applies in &lt;em&gt;all&lt;/em&gt; possible worlds—if anything exists at all, then a necessary cause must exist—it follows that God exists necessarily, not just contingently.&lt;/p&gt;

 
&lt;/details&gt;


&lt;p&gt;Now, let’s return to the &lt;strong&gt;Perfect Island&lt;/strong&gt; argument:&lt;/p&gt;
&lt;blockquote&gt;
&lt;ol&gt;
&lt;li&gt;Imagine the most perfect island: “that island than which no greater island can be conceived.”&lt;/li&gt;
&lt;li&gt;It is greater for this island to exist in reality than only in the imagination.&lt;/li&gt;
&lt;li&gt;If it exists only in the imagination, then a greater island (one that exists) can be conceived.&lt;/li&gt;
&lt;li&gt;Therefore, the perfect island must exist in reality.&lt;/li&gt;
&lt;/ol&gt;
&lt;/blockquote&gt;
&lt;p&gt;So why doesn’t this argument work? Why does it fail to prove the island’s existence, while the ontological argument for God might succeed (assuming you find it sound)?&lt;/p&gt;
&lt;p&gt;The answer lies in the distinction between &lt;strong&gt;necessity&lt;/strong&gt; and &lt;strong&gt;contingency&lt;/strong&gt;. In the ontological argument, God is defined as the &lt;em&gt;greatest conceivable being&lt;/em&gt;—a being that possesses &lt;strong&gt;all&lt;/strong&gt; great-making properties to their maximal degree. Importantly, this includes &lt;em&gt;necessity&lt;/em&gt;. God is not just great; God must exist. Nonexistence would be a logical contradiction for a necessary being.&lt;/p&gt;
&lt;p&gt;By contrast, islands are, by their nature, &lt;strong&gt;contingent&lt;/strong&gt;. An island depends on physical materials (like sand and landmass), on specific geographical and environmental conditions. There is no reason to think that a “perfect island” must exist in &lt;em&gt;all&lt;/em&gt; possible worlds. Its nonexistence is not a contradiction. Therefore, the perfect island argument fails: it tries to apply the structure of the ontological argument to a concept that is inherently contingent.&lt;/p&gt;
&lt;p&gt;In summary, the ontological argument only works when the &lt;strong&gt;nonexistence&lt;/strong&gt; of the thing in question is logically incoherent. God, as a necessary being, meets this criterion; a perfect island does not.&lt;/p&gt;
&lt;p&gt;With that clarified, we now understand why the ontological argument doesn’t apply to everyday objects. But what if we narrow the scope of the argument—not to show the existence of the &lt;em&gt;greatest&lt;/em&gt; being in every respect, but rather the existence of a being whose &lt;em&gt;only&lt;/em&gt; maximized attribute is power? For example, a being that is &lt;strong&gt;omnipotent&lt;/strong&gt; but not necessarily &lt;strong&gt;omniscient&lt;/strong&gt; or morally perfect.&lt;/p&gt;
&lt;p&gt;Would such an argument work? Would this being be necessary—or just powerful but contingent?&lt;/p&gt;
&lt;p&gt;That’s what we’ll explore next.&lt;/p&gt;
&lt;h2 id="3-divine-simplicity"&gt;3. Divine Simplicity&lt;/h2&gt;
&lt;p&gt;Let us now turn our eyes toward the &lt;strong&gt;Imperfect Being&lt;/strong&gt; argument. To recap, the argument goes as follows:&lt;/p&gt;
&lt;blockquote&gt;
&lt;ol&gt;
&lt;li&gt;God is defined as an all-powerful (omnipotent) being.&lt;/li&gt;
&lt;li&gt;If an all-powerful being did not exist, then it would lack the power to exist.&lt;/li&gt;
&lt;li&gt;Therefore, an all-powerful being (i.e., God) must exist.&lt;/li&gt;
&lt;/ol&gt;
&lt;/blockquote&gt;
&lt;p&gt;There are two ways this can play out:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;This being &lt;strong&gt;requires&lt;/strong&gt; existence in order to be all-powerful.&lt;/li&gt;
&lt;li&gt;This being &lt;strong&gt;does not&lt;/strong&gt; require existence to be all-powerful.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;The second option is easier to dismiss. If the being does not require existence in order to be all-powerful, then premise 2 becomes false. In that case, the argument fails, and this &amp;ldquo;imperfect&amp;rdquo; being does not necessarily exist.&lt;/p&gt;
&lt;p&gt;Let’s now consider the first case: the being &lt;em&gt;does&lt;/em&gt; require existence to be all-powerful. I would argue that once you accept this, the being must also possess all other maximal properties (e.g., omniscience, omnipresence, necessity). In other words, a being that is omnipotent but &lt;em&gt;not&lt;/em&gt; omniscient is &lt;strong&gt;metaphysically incoherent&lt;/strong&gt;—it defies the logic of what it means to be maximally great.&lt;/p&gt;
&lt;p&gt;In that case, the only being that can be omnipotent is the &lt;em&gt;greatest&lt;/em&gt; being—what we would call &lt;strong&gt;God&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;We can formalize the argument like this:&lt;/p&gt;
&lt;blockquote&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Assumption&lt;/strong&gt;: A being P is omnipotent but lacks other maximal properties.&lt;/li&gt;
&lt;li&gt;Then P is composed of two aspects: &amp;ldquo;omnipotence&amp;rdquo; + &amp;ldquo;something non-maximal.&amp;rdquo;&lt;/li&gt;
&lt;li&gt;Therefore, P is dependent on this non-maximal aspect.&lt;/li&gt;
&lt;li&gt;This non-maximal aspect is changeable (since only maximal aspects are necessary and unchangeable).&lt;/li&gt;
&lt;li&gt;If a part of P can change, then P itself can change.&lt;/li&gt;
&lt;li&gt;If P can change, it could lose its omnipotence.&lt;/li&gt;
&lt;li&gt;Then it might not be omnipotent in the future.&lt;/li&gt;
&lt;li&gt;But an omnipotent being must have power over &lt;em&gt;all things at all times&lt;/em&gt;, including the future.&lt;/li&gt;
&lt;li&gt;Therefore, P was never truly omnipotent.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Conclusion&lt;/strong&gt;: True omnipotence is only possible if &lt;em&gt;all&lt;/em&gt; attributes are maximal.&lt;/li&gt;
&lt;/ol&gt;
&lt;/blockquote&gt;
&lt;p&gt;You might challenge steps 7 and 8, arguing: &amp;ldquo;Just because a being might &lt;em&gt;lose&lt;/em&gt; omnipotence in the future doesn&amp;rsquo;t mean it isn&amp;rsquo;t omnipotent &lt;em&gt;now&lt;/em&gt;.&amp;rdquo; That’s fair—but this leads to further problems.&lt;/p&gt;
&lt;p&gt;Let’s spell it out more precisely:&lt;/p&gt;
&lt;blockquote&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Assumption&lt;/strong&gt;: A being P is currently omnipotent.&lt;/li&gt;
&lt;li&gt;It is possible that P might lose its omnipotence in the future.&lt;/li&gt;
&lt;li&gt;Since P is omnipotent, it must also have complete knowledge, including of its own future.&lt;/li&gt;
&lt;li&gt;Therefore, P must already know that it &lt;em&gt;will&lt;/em&gt; lose omnipotence.&lt;/li&gt;
&lt;li&gt;A being that can lose omnipotence is not omnipotent in &lt;em&gt;all possible worlds&lt;/em&gt;.&lt;/li&gt;
&lt;li&gt;But true omnipotence must be necessary—it must exist in &lt;em&gt;all&lt;/em&gt; possible worlds.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Conclusion&lt;/strong&gt;: P is not truly omnipotent.&lt;/li&gt;
&lt;/ol&gt;
&lt;/blockquote&gt;
&lt;p&gt;Put differently: if a being knows it could lose power in the future, then it is not &lt;strong&gt;absolutely&lt;/strong&gt; powerful. Absolute power means power that is neither dependent on anything else nor susceptible to limitation. If it &lt;em&gt;can&lt;/em&gt; be lost, then it is not maximized. And if power isn’t maximized, then it wasn’t omnipotence to begin with.&lt;/p&gt;
&lt;p&gt;This brings us to an important idea: &lt;em&gt;necessary existence&lt;/em&gt; is a built-in part of what it means to have truly maximal properties like omnipotence or omniscience. It&amp;rsquo;s not enough to be all-powerful at a moment in time—true omnipotence includes eternality, immutability, and necessity.&lt;/p&gt;
&lt;p&gt;This line of reasoning leads to something deeper. Once we recognize that omnipotence &lt;em&gt;requires&lt;/em&gt; omniscience (and vice versa), and that both require necessity, we begin to see that all these so-called &amp;ldquo;great-making properties&amp;rdquo; are interdependent. You cannot isolate them in different beings or imagine them in fragmentary ways.&lt;/p&gt;
&lt;p&gt;Taken together, this insight underpins the doctrine of &lt;strong&gt;Divine Simplicity&lt;/strong&gt;—most notably formulated by the theologian Thomas Aquinas.&lt;/p&gt;
&lt;p&gt;According to Divine Simplicity:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;God is not composed of parts.&lt;/li&gt;
&lt;li&gt;God’s attributes (e.g., omnipotence, omniscience, goodness, necessity) are not separable or independent.&lt;/li&gt;
&lt;li&gt;These attributes are not things God &lt;em&gt;has&lt;/em&gt;, but things God &lt;em&gt;is&lt;/em&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;There can be only one being with this nature. Any being that falls short in even one respect is not God, but something lesser. Thus, Divine Simplicity does not just preserve God’s uniqueness—it demands it.&lt;/p&gt;
&lt;h2 id="4-why-the-two-distinctions-in-the-ontological-argument-do-not-matter"&gt;4. Why the Two Distinctions in the Ontological Argument Do Not Matter&lt;/h2&gt;
&lt;p&gt;In the previous two sections, &lt;em&gt;Contingent vs. Necessary&lt;/em&gt; and &lt;em&gt;Divine Simplicity&lt;/em&gt;, I have argued why it makes sense to think of the nature (ontology) of God as encompassing all properties to the maximum degree and being necessary.
Both of these properties of God fall into the category of metaphysics. However, I believe that speaking about God in these metaphysical terms and assigning specific properties to God is erroneous. Instead, I advocate for the notion that it is &lt;em&gt;impossible&lt;/em&gt; to describe God&amp;rsquo;s nature.&lt;/p&gt;
&lt;p&gt;Here are three arguments for why I hold this position, and why I instead favor the view that God is beyond all positive description:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Jesus&amp;rsquo;s Perfection Argument&lt;/strong&gt; – How can Jesus be both imperfect and perfect?&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Kant’s Division: Noumenal vs. Phenomenal&lt;/strong&gt; – What can we actually know about God?&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;The Limitation of God&lt;/strong&gt; – Assigning attributes to God inherently limits God’s power.&lt;/li&gt;
&lt;/ol&gt;
&lt;h3 id="41-jesus-perfection-argument"&gt;4.1 Jesus’ Perfection Argument&lt;/h3&gt;
&lt;p&gt;This argument is specifically targeted at Christians and does not apply to more general understandings of God. In the Christian worldview, we have the concept of the Trinity, which says that Jesus the Son, the Holy Spirit, and God the Father are one and the same being.&lt;/p&gt;
&lt;p&gt;But this creates a problem: when Jesus came into the world, he came in human form. Humans, however, are imperfect beings. For example, we have a tailbone—an evolutionary leftover from when our ancestors had tails. Another example is the recurrent laryngeal nerve, which connects the brain to the larynx (voice box) but takes an inefficient detour around the aorta. These are just two examples of biological flaws, not to mention that our intellect, strength, and emotional capacity are limited. Overall, humans are very limited and far from perfect.&lt;/p&gt;
&lt;p&gt;This raises the question: how can Jesus, who is one with God and therefore perfect, be born as a human—a deeply imperfect being?&lt;/p&gt;
&lt;p&gt;To expand on this, recall the earlier argument that &lt;strong&gt;perfection implies changelessness&lt;/strong&gt;. If something can change, then it cannot be perfect. A perfect being is always perfect; if it could change, it could become less perfect, thus revealing it was never perfect to begin with.&lt;/p&gt;
&lt;p&gt;In other words, our notion of God as perfect cannot change—He cannot &amp;ldquo;turn into&amp;rdquo; Jesus, because:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;A perfect being cannot be imperfect at the same time.&lt;/li&gt;
&lt;li&gt;A perfect being cannot have the capacity to become imperfect.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;One famous attempt to resolve this issue comes from the Scholastic theologian Thomas Aquinas. As Scholastics often do, he introduces a new distinction meant to “fix” the problem: the &lt;strong&gt;nature-person distinction&lt;/strong&gt;. This distinction says that we can differentiate between the &lt;em&gt;nature&lt;/em&gt; of a thing—its essence, which defines its properties and limitations—and the &lt;em&gt;person&lt;/em&gt;, which refers to the individual that possesses this nature.&lt;/p&gt;
&lt;p&gt;If you&amp;rsquo;re familiar with object-oriented programming, one way to think about this is in terms of &lt;strong&gt;classes&lt;/strong&gt; and &lt;strong&gt;instances&lt;/strong&gt;: the nature is like the class (shared structure), and the person is like an instance (specific identity). Each instance has its own identity, even though it shares the class’s properties.&lt;/p&gt;
&lt;p&gt;Aquinas’s idea would go something like this:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-py" data-lang="py"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 1&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;# The class defines what it means to be God (the nature).&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 2&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;DivineNature&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 3&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;love&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="bp"&gt;self&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 4&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="nb"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;Loving infinitely.&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 5&lt;/span&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 6&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;know&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="bp"&gt;self&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 7&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="nb"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;Knowing all things.&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 8&lt;/span&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 9&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;# Creating instances gives us distinct persons with the same nature.&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;10&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;Father&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;DivineNature&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;11&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;Son&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;DivineNature&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;12&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;Spirit&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;DivineNature&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;However, this analogy introduces a new problem: it suggests that we have &lt;strong&gt;three distinct objects&lt;/strong&gt; in memory. But that’s &lt;a href="https://en.wikipedia.org/wiki/Tritheism"&gt;tritheism&lt;/a&gt; (a heresy), which Christianity rejects. Aquinas would say that there are &lt;strong&gt;not&lt;/strong&gt; three distinct beings—there is only &lt;strong&gt;one&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;To align more closely with this idea, we’d need to modify the analogy so that all three names refer to the &lt;strong&gt;same object&lt;/strong&gt;:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-py" data-lang="py"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 1&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;DivineNature&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 2&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="fm"&gt;__init__&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="bp"&gt;self&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 3&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="bp"&gt;self&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;name&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;name&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 4&lt;/span&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 5&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;act&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="bp"&gt;self&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 6&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="nb"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="bp"&gt;self&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s2"&gt; acts with the same divine will.&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 7&lt;/span&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 8&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;# A single shared nature&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 9&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;shared_nature&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;DivineNature&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;Shared&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;10&lt;/span&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;11&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;# Assigning it to &amp;#39;persons&amp;#39;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;12&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;Father&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;shared_nature&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;13&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;Son&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;shared_nature&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;14&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;Spirit&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;shared_nature&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;But this leads to &lt;a href="https://en.wikipedia.org/wiki/Modalistic_Monarchianism"&gt;modalism&lt;/a&gt; (another heresy), where Father, Son, and Spirit are just &lt;strong&gt;aliases&lt;/strong&gt; for the same being acting in different roles, not distinct persons. The distinction between class and instance collapses, and the Trinity loses its internal relational structure.&lt;/p&gt;
&lt;p&gt;There is another possible solution: say that God is both perfect and imperfect at the same time. But how is this possible? As argued earlier, this is &lt;strong&gt;logically impossible&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;This brings me to my preferred view of God, which I call the notion of a &lt;strong&gt;predicate-free God&lt;/strong&gt;. In this view, God &lt;strong&gt;precedes&lt;/strong&gt; logic itself. What is logically impossible becomes possible. How can God be both perfect and imperfect? Because God is &lt;strong&gt;not bound by logic&lt;/strong&gt;—He transcends it. God is a compressed core of contradiction.&lt;/p&gt;
&lt;p&gt;This perspective also offers a solution to the classic paradox: &lt;em&gt;Can God create a stone so heavy that He cannot lift it?&lt;/em&gt;
The answer, for a God not bound by logic, is: Yes—He can create such a stone, and He can also lift it.
Does this make logical sense? No—but that’s the point.&lt;/p&gt;
&lt;h3 id="42-kants-notion-noumenal-vs-phenomenal"&gt;4.2 Kant&amp;rsquo;s Notion: Noumenal vs Phenomenal&lt;/h3&gt;
&lt;p&gt;Kant differentiates between the &lt;strong&gt;noumenal world&lt;/strong&gt; and the &lt;strong&gt;phenomenal world&lt;/strong&gt;. The noumenal world is the world as it truly is—the pure essence and form—while the phenomenal world is how we, as humans, experience the world. But why is there this differentiation? Why don&amp;rsquo;t we perceive the world as it truly is?&lt;/p&gt;
&lt;p&gt;There are many reasons for this. Our sense organs are imperfect: some humans are color blind, others can see &lt;a href="https://ismy.blue/"&gt;better or worse&lt;/a&gt;. Even if we had perfect eyes, we would still only be able to see visible light. Animals like bees or dogs can, for example, see ultraviolet light. But it&amp;rsquo;s not just that our sense organs are imperfect—we also bring biases with us. Our experiences shape what we expect to see, and if parts of the visual field are concealed, our brain &lt;a href="https://en.wikipedia.org/wiki/Amodal_completion"&gt;fills in the gaps&lt;/a&gt;. We can even consider more foundational issues, such as humans perceiving time and space, being built directly in our brain.&lt;/p&gt;
&lt;p&gt;All these imperfections, biases, and many more prevent us from perceiving things as they really are. We can never know things in the noumenal world but only as filtered through our senses and consciousness—like looking through colored sunglasses.&lt;/p&gt;
&lt;p&gt;This presents a problem when considering God. There are three possibilities regarding which realm God could belong to:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Noumenal:&lt;/strong&gt; If God belongs to the noumenal world, we can&amp;rsquo;t really say anything about Him because we can never gain knowledge of noumenal things.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Phenomenal:&lt;/strong&gt; If God belongs to the phenomenal world, we would end up with a Stoic or Schopenhauerian view of God—God as a force or will that permeates the cosmos, rather than a personal, agentic God. This view fits all of Kant&amp;rsquo;s criteria for a thing to be in the phenomenal world: it has a spatiotemporal component (since God is the cosmos), it is mind-dependent (since we perceive God through nature), and it is epistemologically accessible (because we can perceive nature, and with that, God directly).&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Before noumenal and phenomenal:&lt;/strong&gt; God transcends both the noumenal and phenomenal realms, existing &lt;em&gt;before logic&lt;/em&gt;, &lt;em&gt;before metaphysical distinctions&lt;/em&gt;, and is &lt;em&gt;predicate-free&lt;/em&gt;. This is the view of God that I described in the previous section.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;In none of these realms can the God be fully described using properties. We can either agree that God is indescribable, or we can adopt a more Stoic or Schopenhauerian perspective (which I plan to write more about), but in doing so, we lose the personal aspect of God.&lt;/p&gt;
&lt;h3 id="43-limitation-of-god"&gt;4.3 Limitation of God&lt;/h3&gt;
&lt;p&gt;Finally, I want to address why I refer to the notion of an indescribable God as &lt;strong&gt;predicate-free&lt;/strong&gt;. &lt;a href="https://en.wikipedia.org/wiki/Predicative_expression"&gt;Predicates&lt;/a&gt; (in formal logic) are expressions used to assign properties to an object. For example, &amp;ldquo;The sky is &lt;strong&gt;blue&lt;/strong&gt;.&amp;rdquo; While many predicates describe attributes (such as &amp;ldquo;blue&amp;rdquo;), not all do. Nevertheless, when I say God cannot be described, I mean that no direct &lt;strong&gt;attributive&lt;/strong&gt; predicates can be assigned to Him. Why?&lt;/p&gt;
&lt;p&gt;Every attribute we assign to an object also implies a limitation. If I say the table is made of wood, I also implicitly say that it is not made of steel. If I say my home city is in Germany, I am implicitly saying that it cannot simultaneously be in Denmark. The same applies to God: if I say God is perfect, He cannot also be imperfect; if I say God is omnipotent, He cannot be weak; if I say God exists, He cannot also not exist, and so on.&lt;/p&gt;
&lt;p&gt;But this implies that we limit God&amp;rsquo;s power to some extent. If God&amp;rsquo;s power is limited, then there is some boundary, and God would be dependent on this boundary. In that case, He is no longer necessary, but contingent—meaning He may not exist at all.&lt;/p&gt;
&lt;p&gt;We can formalize this argument as follows:&lt;/p&gt;
&lt;blockquote&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;If God has properties imposed or defined from outside Himself, then God is limited by something external.&lt;br&gt;
&lt;em&gt;Justification:&lt;/em&gt; Predicates (properties or attributes) place constraints on an entity. For example, if something is &amp;ldquo;made of wood,&amp;rdquo; it cannot also be &amp;ldquo;made of steel&amp;rdquo; simultaneously. By assigning properties or attributes to God, we are asserting limits on His nature.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;If God is limited by something external, then God is dependent on that external condition, and thus contingent.&lt;br&gt;
&lt;em&gt;Justification:&lt;/em&gt; If something is limited, it must be bound by some external condition, cause, or framework. A being that is bound by limitations (such as being &amp;ldquo;good,&amp;rdquo; &amp;ldquo;omniscient,&amp;rdquo; or &amp;ldquo;temporal&amp;rdquo;) would be dependent on the conditions that define those limits. This would mean God&amp;rsquo;s nature or existence is not entirely self-sustaining but contingent on these limitations.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;If God is contingent, then God is not a necessary being.&lt;br&gt;
&lt;em&gt;Justification:&lt;/em&gt; A contingent being is one that could have failed to exist or could exist differently. If God is contingent, His existence would depend on something outside of Himself, which would make Him less than a necessary being.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Therefore, to be a necessary being, God must not be limited by any externally defined properties.&lt;br&gt;
&lt;em&gt;Justification:&lt;/em&gt; If God can be described with predicates, He would be limited, and being limited would imply contingency, meaning that God&amp;rsquo;s existence would not be necessary. To preserve God’s necessary, self-sustaining existence, He must be beyond predicates and limitations.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/blockquote&gt;
&lt;p&gt;There are a few things I want to clarify regarding this argument. First, when I talk about &lt;strong&gt;predicates&lt;/strong&gt; here, I mean &lt;strong&gt;attributive predicates&lt;/strong&gt; that assign properties or attributes to God. Analogies are still fine—for example, it’s fine to say &amp;ldquo;God is like something that is omnipotent&amp;rdquo; or &amp;ldquo;God is like a light,&amp;rdquo; but not &amp;ldquo;God is omnipotent&amp;rdquo; or &amp;ldquo;God is light.&amp;rdquo;&lt;/p&gt;
&lt;p&gt;Second, when I talk about properties and limits being assigned to God, I mean &lt;strong&gt;humans assigning&lt;/strong&gt; them to God. Theoretically, God could impose limits on Himself without creating an external dependency, thus remaining necessary.&lt;/p&gt;
&lt;p&gt;Third, and most importantly, this argument is self-defeating. By prescribing God as &lt;strong&gt;predicate-free&lt;/strong&gt;, I have done exactly what I said cannot be done. I’ve shot myself in the foot. This is a major issue, but we can reformulate the argument as follows:&lt;/p&gt;
&lt;blockquote&gt;
&lt;ol&gt;
&lt;li&gt;If a being has any predicates assigned to it, then it is limited by the framework in which those predicates make sense.&lt;/li&gt;
&lt;li&gt;If a being is limited by a conceptual framework, then it is dependent on something external to itself (i.e., the framework).&lt;/li&gt;
&lt;li&gt;If a being is dependent on something external, then it is contingent, not necessary.&lt;/li&gt;
&lt;li&gt;God, if He exists, is a necessary being by definition.&lt;/li&gt;
&lt;li&gt;Therefore, God cannot fall under any conceptual framework involving predication.&lt;/li&gt;
&lt;li&gt;Corollary: Any attempt to predicate God results in a &lt;strong&gt;category error&lt;/strong&gt;; such statements are not false, but meaningless within logical language.&lt;/li&gt;
&lt;/ol&gt;
&lt;/blockquote&gt;
&lt;p&gt;Importantly, we do not say that God is &lt;strong&gt;predicate-free&lt;/strong&gt; and then assign the property of being &lt;strong&gt;predicate-free&lt;/strong&gt; to Him, as I did in the previous argument. Instead, we say that it doesn’t make sense to assign properties to God because that would be a category error. It’s like asking, “What is 2 + unicorn?” or “What is the color of the number 5?” These statements are nonsensical in the same way that assigning properties to God is.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;What is it, then [the One/Good]? [&amp;hellip;]&lt;/p&gt;
&lt;p&gt;In fact, it is none of the things whose source it is, yet is the sort of thing which, because &lt;strong&gt;nothing can be predicated&lt;/strong&gt; of it, not Existence, not Substantiality, not Life, is a thing beyond them. [&amp;hellip;]&lt;/p&gt;
&lt;p&gt;For surely there is no way in which the Good can be either Intellect or fullness [a state that contains all Forms and complete knowledge], but &lt;strong&gt;is prior&lt;/strong&gt; to Intellect and fullness. For Intellect and fullness are after it, since they have need of it to be filled and to complete their thought. And they are close to what has no needs and does not in any way need to think, but they possess true fullness and intellection, because they have it primarily. But what is before them neither needs nor possesses anything; otherwise, it would not be the Good.&lt;/p&gt;
&lt;p&gt;~ Plotnius: On Nature, Contemplations, and the One&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2 id="5-conclusion"&gt;5. Conclusion&lt;/h2&gt;
&lt;p&gt;Even under the premise of a predicate-free God, it is still possible to speak about Him. One can use analogies or engage in &lt;strong&gt;apophatic theology&lt;/strong&gt;, where instead of prescribing positive properties to God, one states what properties God &lt;strong&gt;does not&lt;/strong&gt; have.&lt;/p&gt;</description></item><item><title>Western Philosophy Timeline</title><link>https://monkemanx.github.io/articles/philosophy_timeline/</link><pubDate>Thu, 01 May 2025 12:00:00 +0000</pubDate><author>monkeman@cock.li (MonkeMan)</author><guid>https://monkemanx.github.io/articles/philosophy_timeline/</guid><description>&lt;style&gt;
 .info {
 background-color: #e6f7ff; 
 padding: 15px; 
 border-radius: 5px; 
 margin-bottom: 15px; 
 }

 .info-title {
 font-size: 20px; 
 margin-bottom: 10px; 
 color: #000080; 
 font-weight: bold; 
 }
&lt;/style&gt;

&lt;div class="info"&gt;
 &lt;div class="info-title"&gt;Info&lt;/div&gt;
 &lt;p&gt;Disclaimer: I have not read the primary works of most philosophers on this list. If I have, I will list an review of their works under &lt;em&gt;articles&lt;/em&gt;.&lt;/p&gt;
&lt;/div&gt;

&lt;p&gt;This is a timeline of the most relevant philosophers in Western philosophy. When I say Western, I mean continental Europe, parts of the Middle East, England, and later America.&lt;/p&gt;
&lt;h2 id="the-pre-socratics"&gt;The Pre-Socratics&lt;/h2&gt;
&lt;p&gt;This philosophical era is called &amp;ldquo;pre-Socratic&amp;rdquo; because of the importance of Socrates in Western philosophy, often thought of as a starting point for philosophy. All philosophers before him are included in this era.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;626 BC – &lt;a href="https://de.wikipedia.org/wiki/Thales"&gt;Thales&lt;/a&gt;&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;Summary:&lt;/strong&gt;&lt;br&gt;
Theorized that the ultimate substance of which everything is made is &lt;em&gt;water&lt;/em&gt; — this idea is called &lt;a href="https://en.wikipedia.org/wiki/Monism"&gt;monism&lt;/a&gt;. He was the first to reject myths and legends, seeking natural explanations behind events, and is often considered the inventor of philosophy. Stories say he was the first to create &lt;a href="https://en.wikipedia.org/wiki/Option_(finance)"&gt;options&lt;/a&gt; and &lt;a href="https://en.wikipedia.org/wiki/Futures_contract"&gt;futures&lt;/a&gt; by buying up all the olive presses in town and renting them out.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;610 BC – &lt;a href="https://de.wikipedia.org/wiki/Anaximander"&gt;Anaximander&lt;/a&gt;&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;Summary:&lt;/strong&gt;&lt;br&gt;
Student of Thales. He believed that the first humans lived inside the belly of a fish, where they grew up until they were self-sufficient and then cut their way out. He also thought that multiple worlds existed, created by the so-called &lt;em&gt;infinite&lt;/em&gt; (&lt;em&gt;Apeiron&lt;/em&gt;).&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;570 BC – &lt;a href="https://en.wikipedia.org/wiki/Anaximenes_of_Miletus"&gt;Anaximenes&lt;/a&gt;&lt;/strong&gt; &lt;br&gt;
&lt;strong&gt;Summary:&lt;/strong&gt;&lt;br&gt;
Student of Anaximander. He believed that the ultimate substance of everything was &lt;em&gt;air&lt;/em&gt;. He thought water was just condensed air, and if condensed even further, it would become earth.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;570 BC – &lt;a href="https://en.wikipedia.org/wiki/Pythagoras"&gt;Pythagoras&lt;/a&gt;&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;Summary:&lt;/strong&gt;&lt;br&gt;
Student of Anaximander. He believed the universe is made up of a combination of units — pure forms of matter — and these units are &lt;em&gt;numbers&lt;/em&gt;. He was the first to describe himself as a &lt;em&gt;philosopher&lt;/em&gt; (a lover of wisdom). He is also famous for his belief in reincarnation, and thus thought it immoral to eat animals, as they could be the reincarnation of a human.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;540 BC – &lt;a href="https://en.wikipedia.org/wiki/Parmenides"&gt;Parmenides&lt;/a&gt;&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;Summary:&lt;/strong&gt;&lt;br&gt;
Believed that everything has always existed: &amp;ldquo;from nothing comes nothing, and from something, nothing can come.&amp;rdquo; His big claim was that there is no real &lt;em&gt;change&lt;/em&gt; — all of reality is one. He was the first to argue that reasoning is superior to the senses, bringing &lt;em&gt;deductive reasoning&lt;/em&gt; into philosophy.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;540 BC – &lt;a href="https://en.wikipedia.org/wiki/Heraclitus"&gt;Heraclitus&lt;/a&gt;&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;Summary:&lt;/strong&gt;&lt;br&gt;
Believed that everything in the universe is governed by the &lt;em&gt;logos&lt;/em&gt;, a universal cosmic law, which he identified with &lt;em&gt;change&lt;/em&gt;: &amp;ldquo;everything is in a constant state of flux.&amp;rdquo; That’s why one can&amp;rsquo;t step into the &lt;em&gt;same&lt;/em&gt; river twice. He also believed that everything is shaped by opposites: &amp;ldquo;Day and night are just two sides of the same coin.&amp;rdquo;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;490 BC – &lt;a href="https://en.wikipedia.org/wiki/Zeno_of_Elea"&gt;Zeno of Elea&lt;/a&gt;&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;Summary:&lt;/strong&gt;&lt;br&gt;
Student of Parmenides. Most famous for his paradoxes, designed to prove that there is no &lt;em&gt;change&lt;/em&gt;. For example: How can a runner ever reach a goal if he must first reach the halfway point, then halfway of the halfway, and so on? (Not to be confused with &lt;em&gt;Zeno of Citium&lt;/em&gt;, founder of Stoicism.)&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;490 BC – &lt;a href="https://en.wikipedia.org/wiki/Empedocles"&gt;Empedocles&lt;/a&gt;&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;Summary:&lt;/strong&gt;&lt;br&gt;
Tried to reconcile the dispute between Parmenides and Heraclitus by saying both were right. He believed everything is made up of &lt;em&gt;earth, air, fire, and water&lt;/em&gt;, which are fundamental and unchanging, but by combining these elements, change appears — birth and death are just human conceptions. He was the first to differentiate between &lt;em&gt;force&lt;/em&gt; and &lt;em&gt;substance&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;460 BC – &lt;a href="https://en.wikipedia.org/wiki/Democritus"&gt;Democritus&lt;/a&gt;&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;Summary:&lt;/strong&gt;&lt;br&gt;
Developed a complete mechanistic view of the universe: everything is made of atoms and empty space. The atoms were small, indivisible particles, unchanging like Parmenides&amp;rsquo; &amp;ldquo;being.&amp;rdquo; He believed there were infinitely many kinds of atoms making up all matter. This theory also beat Zeno&amp;rsquo;s paradox: you can&amp;rsquo;t infinitely divide the distance between the runner and the goal because there’s a smallest indivisible unit — the atom. He was the first &lt;em&gt;materialist&lt;/em&gt;.&lt;/p&gt;












&lt;figure style="display: block; margin: 0 auto; width: 100%; "&gt;
 &lt;img
 src="https://upload.wikimedia.org/wikipedia/commons/a/a4/Presocratic_graph.svg"
 loading="lazy"
 width=""
 height=""
 alt="Image"
 style="display: block; width: 100%; height: 100%; object-fit: contain; "
 &gt;
 
 &lt;figcaption style="text-align: center; margin-top: 0.5rem;"&gt; Relationship among the various pre-socratic philosophers and thinkers; red arrows indicate a relationship of opposition.&lt;/figcaption&gt;
 
&lt;/figure&gt;

&lt;h2 id="socrates-and-the-sophists"&gt;Socrates and the Sophists&lt;/h2&gt;
&lt;p&gt;These are all philosophers who lived around Socrates&amp;rsquo; time or shortly after and were directly influenced by him.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;470 BC – &lt;a href="https://en.wikipedia.org/wiki/Socrates"&gt;Socrates&lt;/a&gt;&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;Summary:&lt;/strong&gt;&lt;br&gt;
Socrates was famous for his &lt;em&gt;Socratic method&lt;/em&gt;, in which he questioned various people on the street about philosophical matters, first appearing ignorant, then pointing out contradictions in their positions. It was said that he left people either angry because he made them feel stupid, or angry because he wouldn’t leave them alone. One philosopher put it like this: &amp;ldquo;Socrates was the first to bring philosophy down from the heavens and place it into homes and cities.&amp;rdquo; In the end, he made so many people angry that they put him on trial and sentenced him to death.
He was one of the first philosophers to ask, &lt;em&gt;What is the good life?&lt;/em&gt; His answer: to gain peace of mind through living virtuously. He disputed the Sophists&amp;rsquo; claim that morals are relative and instead believed that morals were objective. He thought the only way to live a virtuous life was by knowing what virtues are through rigorous investigation: &lt;em&gt;&amp;ldquo;The unexamined life is not worth living.&amp;rdquo;&lt;/em&gt;
Socrates also didn’t believe in evil; he thought humans were simply misguided or missing knowledge. Thus: &lt;em&gt;&amp;ldquo;There is only good — knowledge — and one evil — ignorance.&amp;rdquo;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;470 BC – &lt;a href="https://en.wikipedia.org/wiki/Sophist"&gt;The Sophists&lt;/a&gt;&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;Summary:&lt;/strong&gt;&lt;br&gt;
Sophists were teachers who taught anything for the right price: rhetoric, music, mathematics, and more. They became important because of the need to win battles in court, but the Sophists didn’t teach &lt;em&gt;true&lt;/em&gt; knowledge. Instead, they taught how to win arguments through rhetoric.
They were skeptics, refusing to accept claims just because reason seemed to support them; instead, they demanded hard proof, which for them was human experience. They rejected abstract ideas like those from Democritus or Empedocles.
The Sophists believed that the experience of all people is equally valid, meaning they embraced moral relativism: &lt;em&gt;&amp;ldquo;Man is the measure of all things.&amp;rdquo;&lt;/em&gt;
&lt;em&gt;&amp;ldquo;Nothing is inherently good in itself; something is only right because a person judges it to be right.&amp;rdquo;&lt;/em&gt;
Sophists would say they didn’t teach people &lt;em&gt;more true&lt;/em&gt; knowledge but &lt;em&gt;more useful&lt;/em&gt; knowledge.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;430 BC – &lt;a href="https://en.wikipedia.org/wiki/Plato"&gt;Plato&lt;/a&gt;&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;Articles:&lt;/strong&gt; &lt;a href="https://monkemanx.github.io/articles/symposium/"&gt;What is Love?&lt;/a&gt;, &lt;a href="https://monkemanx.github.io/tangled_thoughts/philosophy_euthyphro_dillema/"&gt;Euthyphro Dilemma&lt;/a&gt;&lt;br&gt;
&lt;strong&gt;Summary:&lt;/strong&gt;&lt;br&gt;
Student of Socrates. He founded the first philosophical academy, which, in some form, survived for around 900 years.
Like Empedocles and Democritus, Plato thought that everything in the sensory world is in constant flux, but that there is still something infinite and unchangeable. For Plato, this unchanging reality was the &lt;em&gt;Forms&lt;/em&gt; — leading to his famous &lt;em&gt;Theory of Forms&lt;/em&gt;.
According to this theory, behind the world we experience with our senses exists another world: the &lt;em&gt;world of Forms&lt;/em&gt;. While the sensory world is imperfect, the world of Forms is perfect and contains the &lt;em&gt;patterns&lt;/em&gt; and &lt;em&gt;archetypes&lt;/em&gt; of all things.
Plato believed we can understand these Forms not through our senses but through reason, and that the life goal of every philosopher should be to understand as many Forms as deeply as possible, shown vividly in the &lt;em&gt;Allegory of the Cave&lt;/em&gt;.
Plato also believed that humans consist of two parts: the &lt;em&gt;body&lt;/em&gt; and the &lt;em&gt;soul&lt;/em&gt;. The soul is immaterial, immortal, and has always existed in the world of Forms. Since the soul is trapped in the human body, it feels longing for the world of Forms — this longing is what Plato called &lt;em&gt;Eros&lt;/em&gt; (love).
Thus, love of another human, or art, or music, is really the soul longing for the perfect Forms behind those things.
Humans seek immortality either through their children or through achieving lasting fame — what he called &amp;ldquo;intellectual children.&amp;rdquo;
He also founded political philosophy by presenting his vision of an ideal state.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;384 BC – &lt;a href="https://en.wikipedia.org/wiki/Aristotle"&gt;Aristotle&lt;/a&gt;&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;Articles:&lt;/strong&gt; &lt;a href="https://monkemanx.github.io/articles/aristotele_virtue_ethics/"&gt;Virtue Ethics from First Principles&lt;/a&gt;, &lt;a href="https://monkemanx.github.io/paper-summary/nicomachean_ethics_action_theory/"&gt;Nicomachean Ethics: Action Theory&lt;/a&gt;&lt;br&gt;
&lt;strong&gt;Summary:&lt;/strong&gt;&lt;br&gt;
Student of Plato. Aristotle was the first truly systematic philosopher, writing extensively on many subjects.
He disagreed with Plato&amp;rsquo;s Theory of Forms, arguing that the so-called &amp;ldquo;Forms&amp;rdquo; were not independent, pre-existing realities (&lt;em&gt;a priori&lt;/em&gt;), but rather constructs of human cognition.
While Plato believed nature is merely a reflection of true reality (the Forms), Aristotle believed that Forms and ideas are human reflections &lt;em&gt;of&lt;/em&gt; nature. As a result, he focused much more on everyday life than Plato did.
Aristotle was also much more empiricist, believing that there is no such thing as &lt;em&gt;a priori&lt;/em&gt; knowledge — all our knowledge comes from experience.
He believed everything in the world, including humans, has a &lt;em&gt;telos&lt;/em&gt; — a purpose or end it is meant to fulfill. For example, rain exists to nourish plants and animals.
Connected to this idea, he argued that every cause ultimately leads back to one primal cause, which he called the &lt;a href="https://en.wikipedia.org/wiki/Unmoved_mover"&gt;&lt;em&gt;Unmoved Mover&lt;/em&gt;&lt;/a&gt; — the first cause that moves everything else but is itself unmoved and self-causing.
He also developed &lt;em&gt;virtue ethics&lt;/em&gt;, believing that living a virtuous life is living a well-lived life. This belief is justified by the idea that everything has a &lt;em&gt;telos&lt;/em&gt;, and the telos of a thing is what is unique to it and what it excels at — in the case of humans, &lt;em&gt;virtue&lt;/em&gt;.&lt;/p&gt;
&lt;h2 id="hellenistic-philosophy"&gt;Hellenistic Philosophy&lt;/h2&gt;
&lt;p&gt;This time period begins with the conquests of Alexander the Great, during which Athens lost its leading position. During this era, Greek culture and language became dominant across all major kingdoms — Syria, Egypt, and Macedonia.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;400 BC – &lt;a href="https://en.wikipedia.org/wiki/Cynicism_(philosophy)"&gt;Cynicism&lt;/a&gt;&lt;/strong&gt;:&lt;br&gt;
&lt;strong&gt;Key Figures:&lt;/strong&gt; &lt;a href="https://en.wikipedia.org/wiki/Antisthenes"&gt;Antisthenes&lt;/a&gt;, &lt;a href="https://en.wikipedia.org/wiki/Diogenes"&gt;Diogenes&lt;/a&gt;, &lt;a href="https://en.wikipedia.org/wiki/Crates_of_Thebes"&gt;Crates of Thebes&lt;/a&gt;&lt;br&gt;
&lt;strong&gt;Articles:&lt;/strong&gt; &lt;a href="https://lucianofsamosata.info/wiki/doku.php?id=home:texts_and_library:dialogues:the-cynic"&gt;[Lucian], The Cynic&lt;/a&gt;, &lt;a href="https://monkemanx.github.io/tangled_thoughts/book_cynic03/"&gt;The Cynic Philosophers: From Diogenes to Julian&lt;/a&gt;&lt;br&gt;
&lt;strong&gt;Summary:&lt;/strong&gt;
The Cynics believed that the only thing that mattered for a life well lived was &lt;em&gt;virtue&lt;/em&gt;. Everything else — wealth, power, social status — should be rejected. In that vein, they also rejected social conventions and engaged in public displays of non-conformity, such as urination, masturbation, or even sex in public, to shock and challenge societal norms.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;300 BC – &lt;a href="https://en.wikipedia.org/wiki/Stoicism"&gt;Stoicism&lt;/a&gt;&lt;/strong&gt;:&lt;br&gt;
&lt;strong&gt;Key Figures:&lt;/strong&gt; &lt;a href="https://en.wikipedia.org/wiki/Zeno_of_Citium"&gt;Zeno of Citium&lt;/a&gt;, &lt;a href="https://en.wikipedia.org/wiki/Chrysippus"&gt;Chrysippus&lt;/a&gt;, &lt;a href="https://en.wikipedia.org/wiki/Epictetus"&gt;Epictetus&lt;/a&gt;&lt;br&gt;
&lt;strong&gt;Articles:&lt;/strong&gt; &lt;a href="https://monkemanx.github.io/paper-summary/seneca_on_trial/"&gt;Seneca on Trial: The Case of the Opulent Stoic&lt;/a&gt;, &lt;a href="https://monkemanx.github.io/tangled_thoughts/philosophy_logic/"&gt;Ancient Greek Logic&lt;/a&gt;, &lt;a href="https://monkemanx.github.io/tangled_thoughts/book_guide_of_stoicism/"&gt;The Cambridge Companion to the Stoics&lt;/a&gt;&lt;br&gt;
&lt;strong&gt;Summary:&lt;/strong&gt;&lt;br&gt;
Inspired by the Cynics, the Stoics also believed that &lt;em&gt;virtue&lt;/em&gt; was the highest good. However, unlike the Cynics, they did not reject worldly things like wealth or power — they viewed them with indifference. Having money was fine; not having money was also fine.
Stoicism developed an elaborate systematic philosophy. They believed that the universe was guided by a universal reason called the &lt;a href="https://en.wikipedia.org/wiki/Logos"&gt;&lt;em&gt;Logos&lt;/em&gt;&lt;/a&gt;, which consisted of an active principle acting upon a passive matter.
God was not seen as a personal agent but as a rational force identified with nature and the universe itself. Everything that happens — death, disease, change — follows the will of this divine Logos. Thus, humans should learn to accept their fate calmly and live in accordance with nature. For example, if one falls ill, one should not whimper but accept it serenely.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;300 BC – &lt;a href="https://en.wikipedia.org/wiki/Epicureanism"&gt;Epicureanism&lt;/a&gt;&lt;/strong&gt;:&lt;br&gt;
&lt;strong&gt;Key Figure:&lt;/strong&gt; &lt;a href="https://en.wikipedia.org/wiki/Epicurus"&gt;Epicurus&lt;/a&gt;&lt;br&gt;
&lt;strong&gt;Articles:&lt;/strong&gt; &lt;a href="https://monkemanx.github.io/paper-summary/letter_to_menoeceus/"&gt;Letter to Menoeceus&lt;/a&gt;, &lt;a href="https://classics.mit.edu/Epicurus/princdoc.html"&gt;Principal Doctrines&lt;/a&gt;, &lt;a href="https://monkemanx.github.io/paper-summary/letter_to_herodotus/"&gt;Letter to Herodotus&lt;/a&gt;&lt;br&gt;
&lt;strong&gt;Summary:&lt;/strong&gt;&lt;br&gt;
The Epicureans were the main opponents of the Stoics. They believed that &lt;em&gt;pleasure&lt;/em&gt; was the highest good, not virtue. However, they taught that the highest pleasures were not found in indulgence, but in restraint.
Pleasure was understood broadly, including not just physical pleasures but also higher pleasures like friendship, art, and intellectual pursuits.
On death, Epicurus famously said: &lt;em&gt;&amp;ldquo;Death is nothing to us, since when we are, death has not come, and when death has come, we are not.&amp;rdquo;&lt;/em&gt;
They believed in the existence of gods, but thought that the gods had no concern for the material world — they existed apart from human affairs.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;270 BC – &lt;a href="https://en.wikipedia.org/wiki/Neoplatonism"&gt;Neoplatonism&lt;/a&gt;&lt;/strong&gt;:&lt;br&gt;
&lt;strong&gt;Key Figures:&lt;/strong&gt; &lt;a href="https://en.wikipedia.org/wiki/Plotinus"&gt;Plotinus&lt;/a&gt;, &lt;a href="https://en.wikipedia.org/wiki/Porphyry_of_Tyre"&gt;Porphyry&lt;/a&gt;&lt;br&gt;
&lt;strong&gt;Articles:&lt;/strong&gt; &lt;a href="https://monkemanx.github.io/articles/nature_of_god/"&gt;Nature of God&lt;/a&gt;&lt;br&gt;
&lt;strong&gt;Summary:&lt;/strong&gt;&lt;br&gt;
Neoplatonism built upon Plato’s theory of Forms, the Stoic idea of Logos, and mystical elements from the East.
They differentiated between &lt;em&gt;the Nous&lt;/em&gt; (God), from which everything emanates outward, producing first the &lt;em&gt;realm of Forms&lt;/em&gt;, then nature and all matter.
The farther something is from the divine Nous, the less divinity and goodness it possesses. Matter without a soul — like stones or water — is thus the farthest from God.
However, humans retain a spark of the divine within them and an innate desire to return to the divine source. Through practice and discipline, one can achieve a &lt;em&gt;mystical experience&lt;/em&gt; in which the soul reunites with the Nous — this was seen as the ultimate goal of life.&lt;/p&gt;












&lt;figure style="display: block; margin: 0 auto; width: 60%; "&gt;
 &lt;img
 src="https://howtobeastoic.wordpress.com/wp-content/uploads/2017/01/img_7335.png"
 loading="lazy"
 width=""
 height=""
 alt="Image"
 style="display: block; width: 100%; height: 100%; object-fit: contain; "
 &gt;
 
&lt;/figure&gt;

&lt;h2 id="classical-rome"&gt;Classical Rome&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;0 BC – &lt;a href="https://en.wikipedia.org/wiki/Jesus"&gt;Jesus&lt;/a&gt;&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;Summary:&lt;/strong&gt;&lt;br&gt;
Founder of Christianity. Jesus introduced two major developments in theology:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;The shift from &lt;em&gt;polytheism&lt;/em&gt; (the belief in multiple gods) to &lt;em&gt;monotheism&lt;/em&gt; (the belief in a singular God), which brought many philosophical advantages. For example, the concept of one ultimate unmoved mover.&lt;/li&gt;
&lt;li&gt;In the Greek tradition, the world was seen as something that could be explored through reason, and faith wasn’t highly emphasized. In contrast, Christianity introduced the view that God is fundamentally mysterious and cannot be fully understood by human reason. As such, &lt;em&gt;faith&lt;/em&gt; became a virtue to strive for.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Christianity also brought a new worldview. The Greek tradition held a &lt;em&gt;cyclical&lt;/em&gt; view of the world, where time repeats in cycles. Christianity, however, adopted a &lt;em&gt;linear&lt;/em&gt; view of history: the world was created at the beginning of time, and someday it will all end with the Last Judgment. Additionally, in Christianity, there is no idea of an &lt;strong&gt;immortal soul&lt;/strong&gt; separate from the body; instead, the flesh itself, the body, will be resurrected by God and made immortal.&lt;/p&gt;
&lt;h2 id="middle-ages"&gt;Middle Ages&lt;/h2&gt;
&lt;p&gt;The medieval age began with the fall of the Roman Empire and was deeply shaped by Christianity.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;350 CE — &lt;a href="https://en.wikipedia.org/wiki/Augustine_of_Hippo"&gt;Augustine of Hippo&lt;/a&gt;:&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;Media:&lt;/strong&gt; &lt;a href="https://monkemanx.github.io/tangled_thoughts/movie_kpop_demon_hunter/"&gt;KPop Demon Hunter&lt;/a&gt;&lt;br&gt;
&lt;strong&gt;Summary:&lt;/strong&gt;&lt;br&gt;
One of the most famous Christian theologians, Augustine, in his book &lt;em&gt;Confessions&lt;/em&gt;, described a proto-archetypical story of a sinner&amp;rsquo;s journey toward redemption through Christianity. He also wrote extensively against what he deemed Christian heresies, two of the most important being Manichaeism and Pelagianism.&lt;/p&gt;
&lt;p&gt;Manichaeism believed that, besides the Christian God, there was another god responsible for all the evil in the world. Augustine argued this belief was problematic because it removed human agency—people could always blame their wrongdoings on the evil god, making it morally fatalistic.&lt;/p&gt;
&lt;p&gt;Pelagianism, on the other hand, believed humans could achieve perfection and grace on their own. Augustine thought this was equally problematic, as it demanded moral perfection without reliance on divine grace. Instead, he proposed a &amp;ldquo;middle way&amp;rdquo;: while virtuous actions are important, grace ultimately comes from God. This view later became the foundation of Catholic doctrine.&lt;/p&gt;
&lt;p&gt;Augustine was also highly influenced by Neoplatonism and Platonic thought, believing that the theory of forms existed within the mind of God, and that evil is simply the absence of good.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;1225 CE — &lt;a href="https://en.wikipedia.org/wiki/Thomas_Aquinas"&gt;Thomas Aquinas&lt;/a&gt;:&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;Articles:&lt;/strong&gt; &lt;a href="https://monkemanx.github.io/articles/ontological_argument_and_apophatic_theology/"&gt;Ontological Argument and Apophatic theology&lt;/a&gt;&lt;br&gt;
&lt;strong&gt;Summary:&lt;/strong&gt;&lt;br&gt;
Famous for his work &lt;em&gt;Summa Theologiae&lt;/em&gt;, Thomas Aquinas sought to derive Christian doctrine through natural theology—that is, not directly from sacred texts, but by observing nature. His project can be seen as &amp;ldquo;Christianizing&amp;rdquo; Aristotle: unlike Plato&amp;rsquo;s influence on Augustine, where the divine was found in a realm of ideas, Aquinas, following Aristotle, looked to the natural world. Like Aristotle, Aquinas was extremely systematic in his approach.&lt;/p&gt;
&lt;p&gt;His fundamental project was integrating the newly reintroduced Greek philosophical texts—especially Aristotle’s works, which had been preserved and transmitted through Arabic scholars—into a Christian framework, making them compatible with Christian theology.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;1260 CE — &lt;a href="https://en.wikipedia.org/wiki/Meister_Eckhart"&gt;Meister Eckhart&lt;/a&gt;:&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;Articles:&lt;/strong&gt; &lt;a href="https://monkemanx.github.io/articles/commentary_9th_sermon_eckhart/"&gt;A Commentary on the 9th Sermon of Meister Eckhart&lt;/a&gt;&lt;br&gt;
&lt;strong&gt;Summary:&lt;/strong&gt;&lt;br&gt;
One of the most important Christian mystics, Meister Eckhart is most famous for his collection of sermons in which he describes his mystical experiences. He stands in stark contrast to the mainstream theory of Scholasticism of his day, as logic alone is not enough to understand God&amp;rsquo;s grace.&lt;/p&gt;
&lt;p&gt;Central to his sermons is the idea that Eckhart speaks from the viewpoint of God, arguing that only when we step outside of time, space, and even logic can we gesture towards God.&lt;/p&gt;
&lt;p&gt;If Aquinas is the greatest systematic theologian of Catholicism, then Meister Eckhart is the greatest anti-systematic theologian. His writing is very similar to Nietzsche’s, but unlike Nietzsche’s aphorisms, Eckhart’s points toward the divine rather than away from it.&lt;/p&gt;
&lt;p&gt;Meister Eckhart makes a fundamental distinction between &lt;em&gt;God&lt;/em&gt; and the &lt;em&gt;Godhead&lt;/em&gt;. God can be seen as the creator who made everything around us, and we can talk about Him in a rough way. This God is dynamic: He began creation and is revealed in scripture. He is imminent. The Godhead, however, is the divine essence, which cannot be spoken about and is totally static. The Godhead is as far away from God as heaven is from earth; it is transcendent.&lt;/p&gt;
&lt;p&gt;How can we account for experiences in which the object and subject break down, where grammar and language no longer work? All we can use is metaphors and imagery. Eckhart tries to talk about something that doesn’t fit into language, and when one speaks or communicates about these religious experiences, all one can use are inspired metaphors. These metaphors don’t directly tell us something about God, but they gesture toward Him, bringing within us some change or inspiration.&lt;/p&gt;
&lt;p&gt;The big problem, with mystics, is that it’s hard to discern what they are truly talking about. They offer beautiful metaphors or imagery, but they can’t give us much more than that. But at the very least they make us think.&lt;/p&gt;
&lt;h2 id="renaissance-and-age-of-enlightenment"&gt;Renaissance and Age of Enlightenment&lt;/h2&gt;
&lt;p&gt;The Renaissance and Age of Enlightenment, spanning roughly from 1400 to 1700.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;1483 CE – &lt;a href="https://en.wikipedia.org/wiki/Martin_Luther"&gt;Martin Luther&lt;/a&gt;&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;Summary:&lt;/strong&gt;&lt;br&gt;
Founder of the Protestant movement. Luther wanted to distance himself from Christian doctrine because he saw the Church as misusing its power and going against scripture by selling indulgences. He sought to return to the origins found in the New Testament, emphasizing that the Church was no longer necessary to receive God&amp;rsquo;s grace. Instead, personal connection to God took precedence. His motto was &lt;em&gt;&amp;ldquo;grace by faith and scripture alone.&amp;rdquo;&lt;/em&gt;
One can think of Luther&amp;rsquo;s ideas as a radicalization of Saint Augustine&amp;rsquo;s thoughts on human depravity — that humans can only await God&amp;rsquo;s grace. He rejected the scholastic tradition, such as the work of Thomas Aquinas, criticizing their attempts to reconcile Aristotelian reason with religion. For Luther, &amp;ldquo;reason was the devil’s whore.&amp;rdquo;
Luther shifted Christian doctrine from a focus on works to an incorruptible faith: salvation came not through actions, but through a change in the soul infused by God. It was no longer necessary to go to a priest to receive salvation; instead, he introduced the concept of the &lt;em&gt;priesthood of all believers&lt;/em&gt;.
Through this doctrine, Luther was the first to move away from the corporate and communal identity of people toward a more individualistic one. This paved the way for later Enlightenment thinkers, shifting moral responsibility from the group to the individual — a trajectory that eventually led to the modern concept of human rights. Luther stands as a bridge between the medieval scholastic static-self and the modern idea of the rights of man.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;1599 CE – &lt;a href="https://en.wikipedia.org/wiki/Thomas_Hobbes"&gt;Thomas Hobbes&lt;/a&gt;&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;Articles:&lt;/strong&gt; &lt;a href="https://monkemanx.github.io/paper-summary/leviathan/"&gt;Selected Chapters of Hobbes&amp;rsquo; &lt;em&gt;Leviathan&lt;/em&gt;&lt;/a&gt;&lt;br&gt;
&lt;strong&gt;Summary:&lt;/strong&gt;&lt;br&gt;
Most famous for writing &lt;em&gt;Leviathan&lt;/em&gt;, in which he argues about the nature of government and society. Hobbes believed the natural state of humanity is chaos — a &lt;em&gt;&amp;ldquo;war of all against all.&amp;rdquo;&lt;/em&gt; Only through the establishment of an absolute sovereign, to whom all power is transferred, can peace and order be maintained.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;1596 CE – &lt;a href="https://en.wikipedia.org/wiki/Ren%C3%A9_Descartes"&gt;René Descartes&lt;/a&gt;&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;Summary:&lt;/strong&gt;&lt;br&gt;
The most famous of the Rationalists, Descartes believed that knowledge is gained through reason. He was the first systematic philosopher of the Enlightenment era to incorporate the Renaissance&amp;rsquo;s new image of humanity into a coherent system addressing all major philosophical questions of his time.
A major contribution of Descartes was his theory about the relationship between the body and the soul. He argued for a strict separation between them — a view known as &lt;em&gt;dualism&lt;/em&gt;.
Another key idea was his radical skepticism: the only certainty he could find was that he existed — &lt;em&gt;&amp;ldquo;Cogito, ergo sum&amp;rdquo;&lt;/em&gt; (&lt;em&gt;&amp;ldquo;I think, therefore I am&amp;rdquo;&lt;/em&gt;). From this starting point, he reasoned that the idea of a perfect being (&lt;em&gt;a priori&lt;/em&gt;) must come from God, and thus God must exist.
Building on this, Descartes concluded that experiences we perceive clearly and directly must also be real — because a benevolent God would not deceive us.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;1632 CE – &lt;a href="https://en.wikipedia.org/wiki/Baruch_Spinoza"&gt;Baruch Spinoza&lt;/a&gt;&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;Summary:&lt;/strong&gt;&lt;br&gt;
Another prominent Rationalist, Spinoza advocated for a critical reading of the Bible, taking into account the historical context of its creation.
He rejected Descartes&amp;rsquo; dualism, proposing instead a &lt;em&gt;monist&lt;/em&gt; philosophy: that there is only one substance, which he identified with both nature and God — a view known as &lt;em&gt;pantheism&lt;/em&gt;, inspired by Stoic thought.
Spinoza&amp;rsquo;s most important work focused on ethics. He argued that everything that exists is either &lt;em&gt;cogitatio&lt;/em&gt; (thought) or &lt;em&gt;extensio&lt;/em&gt; (extension) — the two modes (&lt;em&gt;modi&lt;/em&gt;) of existence.
Since everything operates according to natural laws and is completely deterministic, Spinoza concluded that human thoughts and actions are simply manifestations of nature — and thus of God.
However, Spinoza&amp;rsquo;s God was not a personal deity, but more akin to a force or natural law.
Because humans do not control their bodies or their thoughts, he argued, we lack free will. Everything happens out of necessity. Therefore, Spinoza advised viewing the world &lt;em&gt;sub specie aeternitatis&lt;/em&gt; — &lt;em&gt;from the perspective of eternity&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;1632 CE &lt;a href="https://en.wikipedia.org/wiki/John_Locke"&gt;John Locke&lt;/a&gt;&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;Summary:&lt;/strong&gt;&lt;br&gt;
Locke was the first empiricist, believing that we can gain knowledge only through our senses and experiences. As such, he rejected the notion of &lt;em&gt;a priori&lt;/em&gt; knowledge. His most important work was &lt;em&gt;An Essay Concerning Human Understanding&lt;/em&gt;, in which he describes how all thoughts and imagination are reflections of our sensory experiences. Prior to receiving sensory input, he claimed, the mind is like a blank piece of paper.
Based on our senses, we develop simple &lt;em&gt;sense ideas&lt;/em&gt;, and through thinking and reflection on these ideas, more complex &lt;em&gt;reflection ideas&lt;/em&gt; are created — these are made by piecing together simpler ideas.
Furthermore, Locke differentiated between &lt;em&gt;primary qualities&lt;/em&gt; and &lt;em&gt;secondary qualities&lt;/em&gt;: primary qualities include form, weight, movement, and number, while secondary qualities include things like sweetness, sourness, and colors such as green or red. Locke believed that people could generally agree on primary qualities, but not on secondary qualities, as they differ from animal to animal and from human to human.
Despite his empiricism, Locke did hold some rationalist views, believing that &lt;em&gt;natural laws&lt;/em&gt;, foundational ethical principles, and the knowledge of God&amp;rsquo;s existence are innate to every human being.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;1685 CE &lt;a href="https://en.wikipedia.org/wiki/George_Berkeley"&gt;George Berkeley&lt;/a&gt;&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;Summary:&lt;/strong&gt;&lt;br&gt;
Berkeley was the third major empiricist, alongside Locke and Hume, and at the same time one of the earliest idealists. He believed that everything we can know comes through our senses, and that the world is exactly as we perceive it. However, he argued that what we sense is not made of matter or substance but of the will of God — in other words, reality is made of spirit.
God is intimately present within our consciousness and calls forth all the ideas and sensory experiences we have. Nature itself, in Berkeley’s view, is an expression of God, who is the sole cause of all existence.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;1711 CE &lt;a href="https://en.wikipedia.org/wiki/David_Hume"&gt;David Hume&lt;/a&gt;&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;Articles:&lt;/strong&gt; &lt;a href="https://monkemanx.github.io/paper-summary/enquiry_human_understanding/"&gt;An Enquiry Concerning Human Understanding and Other Writings: Sceptical doubts&lt;/a&gt;, &lt;a href="https://monkemanx.github.io/tangled_thoughts/hume/"&gt;David Hume and Empiricism&lt;/a&gt;&lt;br&gt;
&lt;strong&gt;Summary:&lt;/strong&gt;&lt;br&gt;
Probably the greatest empiricist. Like Locke, he believed in &lt;em&gt;composite ideas&lt;/em&gt;, arguing, for example, that things like angels do not exist independently but are combinations of simpler ideas like &lt;em&gt;man&lt;/em&gt; and &lt;em&gt;wings&lt;/em&gt;.
Hume was very radical in his criticism of &lt;em&gt;metaphysical&lt;/em&gt; and &lt;em&gt;religious&lt;/em&gt; works, famously writing:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&amp;ldquo;If we take in our hand any volume of divinity or school metaphysics, for instance, let us ask, &amp;lsquo;Does it contain any abstract reasoning concerning quantity or number? No. Does it contain any experimental reasoning concerning matter of fact and existence? No.&amp;rsquo; Commit it then to the flames: for it can contain nothing but sophistry and illusion.&amp;rdquo;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Hume distinguished between &lt;em&gt;impressions&lt;/em&gt; and &lt;em&gt;ideas&lt;/em&gt;: impressions are direct perceptions of reality through our senses, while ideas are the memories of impressions. Both impressions and ideas can be &lt;em&gt;simple&lt;/em&gt; or &lt;em&gt;composite&lt;/em&gt;. Importantly, Hume emphasized that some composite ideas created by our minds do not correspond to reality (e.g., angels, Pegasus) and can lead to false beliefs about things that do not truly exist.
He also pointed out the &lt;em&gt;problem of induction&lt;/em&gt; — that we cannot logically justify inductive reasoning and therefore cannot be certain that natural laws (like causality) will hold forever.
In ethics, Hume rejected the idea of inborn ethical &lt;em&gt;natural laws&lt;/em&gt;. Instead, he believed morality was based on emotions: we help others or think killing is wrong because of feelings like compassion, not because of reason.
In works such as &lt;em&gt;Dialogues Concerning Natural Religion&lt;/em&gt;, Hume argued that even if God exists, we cannot know anything about Him beyond the fact that He created the world. &lt;em&gt;A priori&lt;/em&gt; knowledge of God is impossible because God is not bound by any logical axioms, and &lt;em&gt;a posteriori&lt;/em&gt; knowledge reveals only that the world exists, without attributing any properties to God. Any attempt to describe God would limit His nature (e.g., saying a table is made of wood excludes it being made of steel).
Hume also influenced how we think about miracles, arguing that we should only believe in a miracle if not believing would require accepting an even greater miracle.
Through these ideas, Hume undermined the Enlightenment project of reconciling faith and reason — particularly deism — and laid the foundation for Romanticism, which chose faith over reason.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;1724 CE &lt;a href="https://en.wikipedia.org/wiki/Immanuel_Kant"&gt;Immanuel Kant&lt;/a&gt;&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;Media:&lt;/strong&gt; &lt;a href="https://monkemanx.github.io/tangled_thoughts/movie_no_country_old_man/"&gt;No Country for Old Men&lt;/a&gt;&lt;br&gt;
&lt;strong&gt;Summary:&lt;/strong&gt;&lt;br&gt;
Coming after the era of empiricism and rationalism, one of Kant’s major projects was to resolve the dispute between the two camps. He argued that both reason and sensory experience are crucial for gaining knowledge of the world.
Kant agreed with the empiricists that all knowledge originates in sensory experience, but he also argued that certain structures in our reason shape how we experience the world. He compared this to wearing colored sunglasses: the world itself remains the same, but the sunglasses (reason’s structures) tint everything we perceive.
One such innate structure, according to Kant, is that we perceive everything within &lt;em&gt;time and space&lt;/em&gt;. Thus, &lt;em&gt;time and space&lt;/em&gt; are not properties of the external world but of human consciousness. This means consciousness is not passive but actively shapes our experience.
Another inborn structure, Kant argued, is the &lt;em&gt;law of causality&lt;/em&gt;, which, contrary to Hume’s doubts, exists not in the external world but within our reasoning.
Kant distinguished between &lt;em&gt;das Ding an sich&lt;/em&gt; (the &amp;ldquo;thing-in-itself,&amp;rdquo; reality as it truly is, which we can never access) and &lt;em&gt;das Ding für mich&lt;/em&gt; (the &amp;ldquo;thing-for-me,&amp;rdquo; reality as shaped by our consciousness). Therefore, there is a boundary to human knowledge we cannot cross.
For Kant, this is where religion enters: as a Protestant, he believed that only faith can cross the boundary of knowledge. He described belief in God&amp;rsquo;s existence as a &lt;em&gt;practical postulate&lt;/em&gt; — something we accept because it is practically necessary, similar to an axiom in mathematics.
In ethics, Kant argued for &lt;em&gt;natural laws&lt;/em&gt; of morality, which are inborn in every human, universal across all places and times. He called this the &lt;em&gt;Categorical Imperative&lt;/em&gt;, a moral law that commands (&amp;ldquo;imperative&amp;rdquo;) unconditionally (&amp;ldquo;categorical&amp;rdquo;).
Central to the Categorical Imperative is the idea that we should act only according to principles we would want to become universal laws.
Kant believed that only when humans freely choose to follow moral laws do they truly exercise free will; otherwise, they are slaves to their desires, money, or egoism.
Importantly, Kant extended the Categorical Imperative beyond individuals to groups — families, clans, and nations — leading to ideas like the &lt;em&gt;League of Nations&lt;/em&gt;, founded with Kantian moral principles in mind.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;1770 CE &lt;a href="https://en.wikipedia.org/wiki/Georg_Wilhelm_Friedrich_Hegel"&gt;Georg Wilhelm Friedrich Hegel&lt;/a&gt;&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;Summary:&lt;/strong&gt;&lt;br&gt;
A German Romantic idealist philosopher. Central to Hegel’s thought is the notion of the &lt;em&gt;world soul&lt;/em&gt; or &lt;em&gt;world spirit&lt;/em&gt; (&lt;em&gt;Weltgeist&lt;/em&gt;), which he understood as the sum of all human spirits and consciousnesses. Only humans, according to Hegel, possess spirit, and when he speaks of spirit, he means the life of humanity — our thoughts, our culture, our history.
Hegel rejected Kant’s idea of &lt;em&gt;das Ding an sich&lt;/em&gt; (&amp;ldquo;the thing-in-itself&amp;rdquo;). For Hegel, all truth is subjective; all knowledge is human knowledge. The only truth is that which we experience through our subjective spirit. In other words, if, as Kant said, there is no way for us to experience the &amp;ldquo;thing-in-itself,&amp;rdquo; perhaps it does not even exist?
However, this leads to a danger: if only individual subjective experience exists, it could result in idealistic solipsism — the belief that only one’s own mind truly exists and everything else is a construction of the mind.
Hegel avoids this trap by proposing that the world is not constructed by individual minds but by a &lt;em&gt;collective mind&lt;/em&gt; — the &lt;em&gt;world spirit&lt;/em&gt; or &lt;em&gt;Geist&lt;/em&gt;. This spirit can be identified with the divine or the unfolding rationality of the universe.&lt;/p&gt;
&lt;p&gt;Unlike most philosophers before him who sought eternal, unchanging truths, Hegel rooted philosophy in history. He saw history as a dynamic, flowing process — like a river that constantly changes, so that while we cannot focus on a single static point, we can still understand the river as a whole.
For Hegel, reason is dynamic and evolves over time: what was once considered acceptable (like slavery) is now rejected, showing that truth itself progresses through history. This view sharply contrasts with Kant, who believed the a priori forms of knowledge were fixed and unchanging.
For Hegel, the historical development of reason — the unfolding of the world spirit — is a process of gradual awakening to self-consciousness, ultimately striving toward infinity and absolute knowledge.&lt;/p&gt;
&lt;p&gt;A key concept in Hegel’s philosophy is the &lt;em&gt;dialectical method&lt;/em&gt;. In this process:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;A &lt;em&gt;thesis&lt;/em&gt; (an idea) arises.&lt;/li&gt;
&lt;li&gt;It encounters an &lt;em&gt;antithesis&lt;/em&gt; (its opposite).&lt;/li&gt;
&lt;li&gt;From the conflict between them, a &lt;em&gt;synthesis&lt;/em&gt; emerges, combining elements of both.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This dialectic drives the development of history and thought. For example, the thesis of rationalism faced the antithesis of empiricism, leading to the synthesis found in Kant’s philosophy.
Another example:
&lt;em&gt;Being&lt;/em&gt; (thesis) vs. &lt;em&gt;Nothing&lt;/em&gt; (antithesis) results in &lt;em&gt;Becoming&lt;/em&gt; (synthesis).&lt;/p&gt;
&lt;p&gt;Because of his belief in the world spirit manifesting through collective humanity, Hegel had a strong appreciation — almost worship — of the state. He saw the state as the realization of the world spirit in a particular historical moment. Everyone is born into a historical context as part of a state, and participation in the state is, for Hegel, participation in history and in the evolution of the world spirit.&lt;/p&gt;
&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Dialectical Process Applied to the History of Metaphysical Philosophy&lt;/summary&gt;
 
 &lt;p&gt;A short, semi-accurate exercise to apply Hegel&amp;rsquo;s method of dialectics to the history of philosophical metaphysics.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Thesis:&lt;/strong&gt; Classical Platonism - Emphasis on transcendent Forms: eternal, unchanging realities that underlie the sensible world.
&lt;strong&gt;Antithesis:&lt;/strong&gt; Hellenistic Philosophies (Stoicism, Epicureanism, Skepticism) - The divine is immanent in the cosmos (Logos pervades all things).
&lt;strong&gt;Synthesis:&lt;/strong&gt; Neoplatonism - Stoic immanence is now a reflection of higher realms.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Thesis:&lt;/strong&gt; Platonic and Neoplatonic thought - The world is fundamentally rational and can be discovered and reasoned about; faith is a vice.
&lt;strong&gt;Antithesis:&lt;/strong&gt; Christianity - The world is fundamentally mystical; exploring the divine nature of God is foolish, and faith becomes a virtue.
&lt;strong&gt;Synthesis:&lt;/strong&gt; Platonic Christianity - Christianity absorbs Platonic metaphysics to articulate Christian doctrine: God as the ultimate Good, the soul’s fallen condition and longing for return. Augustine reinterprets Plato’s world of Forms as ideas in the mind of God and the Neoplatonic connection of the soul with the divine as God’s grace.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Thesis:&lt;/strong&gt; Platonic Christianity - Strong influence from Plato: the eternal realm of Forms becomes the realm of divine Ideas; the soul longs to return to God, the source of truth. Emphasis on inner illumination and divine grace: true knowledge is a turning inward, aided by God. Faith precedes and sometimes even outweighs reason (e.g., Augustine).
&lt;strong&gt;Antithesis:&lt;/strong&gt; Aristotelian Naturalism - Aristotle’s works are reintroduced to the Latin West. Emphasizes empirical observation, causality, and logic. God is not a personal deity in the same sense but a prime mover, accessible through metaphysical argument. True knowledge is gained by turning outward. This challenged the more mystical, Platonic Christian view by grounding knowledge in nature, not just divine revelation.
&lt;strong&gt;Synthesis:&lt;/strong&gt; Scholasticism&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Thesis:&lt;/strong&gt; Scholasticism - Knowledge comes from divine revelation and sacred texts, interpreted through reason and tradition (e.g., Aquinas).
&lt;strong&gt;Antithesis:&lt;/strong&gt; Renaissance - Reason and faith are fundamentally incompatible with each other.
&lt;strong&gt;Synthesis:&lt;/strong&gt; Rationalism - Seeks certainty through reason alone, independent of religious tradition.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Thesis:&lt;/strong&gt; Rationalism – Knowledge comes from reason.
&lt;strong&gt;Antithesis:&lt;/strong&gt; Empiricism – Knowledge comes from sense experience.
&lt;strong&gt;Synthesis:&lt;/strong&gt; Kant – Our knowledge is shaped by both sense data and a priori categories of the mind. But we can never know the &lt;em&gt;Ding an sich&lt;/em&gt; (thing-in-itself).&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Thesis:&lt;/strong&gt; Kant – There is a noumenal world, but we can’t know it.
&lt;strong&gt;Antithesis:&lt;/strong&gt; Hegel – The &lt;em&gt;Ding an sich&lt;/em&gt; is a useless abstraction. Reality is not hidden behind appearances; it&amp;rsquo;s a dynamic process we participate in. The mind and reality co-develop through dialectical history.
&lt;strong&gt;Synthesis:&lt;/strong&gt; Heidegger (?), Husserl (?)&lt;/p&gt;

 
&lt;/details&gt;


&lt;p&gt;&lt;strong&gt;1788 CE &lt;a href="https://en.wikipedia.org/wiki/Arthur_Schopenhauer"&gt;Arthur Schopenhauer&lt;/a&gt;&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;Summary:&lt;/strong&gt;&lt;br&gt;
For most of his life, Schopenhauer was almost completely disregarded. He only gained recognition later, primarily for his masterpiece &lt;em&gt;The World as Will and Representation&lt;/em&gt;. All his later writings were aimed at expanding and deepening this central work.&lt;/p&gt;
&lt;p&gt;Although his philosophy follows in the tradition of Kant and Western thought, Schopenhauer was also deeply familiar with Eastern traditions such as Hinduism and Buddhism, which heavily influenced him. He was also an impressive system-builder in his own right.&lt;/p&gt;
&lt;p&gt;Schopenhauer sought to understand the world he lived in by identifying its underlying reality. Starting from Kant’s epistemology, he agreed that we only perceive the world as &lt;em&gt;phenomena&lt;/em&gt; — shaped by the human mind — and that the &lt;em&gt;noumenon&lt;/em&gt; (or &lt;em&gt;das Ding an sich&lt;/em&gt;, the “thing-in-itself”) lies beyond our direct experience.&lt;/p&gt;
&lt;p&gt;While Kant claimed we could never know the &lt;em&gt;thing-in-itself&lt;/em&gt;, Schopenhauer tried to find clues to it through introspection and analysis of experience. He argued that for anything to be different from something else, it must differ in time or space — both of which are forms of human perception, not part of the world-in-itself. Therefore, the noumenal world must be fundamentally &lt;em&gt;one&lt;/em&gt;, lacking multiplicity or separateness.&lt;/p&gt;
&lt;p&gt;This view echoes certain ideas in Hinduism and Buddhism — not because Schopenhauer borrowed directly from them, but because he reasoned toward similar conclusions through Kantian philosophy.&lt;/p&gt;
&lt;p&gt;He believed that while we perceive ourselves externally as physical objects, we also have &lt;em&gt;immediate&lt;/em&gt;, non-sensory access to ourselves from the inside — through our inner life. This introspective awareness, however, is still limited; much of our behavior is unconscious, and our self-perception is filtered through time and subjectivity. Thus, even this doesn’t give us full access to the &lt;em&gt;thing-in-itself&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;So how did Schopenhauer attempt to grasp the noumenal world?&lt;/p&gt;
&lt;p&gt;By analyzing our internal experience, he concluded that its core is not thought, reason, or matter — but &lt;em&gt;will&lt;/em&gt;. This “will” is not a personal or conscious force, but a blind, aimless striving — an impersonal, energetic principle. One could also think of it as analogous to “energy,” long before Einstein’s equation (E=mc²) described matter and energy as interchangeable.&lt;/p&gt;
&lt;p&gt;Based on this view, Schopenhauer saw the world as a horrifying place — full of suffering, disease, death, and relentless struggle. If the world of appearances reflects the nature of the underlying reality, then the noumenal world must be deeply troubling. That’s why Schopenhauer is often called one of the great philosophical pessimists.&lt;/p&gt;
&lt;p&gt;Still, he believed there were temporary ways to escape suffering. One was through aesthetic experience — art. Normally, when we see something (e.g., food), we immediately desire it. But when we view a painting, we engage with it in a detached, contemplative way. Art, then, allows us to step outside our will-driven existence and glimpse something deeper.&lt;/p&gt;
&lt;p&gt;Because Schopenhauer believed that all reality is one, he also thought that all humans are fundamentally one. Therefore, compassion and empathy are the basis of morality. To harm another is to harm oneself. This sense of unity in suffering forms the foundation of ethical behavior.&lt;/p&gt;
&lt;p&gt;Ultimately, since reality is driven by a blind and painful will, Schopenhauer believed the best path was to &lt;em&gt;deny the will&lt;/em&gt; — to detach from worldly desires and reject striving altogether. This final step in his philosophy mirrors certain Buddhist ideas about renunciation.&lt;/p&gt;
&lt;p&gt;The philosophers most influenced by Schopenhauer include Nietzsche, Freud, and Wittgenstein.&lt;/p&gt;
&lt;h2 id="modern-age"&gt;Modern Age&lt;/h2&gt;
&lt;p&gt;The Modern Age, spanning roughly from 1800 to 1950.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;1813 CE &lt;a href="https://de.wikipedia.org/wiki/S%C3%B8ren_Kierkegaard"&gt;Søren Kierkegaard&lt;/a&gt;&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;Media:&lt;/strong&gt; &lt;a href="https://monkemanx.github.io/tangled_thoughts/movie_angles_egg/"&gt;Angels Egg (1985)&lt;/a&gt;&lt;br&gt;
&lt;strong&gt;Summary:&lt;/strong&gt;&lt;br&gt;
A Christian existential philosopher and partly Romantic. Kierkegaard was less concerned with this world, as most Romantics were, and more focused on the next world — the world of God. Passion, for him, was not for its own sake, but for God and faith. He responded to the Enlightenment&amp;rsquo;s failure to reconcile faith and reason by choosing faith. A strong critic of European culture, particularly what he called &amp;ldquo;Sunday Christianity,&amp;rdquo; Kierkegaard believed that true Christianity cannot be turned on and off; its message is so powerful that it must permeate one&amp;rsquo;s whole life. Faith for him was like water and fire with reason — incompatible. He didn’t consider objective truth or reason to be very important. Instead, he focused on the truth of how one should live. For Kierkegaard, living well was the most important thing.&lt;/p&gt;
&lt;p&gt;A critic of Hegel, Kierkegaard was deeply individualistic, in contrast to Hegel’s emphasis on the communal. He thought Hegel stole away human agency, making people mere products of history. For him, the individual’s existence and life were central, and philosophy should not dwell on metaphysical speculations. Our time on earth is short, and we should focus on living well and finding subjective truths.&lt;/p&gt;
&lt;p&gt;Since humans can never fully comprehend God’s truth, we must believe. He emphasized that it does not matter if Christianity is objectively true; what matters is whether it is true for the individual.&lt;/p&gt;
&lt;p&gt;He divided life into three stages:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;em&gt;Aesthetic&lt;/em&gt;: Living for pleasure and momentary joys (common in Romanticism).&lt;/li&gt;
&lt;li&gt;&lt;em&gt;Ethical&lt;/em&gt;: Living according to virtue.&lt;/li&gt;
&lt;li&gt;&lt;em&gt;Religious&lt;/em&gt;: Following Christian tradition and making a leap of faith.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Kierkegaard believed that one must choose between a life of religious faith or secular skepticism and reason — they cannot mix, and there is no objective standard for making this choice. This existential decision shapes the rest of one’s life.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;1818 CE &lt;a href="https://en.wikipedia.org/wiki/Karl_Marx"&gt;Karl Marx&lt;/a&gt;&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;Summary:&lt;/strong&gt;&lt;br&gt;
Marx’s starting point was Hegel, but he diverged from Hegel’s idealism into a more practical, political philosophy. He can be described as a historical materialist, arguing that the material conditions of life shape human reasoning. Marx agreed with Hegel’s dialectical method, but instead of the spiritual development of society (as Hegel thought), he argued that the material conditions — the &lt;em&gt;basis&lt;/em&gt; of society — determine its spiritual and intellectual life — the &lt;em&gt;superstructure&lt;/em&gt;. The &lt;em&gt;basis&lt;/em&gt; consists of the economic forces, particularly the ownership of production, which determines the political and ideological structure of society.&lt;/p&gt;
&lt;p&gt;Marx believed the ruling class, who controls the means of production, also controls the moral framework of society. There is no eternal natural law, and all of history is a &lt;em&gt;history of class struggle&lt;/em&gt;, where those who control the means of production dominate society. Marx’s theory of capitalism predicted that the system would eventually collapse. As capitalists reinvest in production, creating more efficient factories, fewer workers would be needed, leading to a classless society where everyone owns the means of production, thus resulting in communism.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;1844 CE &lt;a href="https://en.wikipedia.org/wiki/Friedrich_Nietzsche"&gt;Friedrich Nietzsche&lt;/a&gt;&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;Summary:&lt;/strong&gt;&lt;br&gt;
Existentialist thinkers differ greatly: when Kierkegaard asks the question of faith versus reason and chooses faith, Nietzsche chooses reason. Nietzsche is amoral; for him, morality is an impediment to the superior man. Instead, Nietzsche focuses on power. He wants to replace religion with art. One can compare Nietzsche to a seismograph—he could sense the beginnings of an intellectual earthquake that would later disrupt academia greatly. He did not create this earthquake, but he was able to foresee the implications of Western thought and the crisis the West entered after Darwin.&lt;/p&gt;
&lt;p&gt;This earthquake Nietzsche detects can be encapsulated in the sentence: &amp;ldquo;God is dead, God remains dead, and we have killed him.&amp;rdquo; Nietzsche did not kill God; rather, the development of Western culture and science—shifting from a mysterious, mythological interpretation of the world to a more sophisticated, naturalistic, and scientific outlook—did.&lt;/p&gt;
&lt;p&gt;Nietzsche is warning of the end of theology, metaphysics, morality, and the tradition of Western philosophy. The goal of his works is to undermine theology, God, and metaphysics, and to bring people fully into this world, destroying the illusions they have lived in. Just like Kierkegaard, he is very radical: he believes one must go the full way with all of one&amp;rsquo;s being.&lt;/p&gt;
&lt;p&gt;Nietzsche thinks thinkers like Socrates and Jesus have led the West astray by pointing people toward another realm—the realm of forms and heaven. But, he insists, there is only one world. We should love this world, find the beauty in it, and perfect it, instead of looking toward another world. As such, we should reject all metaphysics. In other words, he aims at a reevaluation of all morals and values.
With that, Nietzsche sees himself as the destroyer of all theology and the tradition of Western philosophy, since philosophy needs metaphysics, and he believes he has exposed its foundations as hollow. He thinks philosophy ends with him.&lt;/p&gt;
&lt;p&gt;Just as Socrates uses irony as a literal trick, so Nietzsche uses oxymorons. But unlike Socrates, Nietzsche is often much more obscure, rarely committing himself to any clear logical position, instead using his writing to perplex people and stimulate thinking. It reminds me of the Buddhist practice of &lt;a href="https://en.wikipedia.org/wiki/Koan"&gt;koans&lt;/a&gt;: short phrases meant to perplex and shake the student, thus leading to enlightenment. Nietzsche is therefore more of a poet-philosopher, like Plato, than a systematic thinker like Aristotle.&lt;/p&gt;
&lt;p&gt;For Nietzsche, what makes man great is the ability to give up herd morality. All our moral values have been created to suppress the superior man. &amp;ldquo;I don&amp;rsquo;t care about the masses of human beings; the only people worth something are the superior people,&amp;rdquo; he suggests. Humans are simply animals that emerged from evolution, yet somehow got it into their heads that they are special and that the world revolves around them. But even if that is false, we humans must still do something.
Here Nietzsche says the natural motive of all living things, including humans, is the &amp;ldquo;will to power.&amp;rdquo; The reason why organisms reproduce, compete, and conquer is because all organic life is driven by the will to power. For example: a king conquering territory is an expression of the will to power; a scientist making a discovery is an expression of the will to power; even a saint fasting and sacrificing himself is the saint&amp;rsquo;s will to power.
And if there is no God and thus no salvation, then the only serious, worthwhile thing left is art—an attempt at worldly salvation.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;1870 CE &lt;a href="https://en.wikipedia.org/wiki/John_Stuart_Mill"&gt;John Stuart Mill&lt;/a&gt;&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;Summary:&lt;/strong&gt;&lt;br&gt;
Most widely known for developing the theory of &lt;em&gt;Utilitarianism&lt;/em&gt;, the belief that what is moral is what maximizes happiness and minimizes suffering. In his work &lt;em&gt;On Liberty&lt;/em&gt;, he argued that society should allow individuals the maximum possible freedom unless their actions harm others.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;1889 CE &lt;a href="https://en.wikipedia.org/wiki/Martin_Heidegger"&gt;Martin Heidegger&lt;/a&gt;&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;Media:&lt;/strong&gt; &lt;a href="https://monkemanx.github.io/tangled_thoughts/dinner_with_andre/"&gt;My Dinner with Andre&lt;/a&gt;&lt;br&gt;
&lt;strong&gt;Articles:&lt;/strong&gt; &lt;a href="https://monkemanx.github.io/articles/where_the_eiffel_tower_is_is_not_obejctive/"&gt;The Eiffel Tower is NOT in Paris!&lt;/a&gt;&lt;br&gt;
&lt;strong&gt;Summary:&lt;/strong&gt;
Although Heidegger himself was not an existentialist, existentialism can be seen as a child of his philosophy. He borrowed concepts from Kierkegaard but reformulated them in a unique way. Heidegger’s greatest work, &lt;em&gt;Being and Time&lt;/em&gt;, focuses on the fundamental question: what does &amp;ldquo;being&amp;rdquo; mean? Instead of looking outward at the external world, he approached the problem by turning inward, focusing on human experience.&lt;/p&gt;
&lt;p&gt;In everyday life, we understand being in relation to objects — for example, &amp;ldquo;the grass is green&amp;rdquo; or &amp;ldquo;the sun is a star&amp;rdquo; — but we lack an understanding of being itself in a general, fundamental sense. Heidegger wanted a definition of being that wasn&amp;rsquo;t abstract and disconnected from life but was rooted in everyday experience. To achieve this, he introduced his concept of &lt;em&gt;Dasein&lt;/em&gt; — a term for human existence — arguing that only by examining Dasein could we truly understand being.&lt;/p&gt;
&lt;p&gt;Dasein experiences the world through three interrelated structures: &lt;em&gt;understanding&lt;/em&gt;, &lt;em&gt;mood&lt;/em&gt;, and &lt;em&gt;discourse&lt;/em&gt;.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;em&gt;Understanding&lt;/em&gt; refers to our ability to interpret and give meaning to the world around us.&lt;/li&gt;
&lt;li&gt;&lt;em&gt;Mood&lt;/em&gt; represents our emotional state, shaping how the world appears to us — for example, experiencing things differently when we are joyful or sorrowful.&lt;/li&gt;
&lt;li&gt;&lt;em&gt;Discourse&lt;/em&gt; refers to language, which is essential for expressing and interpreting experience; things can only truly be understood when they are articulated in language and shaped by our mood.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;One of Heidegger’s major ideas is that freedom must be earned. It emerges as a response to the confrontation with human existence itself. Our true reality lies in &lt;em&gt;Being&lt;/em&gt;, not in the distractions of everyday trivialities. If one lives constantly in distraction, one forfeits the chance to be genuinely human. Heidegger warned against becoming a &amp;ldquo;mass-man,&amp;rdquo; someone who merely follows the herd, avoiding authentic engagement with reality. His imperative is to strive for authenticity — to become a true individual through deep inner cultivation and confrontation with existence.&lt;/p&gt;
&lt;p&gt;A crucial part of confronting reality is facing our own mortality. Heidegger emphasizes the immediate, personal realization that we will die. Time — as the horizon of all possibilities — is central to human existence.
This realization leads to a deep anxiety:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;We project ourselves into the future and recognize death as the end of all possibilities.&lt;/li&gt;
&lt;li&gt;We look into the past and realize what we could have been but failed to achieve.&lt;/li&gt;
&lt;li&gt;We see ourselves in the present as incomplete and not fully understanding Being.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This creates a sense of guilt: a debt to ourselves that can never fully be repaid. This tension — between our unrealized possibilities and the certainty of death — defines the human condition.
Thus, Heidegger suggests: it is not &lt;em&gt;what&lt;/em&gt; you do that matters most, but &lt;em&gt;how&lt;/em&gt; you do it — with authenticity, facing Being and mortality honestly, rather than evading them.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;1905 CE &lt;a href="https://en.wikipedia.org/wiki/Jean-Paul_Sartre"&gt;Jean-Paul Sartre&lt;/a&gt;&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;Media:&lt;/strong&gt; &lt;a href="https://monkemanx.github.io/tangled_thoughts/synedoche_new_york/"&gt;Synecdoche, New York&lt;/a&gt;&lt;br&gt;
&lt;strong&gt;Summary:&lt;/strong&gt;&lt;br&gt;
A French existentialist philosopher, Jean-Paul Sartre centered much of his work around a fundamental question: why is it that even when we are housed, fed, and comfortable, we still manage to feel dissatisfied with life?&lt;/p&gt;
&lt;p&gt;Sartre argues that inanimate objects are complete — they simply exist. They have no need for progress or aspiration; they are what they are. However, humans are different: we are &lt;em&gt;beings-for-itself&lt;/em&gt;. We can not only think about what is but also about what could be, what might be, and what ought to be. As conscious agents, we can make decisions. Sartre calls this ability to imagine and move toward possibilities — things that are &lt;em&gt;not yet&lt;/em&gt; — &lt;em&gt;nothingness&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;From this insight, Sartre concludes that nothing internal prevents us from making any decision, no matter how destructive it might be. In other words:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&amp;ldquo;We are condemned to be free.&amp;rdquo;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;With this radical freedom comes radical responsibility for our actions — and an anxiety over the destructive possibilities our freedom opens up. Sartre calls this feeling the &lt;em&gt;anguish of the future&lt;/em&gt;. But there is also an &lt;em&gt;anguish of the past&lt;/em&gt;: the regret of missed potentials, the sorrow of not having lived up to our own standards, of having broken our own promises. At any point, we can betray our commitments — nothing is forcing us to be consistent. Even following rules requires active reaffirmation at every moment, and this perpetual freedom itself is a source of anxiety.&lt;/p&gt;
&lt;p&gt;If there were a God, Sartre says, we would have a predetermined place in the world, and we would not experience this crushing freedom. But since there is no God, we alone must decide what is right, how to act, and what to value. We cannot hide behind anyone or anything.&lt;/p&gt;
&lt;p&gt;Sartre further argues that most people do not deeply feel this anxiety. They live their lives in &lt;em&gt;bad faith&lt;/em&gt;, ignoring the reality of their radical freedom. They live more like things — fixed objects — rather than conscious beings. For instance, a waiter who completely identifies with his role, saying &amp;ldquo;&lt;em&gt;I am a waiter&lt;/em&gt;&amp;rdquo; and nothing more, is living in bad faith. But bad faith is not limited to professional roles; even casual phrases like &amp;ldquo;&lt;em&gt;That&amp;rsquo;s just who I am&lt;/em&gt;&amp;rdquo; express the same illusion — the idea that there is a fixed, static self. For Sartre, the desire to be a fixed object is ultimately the desire to be dead.&lt;/p&gt;
&lt;p&gt;Other people also play a huge role in Sartre’s philosophy. Our personhood is closely linked with others: it is through others that we become self-conscious in certain ways. Sartre describes a common experience: you are going through your routine in public when you suddenly feel that you are being watched. Instantly, your behavior changes — you shift from being a subject acting freely to becoming an object in someone else’s eyes. Sartre calls this phenomenon &lt;em&gt;the look&lt;/em&gt; (see &lt;a href="https://monkemanx.github.io/poetry/lost/#watching"&gt;&amp;lsquo;I see them Watching&amp;rsquo;&lt;/a&gt;).&lt;/p&gt;
&lt;p&gt;So what can we do? How can we make ourselves &amp;ldquo;complete&amp;rdquo;?&lt;/p&gt;
&lt;p&gt;Sartre’s answer: we must live authentically, both individually and in relation to others. We create who we are and what we value through action. Who we are is made, not found. To live authentically is to craft our own values, to choose our path, and to walk it with full awareness of the freedom and anguish that come with it. We must embrace the truth that we are totally free — the authors of our own lives.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;1913 CE &lt;a href="https://en.wikipedia.org/wiki/Albert_Camus"&gt;Albert Camus&lt;/a&gt;&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;Media:&lt;/strong&gt; &lt;a href="https://monkemanx.github.io/tangled_thoughts/movie_taste_cherry/"&gt;Taste of Cherry&lt;/a&gt;, &lt;a href="https://monkemanx.github.io/tangled_thoughts/movie_sunset_limited/"&gt;Sunset Limited&lt;/a&gt;&lt;br&gt;
&lt;strong&gt;Summary:&lt;/strong&gt;&lt;br&gt;
A French existentialist, Camus is nowadays most famous for his phrase: &lt;em&gt;&amp;ldquo;One must imagine Sisyphus happy.&amp;rdquo;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Unlike earlier existentialists, Camus begins his worldview with the assumption that life is meaningless and uncaring, and instead focuses on how to deal with it. Existential philosophers before him, such as Kierkegaard, often tacitly assumed that life had inherent meaning, and that an existential crisis was merely the temporary loss or forgetting of that meaning. In other words, they were concerned with rediscovering life&amp;rsquo;s objective, transcendent value.&lt;/p&gt;
&lt;p&gt;But Camus rejected this approach. For him, trying to imbue life with a false, transcendent meaning was a betrayal of reason — it was choosing comforting illusions over facing the truth of nihilism.&lt;/p&gt;
&lt;p&gt;Central to Camus’ thought is the concept of &lt;em&gt;the absurd&lt;/em&gt;: the tension between the apparent meaninglessness of life and the human need for meaning. This tension is most deeply felt during an existential crisis, which he calls a &amp;ldquo;sudden awareness of the absurd&amp;rdquo; — the realization that life is dishonest, like a stage play pretending to have a deeper plot.&lt;/p&gt;
&lt;p&gt;Many people, when confronted with this realization, do as Kierkegaard suggests and make a &amp;ldquo;leap of faith&amp;rdquo; toward some higher meaning. But Camus wanted to explore a life without hope and without appeal. He famously wrote:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&amp;ldquo;One of the only coherent philosophical positions is thus revolt. It is a constant confrontation between man and his own obscurity. [&amp;hellip;] It challenges the world anew every second. Just as danger provided man the unique opportunity of seizing awareness, so metaphysical revolt extends awareness to the whole of experience. [&amp;hellip;] It is not aspiration, for it is devoid of hope. That revolt is the certainty of a crushing fate, without the resignation that ought to accompany it.&amp;rdquo;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;For Camus, it is not enough to simply realize life&amp;rsquo;s meaninglessness; one must also fully acknowledge the conflict between the human desire for meaning and the world&amp;rsquo;s indifference. We must live our entire lives in full knowledge of the absurd. This, for Camus, is the only consistent philosophical position.&lt;/p&gt;
&lt;p&gt;This &lt;em&gt;revolt&lt;/em&gt; or &lt;em&gt;rebellion&lt;/em&gt; means doing things with the full knowledge that they are ultimately pointless — doing them precisely because they are pointless, as an act of defiance. This battle against the absurd can best be fought not alone, but together with others. Through solidarity with our fellow humans — who are fighting the same battle against the absurd — we can embrace a universal revolt, one that unites all of humanity in a shared, courageous defiance.&lt;/p&gt;












&lt;figure style="display: block; margin: 0 auto; width: 100%; "&gt;
 &lt;img
 src="https://monkemanx.github.io/attachments/mabRf.jpeg"
 loading="lazy"
 width=""
 height=""
 alt="Image"
 style="display: block; width: 100%; height: 100%; object-fit: contain; "
 &gt;
 
&lt;/figure&gt;

&lt;h2 id="contemporary"&gt;Contemporary&lt;/h2&gt;
&lt;p&gt;As defined, starting after the end of World War 2 or after the end of time of the major existentialist.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;1919 CE &lt;a href="https://en.wikipedia.org/wiki/G._E._M._Anscombe"&gt;G. E. M. Anscombe&lt;/a&gt;&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;Articles:&lt;/strong&gt; &lt;a href="https://monkemanx.github.io/articles/the_meaning_of_ought/"&gt;The Meaning of Ought&lt;/a&gt;&lt;br&gt;
&lt;strong&gt;Summary:&lt;/strong&gt;&lt;br&gt;
Student of Wittgenstein, she was best known for her influential paper &amp;lsquo;Modern Moral Philosophy,&amp;rsquo; in which she criticized modern moral theories like utilitarianism and Kantianism, and advocated for a return to virtue ethics. She was also known for her work &amp;lsquo;Intention,&amp;rsquo; which laid the foundation for modern philosophy of action.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;1921 CE &lt;a href="https://en.wikipedia.org/wiki/John_Rawls"&gt;John Rawls&lt;/a&gt;&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;Summary:&lt;/strong&gt;&lt;br&gt;
Famous for his theory of justice, Rawls argued that a just society would be one where individuals could determine the structure of society and its laws, but with the trick that, once the rules are set, individuals would not know their position in society (e.g., whether they would be male or female, rich or poor, a worker or a capital owner). This &amp;ldquo;veil of ignorance&amp;rdquo; would produce a just society, as people would design a system that protects the most vulnerable because they wouldn&amp;rsquo;t know if they would be among them.&lt;/p&gt;
&lt;h2 id="less-relevant-philosopher"&gt;Less Relevant Philosopher&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;1646 CE &lt;a href="https://en.wikipedia.org/wiki/Gottfried_Wilhelm_Leibniz"&gt;Gottfried Wilhelm Leibniz&lt;/a&gt;&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;Summary:&lt;/strong&gt;&lt;br&gt;
Gottfried Wilhelm &lt;em&gt;Leibniz&lt;/em&gt; tackled the problem of evil by famously arguing that our world is &lt;em&gt;“the best of all possible worlds.”&lt;/em&gt; He believed that, although suffering and imperfection exist, they are part of a greater harmonious whole that only a divine, omniscient being (God) could have conceived — a world that balances all possible goods and evils better than any alternative.&lt;/p&gt;
&lt;p&gt;Leibniz also formulated the &lt;em&gt;principle of the identity of indiscernibles&lt;/em&gt;, which states that if two entities share all the same properties, then they are not two entities but one and the same. There can be no true duplicates in reality.&lt;/p&gt;
&lt;p&gt;In his metaphysical work &lt;em&gt;&amp;ldquo;Monadology,&amp;rdquo;&lt;/em&gt; Leibniz introduced the idea that the universe is composed of an infinite number of simple, indivisible substances called &lt;em&gt;monads&lt;/em&gt;. These monads:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Have no parts (they are simple, like atoms, but not material),&lt;/li&gt;
&lt;li&gt;Do not exist in space or time i.e. are not part of material world,&lt;/li&gt;
&lt;li&gt;Do not interact with one another directly,&lt;/li&gt;
&lt;li&gt;Are entirely defined by their internal qualities or perceptions,&lt;/li&gt;
&lt;li&gt;Are all unique — no two monads are the same.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Instead of interacting, &lt;em&gt;monads follow a “pre-established harmony”&lt;/em&gt; — a kind of divine programming instilled by God. Each monad unfolds its internal program perfectly in sync with every other monad, creating the illusion of causation and interaction in the world.
This model allowed Leibniz to preserve both scientific determinism and theological order, while avoiding materialism.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;1806 CE &lt;a href="https://en.wikipedia.org/wiki/Max_Stirner"&gt;Max Stirner&lt;/a&gt;&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;Media:&lt;/strong&gt; &lt;a href="https://monkemanx.github.io/tangled_thoughts/movie_rope/"&gt;Rope&lt;/a&gt;&lt;br&gt;
&lt;strong&gt;Summary:&lt;/strong&gt;&lt;br&gt;
Max Stirner is a German philosopher. His central thesis—and what he is most famous for—comes from his work &lt;em&gt;The Ego and Its Own&lt;/em&gt;, where he presents the concept of egoism: &amp;ldquo;each human being should only care about themselves.&amp;rdquo;&lt;/p&gt;
&lt;p&gt;Stirner outlines a three-stage progression in the development of human values, which he believes culminates in egoism. The first stage he calls &amp;ldquo;realism.&amp;rdquo; This refers to individuals concerned with real-world objects and the fulfillment of their own appetites—essentially the mindset of young children. He believes ancient Greece exemplified this stage, as people there were focused on using their minds to influence the world. A prime example, he claims, are the Sophists, with Socrates being the exception. This could be challenged, for instance, by pointing out that Stoics in ancient Greece were more concerned with universal values than with the material world.
The main characteristic of the realist is that their will is unfettered by internal principles but constrained by the external world and undisciplined desires.&lt;/p&gt;
&lt;p&gt;The next stage in Stirner’s development is &amp;ldquo;idealism.&amp;rdquo; By this, he means being ruled by ideas—or &amp;ldquo;spooks,&amp;rdquo; as he calls them. In this stage, we become guided by abstract principles like justice and morality. Stirner associates this phase with adolescence or young adulthood, when individuals often dedicate their lives to causes they perceive as greater than themselves. Christianity is a prime example of this stage: it is not concerned with living life to the fullest but with principles that claim intrinsic value. Christ did not say, &amp;ldquo;Pick up your things and follow me&amp;rdquo; because they were useful, but because they had supposed intrinsic worth. The key characteristic of the idealist is loyalty to their ideas. They have conquered desire but are in submission to internalized principles. The ultimate idealist is someone willing to die for an idea—something we often admire, but Stirner sees as foolish.&lt;/p&gt;
&lt;p&gt;Finally, we arrive at the stage of &amp;ldquo;egoism.&amp;rdquo; The egoist asserts total authority over their own person and actions. Egoists are not ruled by desires, the external world, or abstract ideas. They reject the authority of political or religious systems and act only in their own self-interest. Stirner associates this with the philosophy of full-grown adulthood.
Importantly, Stirner does not think people should avoid acting on ideas or holding values. Rather, we should not regard those ideas as more important than ourselves. He asks: what was the point of Socrates&amp;rsquo; moral stand, given that once he died, he was no longer around to see the fruits of his values?&lt;/p&gt;
&lt;p&gt;Because of this view, Stirner was not a fan of democracy. He believed that under feudalism and monarchy, the state&amp;rsquo;s actions reflected the will of an individual. In democracy, however, the state&amp;rsquo;s authority stems from &amp;ldquo;the people,&amp;rdquo; which he considered just another &amp;ldquo;spook&amp;rdquo;—a fictional abstraction that reduces real, existing individuals to an idea.
Stirner further argues that if the state protects our property instead of us doing so ourselves, then we don’t truly own that property. It is merely loaned to us by the entity securing it. Even our personal agency is loaned, since the state can pass laws restricting our behavior. If our actions can be revoked at any time, then our autonomy is not truly ours.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&amp;ldquo;Whoever knows how to take, to defend, the thing—to him belongs property.&amp;rdquo;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Thus, Stirner believes revolutionary and political movements are too focused on what gives people rights—like Marxists who ask who &lt;em&gt;ought&lt;/em&gt; to own the factory. For Stirner, that misses the point. The output of the factory belongs to whoever can take it. He argues the entire concept of rights should be dissolved.&lt;/p&gt;
&lt;p&gt;Stirner’s imperative is to embrace egoism and act solely in our own best interest. This can be interpreted in two ways:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;A moderate reading, where egoism means accepting responsibility for our own decisions. When we make a choice, we shouldn’t appeal to a transcendent value but acknowledge it as our own, chosen value—similar to Sartre’s existentialism. The focus is not on the principle itself, but on the choice to follow it.&lt;/li&gt;
&lt;li&gt;A radical interpretation, where egoism becomes pure self-interest. The goal is to extract everything possible from life, regardless of the consequences for others—essentially radical selfishness.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Finally, it must be said that Stirner’s philosophy struggles with the concept of destructive desires, which we now recognize as a real part of human psychology. He either suggests that we should not act on such desires—thereby reintroducing a form of idealism—or he implies that we should act on them, which reduces his egoism (the idea of doing what is best for ourselves) to simply doing whatever we want.&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;References:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;em&gt;Book: Sophies World&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;&lt;em&gt;Podcast: Philosophize This!&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;&lt;em&gt;Professor: Michaeal Sugrue&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;&lt;em&gt;Lecture at the KIT: &amp;ldquo;Introduction to Philosophy&amp;rdquo;&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;&lt;em&gt;YouTube: UnsolicitedAdvice&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;&lt;em&gt;TV: The Great Philosophers&lt;/em&gt;&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>Nature of God</title><link>https://monkemanx.github.io/articles/nature_of_god/</link><pubDate>Sat, 12 Apr 2025 00:00:00 +0000</pubDate><author>monkeman@cock.li (MonkeMan)</author><guid>https://monkemanx.github.io/articles/nature_of_god/</guid><description>&lt;style&gt;
 .info {
 background-color: #e6f7ff; 
 padding: 15px; 
 border-radius: 5px; 
 margin-bottom: 15px; 
 }

 .info-title {
 font-size: 20px; 
 margin-bottom: 10px; 
 color: #000080; 
 font-weight: bold; 
 }
&lt;/style&gt;

&lt;div class="info"&gt;
 &lt;div class="info-title"&gt;Info&lt;/div&gt;
 &lt;p&gt;This article should be read as an intellectual thought experiment, rather than a statement of belief. I think that if one believes in God, non-agentic gods are philosophically less problematic.&lt;/p&gt;
&lt;/div&gt;

&lt;style&gt;
 .info {
 background-color: #e6f7ff; 
 padding: 15px; 
 border-radius: 5px; 
 margin-bottom: 15px; 
 }

 .info-title {
 font-size: 20px; 
 margin-bottom: 10px; 
 color: #000080; 
 font-weight: bold; 
 }
&lt;/style&gt;

&lt;div class="info"&gt;
 &lt;div class="info-title"&gt;Info&lt;/div&gt;
 &lt;p&gt;This article is inspired by Neoplatonism, but I have not yet done a deep dive into it. As such, some arguments might be incomplete or could be expressed more elegantly. I will try to revisit this article after I’ve done more reading on the topic.&lt;/p&gt;
&lt;/div&gt;

&lt;h2 id="1-properties-of-god"&gt;1. Properties of God&lt;/h2&gt;
&lt;p&gt;One interesting subfield in both philosophy and theology concerns the ontology of divinity, in other words the essence and the associated characteristics and properties we can ascribe to God.&lt;/p&gt;
&lt;p&gt;One common property ascribed to God in most religions, such as Christianity, Islam, and Hinduism, is that of being agentic, i.e. a being that can act upon the world consciously. God has an active role that is not rule-based like a natural law, but instead guided by some form of intelligence.&lt;/p&gt;
&lt;p&gt;In addition, theology almost always claims that God is infinitely good, the origin of goodness itself. There are good philosophical reasons for why a god would have these properties, mainly that God is often constructed as the &lt;a href="https://www3.nd.edu/~afreddos/courses/intro/ontarg.htm"&gt;greatest conceivable being&lt;/a&gt;, and being the greatest implies the characteristic of being infinitely good. If one subscribes to a &lt;em&gt;telos&lt;/em&gt; worldview—where everything has a purpose—then God can be defined as the final, self-justifying cause that everything points to in the causal chain of &lt;em&gt;telos&lt;/em&gt;, and thus is what we ultimately desire: the highest good.&lt;/p&gt;
&lt;p&gt;Similarly, one can argue for God being omnipotent, able to do anything, and omniscient, aware of everything.&lt;/p&gt;
&lt;p&gt;There are more philosophical arguments for thinking that God is goodness itself, but I will leave it at this. Importantly, most modern religions subscribe to this line of thinking.&lt;/p&gt;


&lt;figure&gt;
 &lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width:70%" src="https://monkemanx.github.io/attachments/1741940647901565.jpg"&gt;
&lt;/figure&gt;


&lt;h2 id="2-problems-with-an-agentic-notion-of-god"&gt;2. Problems with an Agentic Notion of God&lt;/h2&gt;
&lt;p&gt;The essence of God being both agentic and boundlessly good presents two issues that need to be accounted for in every theological framework.&lt;/p&gt;
&lt;h3 id="21-problem-of-evil"&gt;2.1 Problem of Evil&lt;/h3&gt;
&lt;p&gt;The first issue is the problem of evil, which can be casually defined as the question of why evil exists. We can categorize this evil as:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Moral Evil&lt;/strong&gt;: Evil that stems from human actions. Examples include murder, theft, and torture.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Natural Evil&lt;/strong&gt;: Evil that stems from nature itself. Examples include earthquakes, diseases, and birth defects.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;The challenge to the theist is the following: if God is infinitely good, then evil would &lt;em&gt;oppose his very nature&lt;/em&gt;. If God is omniscient, he is &lt;em&gt;aware&lt;/em&gt; of evil. If God is omnipotent, he has the &lt;em&gt;ability&lt;/em&gt; to remedy it. And finally, if God is agentic, he is conscious that evil opposes him and would &lt;em&gt;want in principle&lt;/em&gt; to remove that evil. Then why does evil exist?&lt;/p&gt;
&lt;p&gt;The theist now has various moves they can make. They might argue that &lt;em&gt;moral evil&lt;/em&gt; is necessary for human freedom; that evil exists so humans are motivated to draw closer to God and become virtuous; or that evil is a sin we inherited from Adam and Eve and must atone for.
All of these arguments focus on the &lt;em&gt;will of God&lt;/em&gt;: &lt;em&gt;foro interno&lt;/em&gt;—his innermost desire—is to destroy evil, but &lt;em&gt;foro externo&lt;/em&gt;—in the external world—there are factors that prevent him from doing so.&lt;/p&gt;
&lt;p&gt;But all of these moves are problematic and can be rebutted. If evil is necessary for human freedom, why does God, who always acts in perfect goodness, still have free will? Or, in the face of widespread and horrific evil, God&amp;rsquo;s choice to prioritize human freedom may contradict his being infinitely good.
Regarding evil producing virtue, it may be that hardship can lead to good character, but not all evil seems to lead to virtue. Some evil appears pointless. There&amp;rsquo;s also the issue of scale: it&amp;rsquo;s true that good character can arise from struggle, but this does not require the most extreme forms of evil—lesser forms would suffice.
Finally, the idea of inherited sin is in itself repugnant, comparable to slavery, which humanity rightly abolished. A loving God would not make us atone for the sins of our ancestors.&lt;/p&gt;
&lt;p&gt;Naturally, the theist may offer counters to these rebuttals, but I hope you can see that the problem of evil cannot be simply dismissed and demands a great deal of metaphysical complexity to account for.&lt;/p&gt;
&lt;h3 id="22-problem-of-divine-hiddenness"&gt;2.2 Problem of Divine Hiddenness&lt;/h3&gt;
&lt;p&gt;I want to continue with the second issue, which is the problem of divine hiddenness: why does God make his existence less obvious to people seeking him?&lt;/p&gt;
&lt;p&gt;A theist might respond to this question in several ways. One common response from Christians is that some people may have &lt;a href="https://chab123.wordpress.com/2015/03/02/the-dangers-of-a-hardened-heart-2/"&gt;hardened their hearts&lt;/a&gt;, preventing them from perceiving God’s presence. This hardening could be a subconscious or conscious rejection of God. The theist may also point out that God wants us to have freedom, and revealing Himself would take away our ability to choose.&lt;/p&gt;
&lt;p&gt;Both responses raise complications. First, while it may be true that some people have hardened hearts and reject God, it is sufficient for a single person to exist—earnestly seeking God with an open heart—to not perceive God, to undermines the Christian rebuttal.
Second, it is true that if God acted like a helicopter parent, watching over us all the time to make sure we are never hurt, it would take away our choices. But most people are not asking for that. Simply revealing Himself once—making His presence known, would for many be enough.&lt;/p&gt;
&lt;p&gt;Just like with the problem of evil, theist responses will be offered to the arguments above. But the point is that some explanation must be given.&lt;/p&gt;
&lt;h2 id="3-a-non-agentic-notion-of-god"&gt;3. A Non-Agentic Notion of God&lt;/h2&gt;
&lt;p&gt;There is another conception of divinity, outside of the Western Christianity tradition, which is influenced by Greek doctrines such as Neoplatonism and Stoicism. (One could argue that the Stoic notion of God is agentic to a certain extent, but it is still impersonal, which aligns more closely with what I mean by a non-agentic divinity.)&lt;/p&gt;
&lt;p&gt;What do we mean by a non-agentic divinity? It is more like a force or law of nature, a field that underlies the fabric of our reality, much like a gravity field. Importantly, just because God is non-agentic does not mean that it cannot play an active role in nature or in human lives. However, it differs from an agentic notion in the way it participates in our lives: the divinity would still have an active role, but this involvement might behave more like gravity. Rather than being the action of an intelligent being, it would be a rational principle (&lt;a href="https://en.wikipedia.org/wiki/Logos"&gt;logos&lt;/a&gt;) that permeates the cosmos.&lt;/p&gt;
&lt;p&gt;Many arguments, such as the &lt;a href="https://en.wikipedia.org/wiki/Cosmological_argument"&gt;Cosmological argument&lt;/a&gt; or the &lt;a href="https://en.wikipedia.org/wiki/Ontological_argument"&gt;Ontological argument&lt;/a&gt;, still apply. We still conceive of divinity as the greatest imaginable being, and thus it would have all the attributes that, for example, the Christian God is proclaimed to have (besides being personal), such as infinite goodness, omnipotence, omniscience, omnipresence, and much more.&lt;/p&gt;


&lt;figure&gt;
 &lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width:70%" src="https://monkemanx.github.io/attachments/IMG_3067.jpg"&gt;
&lt;/figure&gt;


&lt;h3 id="31-problem-of-evil"&gt;3.1 Problem of Evil&lt;/h3&gt;
&lt;p&gt;Before I continue, I want to introduce the principle of &lt;a href="https://en.wikipedia.org/wiki/Identity_of_indiscernibles"&gt;Identity of Indiscernibles&lt;/a&gt;, which states: If two things are completely identical in every respect, then they are not two things, but one and the same thing. Or, in a more formalized framing: \(\forall \ P(P(x) \leftrightarrow P(y)) \implies x = y\), with \(P\) being the properties of an object.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;P1: If two objects are &lt;strong&gt;distinct&lt;/strong&gt;, there must be &lt;strong&gt;at least one property&lt;/strong&gt; that one has and not the other.
P2: If two objects have all the same properties, then there is &lt;strong&gt;no property&lt;/strong&gt; that distinguishes them.
P3: There are no properties by which the two objects differ.
C: Therefore, the objects are not distinct; they are one and the same object.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Why do we need this principle?&lt;/p&gt;
&lt;p&gt;This principle shows that whatever comes from God, whether created actively or passively, is necessarily different from God Himself. In other words, God cannot create something that is completely identical to Him, because if it were truly identical, it would be God, not something separate.
Since God is perfect in every possible way, anything that differs from Him must, by that very difference, fall short of His perfection. Therefore, whatever is created by God is, in some sense, less perfect than God. It follows that all created things are necessarily inferior to their creator.&lt;/p&gt;
&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;More formally&lt;/summary&gt;
 
 &lt;p&gt;Argument 1:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;P1: According to the &lt;em&gt;Identity of Indiscernibles&lt;/em&gt;, if two things share &lt;em&gt;all&lt;/em&gt; the same properties, they are not two things but &lt;em&gt;one and the same thing&lt;/em&gt;.
C1: If God were to create something that shares all of His properties (i.e., something equally perfect), it would be identical to God.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Argument 2:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;P1: God is &lt;em&gt;perfect&lt;/em&gt;, possessing all perfections to the &lt;em&gt;maximum&lt;/em&gt; possible degree.
P2: Anything created by God is distinct from God (otherwise it would not be created but God Himself).
C1: Therefore, anything created by God must lack at least one property that God has—or possess it to a lesser degree.
C2: Therefore, all created things are less perfect than God.&lt;/p&gt;
&lt;/blockquote&gt;

 
&lt;/details&gt;


&lt;p&gt;With this framework, we can now answer the question: &lt;em&gt;What is evil?&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Evil is the &lt;strong&gt;distance between created things and God&lt;/strong&gt;—between the imperfect and the Perfect. In other words, when God creates anything, it is necessarily less good than God Himself, who is pure and infinite Goodness. This gap, this &amp;ldquo;less than&amp;rdquo;, between created goodness and divine goodness is what we call evil.&lt;/p&gt;
&lt;p&gt;So, when someone asks, &lt;em&gt;“If God is infinitely good, kind, and loving, why does He allow evil?”&lt;/em&gt;—they misunderstand what evil is.&lt;/p&gt;
&lt;p&gt;Evil is not something God permits arbitrarily; it is a &lt;strong&gt;necessary result&lt;/strong&gt; of anything being created that is not God. Since nothing created can be identical to God, all creation is necessarily less perfect, and thus contains evil (this assumes that perfect goodness implies perfection in all other properties). It&amp;rsquo;s also important to note that this has a side effect: humans have free will. Without evil, humans would be forced to act exactly as God does, because every action different from God’s would be less than perfect goodness and thus contain some form of evil. In other words, to eliminate evil, we would need to always act in the most perfect way, which would leave no room for freedom of choice.&lt;/p&gt;
&lt;p&gt;The question of evil is thus a &lt;a href="https://en.wikipedia.org/wiki/Open-question_argument"&gt;closed question&lt;/a&gt;. If you understand that goodness is identical to God, then you recognize that anything distinct from God must fall short of it, and that shortfall, which is evil, is a necessary consequence.&lt;/p&gt;
&lt;p&gt;To use a metaphor: God is like the peak of a perfect mountain, the highest point of being and goodness. The moment we were created, we were no longer at the top of this mountain. Every action we take leads away from this top.
To then ask, &lt;em&gt;“Why am I not at the peak?”&lt;/em&gt; while walking downward is to misunderstand the direction entirely.&lt;/p&gt;
&lt;p&gt;So, evil is not a mystery to be solved, but a natural consequence of being something other than God. The question &lt;em&gt;“Why is there evil?”&lt;/em&gt; is based on a misunderstanding of what evil fundamentally is.&lt;/p&gt;
&lt;h3 id="32-problem-of-divine-hiddenness"&gt;3.2 Problem of Divine Hiddenness&lt;/h3&gt;
&lt;p&gt;Being non-agentic (not a personal being or an active agent), God’s relationship to the world changes fundamentally. This helps us address the problem of the hardened heart and offers an answer to the question of divine hiddenness.&lt;/p&gt;
&lt;p&gt;Since God is impersonal, more like a force of nature than a personal deity, it doesn’t make sense to expect God to reveal Himself to us in a personal, direct way, as is sometimes suggested in religious texts like the Bible. God is not a being who acts with intention or chooses to reveal Himself in personal encounters.&lt;/p&gt;
&lt;p&gt;Instead, God reveals Himself through the goodness we encounter in life. Every time you experience beauty—whether it’s hearing a beautiful song, reading a masterfully written story, or tasting something delicious—God is present. These experiences contain the manifestations of God as the ultimate source of all goodness. In this way, we see God&amp;rsquo;s presence not through personal revelation, but through the beauty and goodness that exist in the world.&lt;/p&gt;
&lt;p&gt;Thus, God is not hidden; He is there in everyday life in beauty. People just need to realize that beauty, goodness, and God are one. This is not as controversial as it seems. In the worldview I present, God is imagined more like a force of nature, similar to gravity, and thus we can think of God as the underlying thing behind everything that is beautiful and good (similar to &lt;a href="https://en.wikipedia.org/wiki/Theory_of_forms"&gt;Plato&amp;rsquo;s Theory of Forms&lt;/a&gt;, but with a dynamic form).&lt;/p&gt;
&lt;h3 id="33-problem-with-non-agentic-notion-of-god"&gt;3.3 Problem with Non-Agentic Notion of God&lt;/h3&gt;
&lt;p&gt;There are still some philosophical problems that a non-agentic God brings with Him that need to be further explored.&lt;/p&gt;
&lt;h4 id="331-passive-vs-active-evil"&gt;3.3.1 Passive vs Active Evil&lt;/h4&gt;
&lt;p&gt;A common objection to the idea of evil as a &lt;em&gt;distance from God&lt;/em&gt; is that many forms of evil don&amp;rsquo;t feel passive or abstract at all. Evils such as extreme pain, torture, or injustice feel &lt;em&gt;intensely real&lt;/em&gt;, &lt;em&gt;active&lt;/em&gt;, and deeply &lt;em&gt;harmful&lt;/em&gt;. If evil is merely a &lt;em&gt;lack&lt;/em&gt; or &lt;em&gt;privation&lt;/em&gt; of goodness, why does it so often feel like an active force that causes real suffering?&lt;/p&gt;
&lt;p&gt;The answer has two parts. First, as previously discussed, the distance between humanity and the divine is what makes free will possible. It is through this free will that &lt;strong&gt;moral evil&lt;/strong&gt; enters the world—because human beings, no longer perfectly aligned with the divine will, often act contrary to what is truly good. So, while defining evil as a &amp;ldquo;lack of goodness&amp;rdquo; might seem too passive to account for horrors like torture or rape, these are, in fact, direct consequences of moral imperfection. They are what happens when beings endowed with free will misuse it due to their distance from perfect goodness.&lt;/p&gt;
&lt;p&gt;Second, both &lt;em&gt;moral evil&lt;/em&gt; and, to an extent, &lt;em&gt;natural evil&lt;/em&gt; can still be understood as distortions or absences of the good. This aligns with the classical conception of evil as a deprivation rather than a substance in itself, evil is not its own independent force, but a corruption or failure of something that was meant to be good.&lt;/p&gt;
$$
\begin{array}{|c|c|}
\hline
\textbf{Evil} &amp; \textbf{Distortion or Lack of Good} \\
\hline
\text{Illness} &amp; \text{A breakdown of physical or mental well-being} \\
\text{Cruelty} &amp; \text{A distortion of love and compassion} \\
\text{Pain} &amp; \text{The absence or disruption of health and comfort} \\
\text{Injustice} &amp; \text{The absence of fairness or moral order} \\
\text{Alienation} &amp; \text{A lack of connection, unity, or belonging} \\
\hline
\end{array}
$$&lt;p&gt;This framework also helps us make sense of &lt;em&gt;natural evils&lt;/em&gt;—tsunamis, earthquakes, genetic disorders, and so on. These too often feel active and malevolent, even though no human will is involved. But just as humanity was created with the capacity to fall short of perfect goodness, so too was nature created in a state of imperfection. Its flaws and dangers are a consequence of its separation from divine perfection.&lt;/p&gt;
&lt;h4 id="332-scale-and-non-uniformity-of-suffering"&gt;3.3.2 Scale and Non-Uniformity of Suffering&lt;/h4&gt;
&lt;p&gt;Another thing we might question is why evil seems to appear at such a scale and with such non-uniformity. Why does a particular land get hit with an earthquake, or why does a certain child get a horrifying genetic disease while another does not?&lt;/p&gt;
&lt;p&gt;This can be explained by first realizing that humans have free will and different levels of capacity for goodness and evil, which are influenced by their experiences, society, and circumstances—factors that are all influenced by the actions of their peers and the humans that came before them. This is then escalated by historical factors and social structures, which are a direct consequence of the free decisions of humans. For example, a population in societies with more unjust government structures can experience more evil. It&amp;rsquo;s like a chaotic system with humans as the input variables, but their decisions make the system chaotic, so that it is impossible to trace back why or how the current configuration of the distribution of evil is achieved.&lt;/p&gt;


&lt;figure&gt;
 &lt;iframe width="600" height="300" style="display: block; margin: auto;" src="https://www.youtube.com/watch?v=CgYGyRt5kVI"&gt;&lt;/iframe&gt;
 &lt;figcaption style="margin-top: 10px"&gt;Here, you can see a chaotic pendulum, which showcases how small changes in the beginning configuration can lead to radically different results.&lt;/figcaption&gt;
&lt;/figure&gt;


&lt;p&gt;A more interesting philosophical question that results from this is why the input variables were decided in such a way in the first place. Why did the &amp;ldquo;first&amp;rdquo; humans have evil, as in distance from God, distributed unevenly? I want to address this in the next section.&lt;/p&gt;
&lt;p&gt;Before we continue, there’s one last issue to address regarding the uneven and seemingly unfair distribution of evil in the world: Why does it often seem that virtuous people—those closer to God and goodness—experience more suffering than those who are distant from God?&lt;/p&gt;
&lt;p&gt;First, it&amp;rsquo;s important to understand that being close to God does not grant immunity from natural evil, such as earthquakes or disease, nor does it shield one from the harmful actions of others. These external forms of suffering, what we might call &lt;em&gt;external evils&lt;/em&gt;, can affect anyone, regardless of their moral or spiritual standing. However, what closeness to God &lt;em&gt;does&lt;/em&gt; change is one’s susceptibility to &lt;em&gt;spiritual evil&lt;/em&gt;, that is the internal corruption of the will through selfishness, malice, and hatred.&lt;/p&gt;
&lt;p&gt;A virtuous person may still endure external suffering, but they are increasingly free from internal torment. This can be interpreted as a soul that is calm, in harmony, and at peace with itself: a deep satisfaction or spiritual tranquility. Their suffering, then, is not a sign of distance from God, but rather a participation in the brokenness of the world.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Imagine a doctor in a war zone. They are surrounded by death, disease, and destruction—immersed in physical evil. Yet morally, they are close to God through compassion, service, and sacrifice. The external situation is evil, but their internal state remains good.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;At this point, one might raise the example of a psychopath—someone who can commit horrifying acts and yet appear completely at peace. Doesn’t that undermine the idea that spiritual closeness to God leads to inner peace?&lt;/p&gt;
&lt;p&gt;The response to this lies in distinguishing between &lt;em&gt;psychological&lt;/em&gt; and &lt;em&gt;spiritual&lt;/em&gt; peace. A psychopath may exhibit psychological calm, but this is not the same as spiritual peace. Psychological peace can be thought of as a surface-level ease or emotional stillness, while spiritual peace is deeper, rooted in wisdom, love, and alignment with the divine. The former may lack empathy or moral awareness; the latter cannot exist without them.&lt;/p&gt;
&lt;p&gt;We should also remember how we defined evil, not merely as an action, but as a &lt;em&gt;state of being&lt;/em&gt;, a condition of separation from God. Actions are manifestations of that inner state; an evil act arises from a soul already turned away from the good. In this light, the true mark of a person’s closeness to God is not whether they suffer, but whether they themselves become a source of suffering for others.&lt;/p&gt;
&lt;p&gt;So, just because someone walks with God does not mean they will experience less evil inflicted &lt;em&gt;upon&lt;/em&gt; them. Rather, it means they are far less likely to &lt;em&gt;inflict&lt;/em&gt; evil &lt;em&gt;on&lt;/em&gt; others. Their moral compass, aligned with the divine, prevents them from becoming agents of harm, even if they remain vulnerable to the brokenness of the world around them.&lt;/p&gt;
&lt;h4 id="333-why-do-things-exist-and-why-are-they-the-way-they-are"&gt;3.3.3 Why Do Things Exist? And Why Are They the Way They Are?&lt;/h4&gt;
&lt;p&gt;Another question we can ask ourselves is: Why does anything exist at all? Why did God create things, especially when, as we&amp;rsquo;ve learned so far, everything created necessarily contains some amount of evil? Wouldn&amp;rsquo;t it be better, more good, if God had not created anything at all?&lt;/p&gt;
&lt;p&gt;This kind of explanation is also needed for a theistic picture with an agentic and personal God. In such a worldview, the typical explanation is that God valued our autonomy and free will so much that He was willing to allow a bit of evil in order to provide us with that freedom.&lt;/p&gt;
&lt;p&gt;The problem with this line of reasoning is that we imagine God as being infinitely good. If God creates something, He also creates it with some distance from Him, which is evil. So how can something infinitely good create something that contains evil? One counter-argument is that because evil exists, we not only have regular good, but also the good of overcoming evil. For example, death and grief allow us to overcome them, creating a unique form of good. But let’s consider another concrete example: chemotherapy for cancer treatment. Would we really say that it would be better, as in producing more good, for people to go through chemotherapy to beat cancer, rather than cancer not having existed at all? A personal agentic God raises many such questions.&lt;/p&gt;
&lt;p&gt;In comparison, there is reasoning for a non-agentic God that is metaphysically much cleaner and more compact. This is the thought of creation &lt;em&gt;emanating&lt;/em&gt; outward from God, thus creating our world as we know it. We can also compare it to a sun that naturally radiates outward light.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;And all beings, so long as they persist, necessarily, due to the power present in them, produce from their own substantiality a real, though dependent, existent around themselves.&lt;/p&gt;
&lt;p&gt;Fire produces the heat that comes from it, and snow does not only hold its coldness inside itself. Perfumes especially witness to this, for so long as they exist, something flows from them around them, the existence of which a bystander enjoys.&lt;/p&gt;
&lt;p&gt;Further, all things, as soon as &lt;strong&gt;they are perfected, generate&lt;/strong&gt;. That which is always perfect always generates something everlasting, and it generates something inferior to itself.&lt;/p&gt;
&lt;p&gt;~ Enneads 5.1(10)§5.1.6.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Why is that the case?&lt;/p&gt;
&lt;p&gt;We can borrow the same argument structure used for the &lt;a href="https://en.wikipedia.org/wiki/Ontological_argument"&gt;Ontological Argument&lt;/a&gt; (which is not uncontroversial). If God were not able to produce goodness, then we could conceive of a being that has all the same attributes as God, but with the additional property of being able to produce goodness. This being would then be greater in this property, but this cannot be the case because we defined God as the greatest of all beings in all properties.
Alternatively, one can take the following as an axiom—a statement of fact, a priori: &lt;em&gt;“That which is perfect and full tends to overflow.”&lt;/em&gt;&lt;/p&gt;
&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;More formally&lt;/summary&gt;
 
 &lt;blockquote&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Let \( G \) be a being of maximal intrinsic goodness—i.e., a being than which no greater can be conceived.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;For a being to be maximally good, it must possess all qualities that contribute to or embody intrinsic goodness.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Suppose \( G \) does not produce any additional goodness beyond itself.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Then we can conceive of a being \( G′ \), identical to \( G \) in intrinsic qualities, but which also produces additional goodness (e.g., creates good things).&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The capacity to produce goodness is itself a form of intrinsic excellence, thus \( G′ \) is intrinsically greater than \( G \).&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;But this contradicts the definition of \( G \) as the greatest conceivable being.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Therefore, \( G \) must include within its intrinsic nature the property of being a producer of goodness.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/blockquote&gt;

 
&lt;/details&gt;


&lt;p&gt;So, the answer to the question of why things exist is that God is so full of goodness that He overflows, like a barrel full of water pressing out water at the top, and this overflowing of goodness creates the world.&lt;/p&gt;
&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details open&gt;
 &lt;summary&gt;As a Response To Critique on Plato&lt;/summary&gt;
 
 &lt;p&gt;The concept of God emanating outward and producing our world comes from &lt;em&gt;Neoplatonism&lt;/em&gt;. It can also be seen as a response to critiques of Plato’s theory of forms.&lt;/p&gt;
&lt;p&gt;Plato’s theory of forms tells us that there are universals and particulars. Universals are abstractions from particulars—patterns or archetypes. One can imagine this with an analogy: making Christmas cookies. To make them, we take a cookie cutter and press it into dough. This gives us dough in a specific shape, and we then only need to bake it to get our cookie. In this analogy, the cookie cutter is the universal, while the many cookies we produce with it are the particulars. The universal determines the form, shape, and properties of each particular.&lt;/p&gt;
&lt;p&gt;So, for all objects in the world—for example, the many different apples, we have one universal &amp;ldquo;Form of Apple,&amp;rdquo; which is unchanging and eternal, representing the perfect essence of what an apple is. Similarly, there are Forms of Goodness, Beauty, Chairs, Trees, Humans, and so on. This position is also called &lt;em&gt;Platonic realism&lt;/em&gt;, which stands in contrast to &lt;em&gt;nominalism&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;One problem for the realist is this: we now have all these forms, but where are they? Why do they exist? Where did they come from?&lt;/p&gt;
&lt;p&gt;Neoplatonism offers a solution to the realist’s problem: where the Forms come from and why they exist. It begins with the One, the ultimate source beyond being and thought. From the One emanates the Intellect (or Nous), which contains all the Forms—eternal archetypes of all things.&lt;/p&gt;
&lt;p&gt;The process continues as the Intellect overflows, producing the Soul and, eventually, the material world. Everything: apples, trees, humans—derives from this chain of emanation. Each thing in the world reflects the Forms within the Intellect, which in turn reflect the unity of the One.&lt;/p&gt;
&lt;p&gt;Thus, Neoplatonism explains the origin and presence of universals(also called &amp;ldquo;Ideas&amp;rdquo;) as part of a structured, hierarchical reality that flows from the divine source.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Often he calls Being and the Intellect &amp;ldquo;Idea&amp;rdquo;, which shows that Plato understood that the Intellect comes from the Good, and the Soul comes from the Intellect.&lt;/p&gt;
&lt;p&gt;~ Enneads 5.1(10)§5.1.8&lt;/p&gt;
&lt;/blockquote&gt;

 
&lt;/details&gt;


&lt;p&gt;You might be confused when you remember back to a prior section where I used the act of creation as a criticism towards a personal God, arguing that an all-loving God would not create things knowing that this would produce evil.
Since the non-agentic God is still defined as the greatest being, He too should be all-loving and be effected by the same criticism.
Importantly, this criticism does not work for a non-agentic God, as this is impersonal, more like a force of nature. It doesn’t consciously create creation because it chooses to do so; instead, creation happens as a natural process of overflowing.&lt;/p&gt;
&lt;p&gt;I want to take one point from the prior section that connects neatly with the question, &amp;ldquo;Why are things the way they are and not different?&amp;rdquo; That point is: Why were the first things in creation created with different levels of distance from God?&lt;/p&gt;
&lt;p&gt;First, we already acknowledged that we can treat creation or the universe as a chaotic system, whose current state is highly dependent on the conditions at the start of the system.
Second, the process of emanation does not necessitate uniformity or symmetry.
Third, even from very simple, basic rules, near randomness can be achieved. My favorite example of this is that we can simulate random walks using very basic rules in &lt;a href="https://en.wikipedia.org/wiki/Cellular_automaton"&gt;cellular automata&lt;/a&gt;.&lt;/p&gt;
&lt;h4 id="334-desire-to-return-to-god"&gt;3.3.4 Desire to Return to God&lt;/h4&gt;
&lt;p&gt;Another thing that can be criticized is the desire to return to God. If God is the ultimate good, why do so many people not seem to desire to move closer to Him?&lt;/p&gt;
&lt;p&gt;This kind of criticism is very effective against personal gods like the Christian God, but to a far lesser extent against to the impersonal God, I have described so far. Goodness is very closely linked with the concepts of &lt;a href="https://monkemanx.github.io/articles/symposium/"&gt;love and beauty&lt;/a&gt;. We can imagine love as the &lt;em&gt;human desire to attain goodness and happiness&lt;/em&gt;, and this goodness and happiness is outwardly represented by beauty.&lt;/p&gt;
&lt;p&gt;Thus the answer, to the question at the beginning of this section, is very similar to the answer in the previous section on the &lt;em&gt;problem of divine hiddenness&lt;/em&gt;. The desire to return to God, and with that, to goodness itself, is present in every human being but expresses itself differently. Some people access this desire through art, some through music, others through nature, and some through virtue. This is possible because what we perceive as beauty is, in reality, an expression of the goodness in all these activities. Our desire to get lost in these activities represents our desire to return to the ultimate goodness. However, the beauty in our world is imperfect, and that is why we are never fully satisfied with beauty; we always want to see, hear, and experience more.&lt;/p&gt;
&lt;h3 id="335-omnipotence"&gt;3.3.5 Omnipotence&lt;/h3&gt;
&lt;p&gt;One last thing I want to mention is the concept of omnipotence, the property that God can do anything. A question that arises regarding the problem of evil is this: If evil emerges not because God directly creates it, but because the farther something is from the One (or the source of all being), the less it reflects the perfect goodness and unity of the divine source. Then this means that God cannot create a world entirely without evil, because creation necessitates some degree of imperfection. Wouldn’t this dispute God’s omnipotence?&lt;/p&gt;
&lt;p&gt;One way to reconcile this is by denying God’s omnipotence. Strictly speaking, the God constructed so far only needs to be infinite goodness for the philosophical arguments to work. However, in addition to this, God must &lt;em&gt;possess all qualities that contribute to or embody intrinsic goodness&lt;/em&gt;. Whether omnipotence is one of these qualities is now a matter of debate. Though the idea of a God who is not omnipotent might seem strange at first, it’s not as far-fetched as it may appear. Remember, we conceptualize God as a force of nature, more akin to a gravitational field that unconsciously influences the world, rather than a personal God who consciously acts. In this view, it makes sense that one force cannot do everything.&lt;/p&gt;
&lt;p&gt;There’s also another way to think about omnipotence. Instead of imagining it as being able to do anything possible, it may be more accurate to define omnipotence as the ability to do all things that are &lt;em&gt;logically&lt;/em&gt; possible. In other words, God can create the world, but He cannot create a rock so heavy that He cannot lift it. Similarly, evil is a logical necessity, and therefore, cannot be avoided in the process of creation.&lt;/p&gt;
&lt;p&gt;However, there is a problem with this view. The concept of God is so philosophically appealing because it allows us to ground all of metaphysics in Him as the end of a causal chain, preventing an infinite regress. But if it’s impossible for God to create certain things, it seems that something exists outside of God’s purview. In this case, logic would seem to be stronger than God. This raises the question: If logic is more foundational than God, then this undermines the idea of God itself.&lt;/p&gt;
&lt;p&gt;A common rebuttal to the idea that God is bound by logic misunderstands the relationship between God and logic. Instead, logic is not something created by God through conscious decision, but rather something that emanates naturally from His goodness. God’s nature is the source of all logic, and logic flows from Him as a necessary aspect of His perfection. To say God could change logic implies a change in His essence, which is impossible since God is immutable.&lt;/p&gt;
&lt;p&gt;Asking whether logic applies to God is a &lt;a href="https://en.wikipedia.org/wiki/Category_mistake"&gt;category mistake&lt;/a&gt;, much like asking if the number two is blue. Logic, as a human construct, doesn’t apply to God in the same way it applies to the created world. God is the necessary condition for logic’s existence, not constrained by it. Therefore, God is beyond logic, and the question itself misapplies human concepts to the divine.&lt;/p&gt;
&lt;h3 id="4-conclusion"&gt;4. Conclusion&lt;/h3&gt;
&lt;p&gt;There is alot that I have left out; any arguments that I provided in this article have numerous citicism and numerous rebuttals to them, and then rebuttals of the rebtuals and so on.
But I hope I&amp;rsquo;ve made it clear that there is another way of thinking about god besides the agentic and personnel that is so familiar to us.&lt;/p&gt;


&lt;figure&gt;
 &lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width:60%" src="https://monkemanx.github.io/attachments/german_neoplatonic_mystic.jpg"&gt;
 &lt;figcaption style="margin-top: 10px"&gt;This quote is by &lt;i&gt;Meister Eckhart&lt;/i&gt;. I have a book on him sitting on my desk, not read yet.&lt;/figcaption&gt;
&lt;/figure&gt;

</description></item><item><title>The Gem of Africa</title><link>https://monkemanx.github.io/articles/namibia/</link><pubDate>Tue, 25 Mar 2025 12:00:00 +0000</pubDate><author>monkeman@cock.li (MonkeMan)</author><guid>https://monkemanx.github.io/articles/namibia/</guid><description>&lt;p&gt;A year ago, a friend of mine had the idea to visit Namibia, often referred to as the &amp;ldquo;Gems of Africa&amp;rdquo; because of its diversity of animals and biomes. I’m not entirely sure how he came up with the idea. Maybe it was due to the country’s connection to Germany during its colonial period, or perhaps some algorithmic push from the &amp;ldquo;machine gods&amp;rdquo; in his feed. Whatever the reason, he asked our friend group if we were up for joining him. Another friend said yes, but I couldn’t go because it overlapped with some exams I had to take at university. However, I promised him that next semester, I would choose modules that allowed me to have some free time, which would overlap with theirs.&lt;/p&gt;
&lt;p&gt;Luckily, our friend group is relatively small; just me and the other two. We go back to kindergarten, all being from the same village, so synchronizing our schedules was easier. Still, there were some problems because the others are at different universities, meaning our semesters don’t neatly overlap. Their exam phase finishes before mine even starts, and by the time my exams are over, they’re already a few weeks into their next semester.&lt;/p&gt;
&lt;p&gt;So, my plan was to move one major exam to my final semester, which would also be the time I’d be writing my bachelor’s thesis. In this semester, I would have two early exams and a few later ones, with a big break in between that I could use for the holiday. My second early exam was on Thursday, and we would fly out on Friday. We spent two weeks in Namibia and flew back. This second exam was in Optimization Theory (see &lt;em&gt;&lt;a href="https://monkemanx.github.io/articles/optimization_theory/"&gt;Optimization Theory&lt;/a&gt;&lt;/em&gt; and &lt;em&gt;&lt;a href="https://monkemanx.github.io/articles/optimization_problems/"&gt;More Optimization Problems&lt;/a&gt;&lt;/em&gt;), which I had already failed once. This exam became my “last try,” and it would come back to bite me, more on that later.&lt;/p&gt;
&lt;p&gt;Back to Namibia. The plan was to rent a car and drive in a big circle around the country, checking out all the important sights along the way. We decided to rent an automatic 4x4. Our selection criteria were simple: cheap, reliable, and with a rooftop tent for safety, as Namibia is famous for its wildlife. For food, we stocked the car’s included mini-fridge with cans and bought some &lt;a href="https://en.wikipedia.org/wiki/Game_(hunting)"&gt;game meat&lt;/a&gt; from a local butcher. We also bought water in bulk (about 40 liters, calculating 5 liters per person per day), as it’s not safe to drink in most places. We spent most nights at rented campsites, where we could grill the game meat and canned food in the evening. For dinner, we often had bread and cheese. When we were in a city, we took the opportunity to stay in a hotel and eat at a restaurant.&lt;/p&gt;
&lt;p&gt;Before the trip, we had some preparations to do, the most important being a visit to the travel medicine consultation. These can be found in major cities, such as &lt;a href="https://www.landkreis-karlsruhe.de/Service-Verwaltung/Themen-Projekte/Gesundheit/Reisemedizinische-Sprechstunde/"&gt;Karlsruhe&lt;/a&gt;, and they’ll tell you what you need to know about medical precautions. For example, they recommended vaccinations like rabies, typhus, hepatitis A, tetanus, whooping cough, and diphtheria. Some of these cost money, but my health insurance reimbursed me for the ones that did.&lt;/p&gt;
&lt;p&gt;We also bought the meat in advance, rented the car, and booked accommodation for the busier spots, like the Etosha National Park and the city of Swakopmund. It’s important to note that we traveled in the off-season. While this made many things cheaper and less crowded, it also meant fewer animals to see. This is because, in the off-season, there’s a lot of rain, which spreads the animals out. In the peak season, it’s drier, so the animals gather around the waterholes, making it easier to see them, you just have to wait at the waterhole for them to come.&lt;/p&gt;
&lt;h2 id="day-0-the-flight"&gt;Day 0: The Flight&lt;/h2&gt;
&lt;p&gt;Our plane took off in the evening, flying directly from Frankfurt to Windhoek, the capital city of Namibia, taking approximately 10 hours. We arrived a bit early, giving us enough time to grab something to eat and, of course, enjoy a beer.&lt;/p&gt;
&lt;p&gt;The plane wasn’t large; it could host maybe a hundred people. As this was my first flight, I was a bit nervous, and the turbulence, though not major, didn&amp;rsquo;t help. To make matters worse, I got the worst seat possible, right in the middle. To my left were my two friends, and to my right was a stranger. This meant that, if I wanted to stand up, I had to either ask the person next to me or get both of my friends to stand up. Before the in-flight meal, this wasn’t much of a problem, but afterward, both my friends and the stranger quickly fell asleep, leaving me to deal with the rest of the night. I spent it trying to suppress the urge to pee and debating whether to wake someone up to use the toilet. I do have a weak bladder, so I barely slept (around a hour) which would catch up with me the next day.&lt;/p&gt;
&lt;p&gt;Aside from that, the flight was rather uneventful, and we arrived safely the following morning.&lt;/p&gt;


&lt;figure&gt;
 &lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width:100%" src="https://monkemanx.github.io/attachments/namibia/Frankfurt_Airport_Eurowings_Discover_Airbus_A330-343_D-AIKH_(DSC00755).jpg"&gt;
 &lt;figcaption style="text-align:center; margin-top: 10px;"&gt;
 The Plane with which we flew.
 &lt;/figcaption&gt;
&lt;/figure&gt;


&lt;h2 id="day-1-windhoek"&gt;Day 1: Windhoek&lt;/h2&gt;
&lt;p&gt;We arrived at 9 o&amp;rsquo;clock in the morning. The sun was shining at full force, and it was hot. Namibia is extremely diverse in its biomes, which means the temperature can vary a lot, but at this time of year, you can expect temperatures not to drop below 15°C and to rise up to 30°C.&lt;/p&gt;


&lt;figure&gt;
 &lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width:100%" src="https://monkemanx.github.io/attachments/namibia/IMG_20250221_082220.jpg"&gt;
 &lt;figcaption style="text-align:center; margin-top: 10px;"&gt;
 Airstripe on which we landed.
 &lt;/figcaption&gt;
&lt;/figure&gt;


&lt;p&gt;An interesting note about the airport: first, it was crawling with some kind of beetle-like insect; second, right next to the check-in counter was a shrine for Namibia&amp;rsquo;s first president, who had passed away just two weeks prior to our arrival. He was famous for leading Namibia to independence from South Africa. The shrine included a picture of him, some candles, and a book where people could write messages for him. We would encounter many such shrines during our travels, and hear once more about the complicated relationship between Namibia and South Africa from a local.&lt;/p&gt;
&lt;p&gt;The first thing we did was exchange some money for Namibian dollars and buy some water. Here’s a funny thing: there were two local money exchanges right next to each other, with one offering a better rate than the other. How does that work? The company from which we rented the jeep had sent someone to pick us up from the airport, which is a common practice for car rental companies in Namibia. After all, how are you supposed to get to your car otherwise? They don’t have public transportation, and the airport is over an hour’s drive from the next major city, Windhoek. So, we and a bunch of other travelers got onto a bus, which drove us toward the rental company. The bus was speeding down the road, which we later learned is more the norm than the exception. While zipping across the landscape, we took in our first views of Namibia’s scenery, all while the bus driver blasted some kind of African music, lots of dynamic drums. The coolest thing I saw (though I didn&amp;rsquo;t manage to take a photo) was a monkey sitting on top of a city sign, eating some kind of fruit.&lt;/p&gt;
&lt;p&gt;As we entered a more urban environment, it became clear that this is a low-trust society. Every so often, you could spot a neighborhood watch sign. Every property was walled in, often with metal spikes or barbed wire on top of the walls—no ordinary barbed wire, but the NATO-style wire with sharp metal blades instead of spikes.&lt;/p&gt;
&lt;p&gt;After arriving at the rental company, we were given a safety briefing, signed some papers, and our journey could finally begin.&lt;/p&gt;


&lt;figure&gt;
 &lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width:100%" src="https://monkemanx.github.io/attachments/namibia/IMG_20250221_154425.jpg"&gt;
 &lt;figcaption style="text-align:center; margin-top: 10px;"&gt;
 Our rented Car.
 &lt;/figcaption&gt;
&lt;/figure&gt;


&lt;p&gt;But first, we needed to stock up on supplies, so we went to a supermarket called &lt;em&gt;Superspar&lt;/em&gt; (yes, really). As I mentioned earlier, Namibia has a low-trust society, so you’ll find people wearing vests at many parking lots. They’ll watch over your car in exchange for a tip (around 5 Namibian dollars, see &lt;a href="https://www.tripadvisor.com.au/ShowTopic-g293820-i96100-k14839761-Tips-Namibia.html"&gt;here&lt;/a&gt;), ensuring nothing gets stolen. Just like at the airport, there was another shrine for the late president in front of the supermarket.&lt;/p&gt;
&lt;p&gt;After we finished our shopping, there were five people helping us: one sales associate, two packing our items into bags, and another helping to bring the bags to our car (totally over the top). At that time, we weren’t sure how much to tip, so my friend just handed them a 50 Namibian dollar note. Later, we learned you’re supposed to tip about 5 Namibian dollars. We still had some missing items to buy, so we went to the bazaar, where we picked up SIM cards (10€ for 20GB) and a bunch of water (50 liters). You should calculate about 5 liters per person per day, as the water in Namibia is generally not safe to drink—though it can be used for washing or when boiled.&lt;/p&gt;
&lt;p&gt;I have to say, driving in the city is a nightmare, and our nerves were on edge. Remember, I was running on fumes with just an hour of sleep, and on top of that, it was a new car, new traffic rules, and an unfamiliar traffic culture. In retrospect, what we did was crazy. The rental company didn’t really explain the traffic rules, and we didn’t bother to look them up. So, we drove through the city without knowing any of the rules. For example, at a 4-way intersection, there are 12 traffic lights—three for each direction. When we arrived at our first 4-way, we had no idea which light to follow, and unfortunately, there wasn’t even a car in front of us that we could follow. So, we just winged it, which included driving in the middle of the intersection, waiting for cars to pass by, and then making our turn, still in the middle of the intersection.&lt;/p&gt;
&lt;p&gt;Naturally, there was a bit of yelling on all sides. The friend who was driving in the city vowed never to drive there again. In general, the traffic rules are strange (at least how I understood them): cars on the main road always have the right of way. Unlike in Germany, you don’t look at the traffic light on your street, but at the light on the opposite street. Each direction has a light for driving straight, one for left turns, and one for right turns. There’s also no &amp;ldquo;priority to the right&amp;rdquo; rule. Instead, the vehicle that reaches the intersection first has the right of way, and if that doesn’t work, drivers use eye contact and hand gestures. This leads, as you can imagine, to nerve-wracking traffic behavior in the city.&lt;/p&gt;
&lt;p&gt;We finally reached the hotel at 17:00. We had planned to go to the restaurant &amp;ldquo;Joe’s Beerhouse.&amp;rdquo; The instructor from the rental company told us that if we weren’t there, we wouldn’t really be experiencing Windhoek. But we were so exhausted that we decided to have a quiet evening and eat at the hotel instead.&lt;/p&gt;
&lt;h2 id="day-2-driving-mountain-pass-and-apple-pie"&gt;Day 2: Driving, Mountain Pass, and Apple Pie&lt;/h2&gt;
&lt;p&gt;Namibia is a rather dry country, so vegetables and fruits play a lesser role in their cuisine. More importantly, game meat (meat from wild animals rather than domesticated ones) is a staple. We had the idea to buy some meat from a local butcher to grill during our holiday. The butcher kindly brought it to our hotel. The meat included: gnu, springbok, zebra, oryx, eland, and biltong (dried, cured meat that can be eaten as a snack). We were basically eating our way through Namibia’s wildlife. The situation in Namibia can be summarized as:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;By giving game value, it encourages farmers to protect them rather than simply driving them off their land. Oryx and eland are not seen as competition for cattle or sheep, but as another type of livestock. The animals are being killed for meat, yes, but the value placed on them encourages everyone to work toward their conservation.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;The day began with breakfast, and the highlight was game meat sausage, which had a beefy, gamey taste. We met another German tourist who was on holiday. After realizing it was our first time in Namibia, he gave us some helpful tips. One story I remember was about his fishing trip along the coast, where he caught a fish 1.5 meters long, which was a mixture of shark and ray.&lt;/p&gt;
&lt;p&gt;He also told us not to have high hopes for seeing animals in Etosha National Park. He and his friends hadn’t seen any elephants. We kind of expected that, because we were visiting during the off-season. The advantage was that it was cheaper, but the downside was fewer animals. However, we remained hopeful because it had rained a lot two weeks prior, and where there’s water, there’s life—meaning animals.&lt;/p&gt;
&lt;p&gt;Then, it was time to hit the road. We packed our things into the jeep and just started driving. Driving in the city is very stressful, but once we were out on the broad, open roads, it finally felt like a holiday. The roads were empty, with views of mountains and nature around us. I played navigator, looking at Google Maps and telling the driver when to turn. We decided to only use Google Maps in the cities, and for the rest of the trip, we relied solely on the map we purchased and street signs.&lt;/p&gt;


&lt;figure&gt;
 &lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width:100%" src="https://monkemanx.github.io/attachments/namibia/IMG_20250222_095912461.jpg"&gt;
&lt;/figure&gt;


&lt;p&gt;Every street is classified into four levels: A, B, C, and D, indicating how well-maintained they are. Major highways (level A) are always made of asphalt, while other roads (C and below) are gravel. Until now, we had only driven on major highways (asphalt), but that soon changed when we switched from the A1 from Windhoek to Rehoboth to the C24.&lt;/p&gt;


&lt;figure&gt;
 &lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width:100%" src="https://monkemanx.github.io/attachments/namibia/IMG_20250222_105409.jpg"&gt;
&lt;/figure&gt;


&lt;p&gt;Importantly, when transitioning from an asphalt to a gravel road, you need to adjust the tire pressure. We originally had it at 2.5 kPa and changed it to 2 kPa. While we were doing this, some people drove by, checking to see if we needed help. We signaled that we didn’t, but they stopped anyway and advised us that if we had a flat tire, we should turn back because the road would only get worse. When we explained we were just letting out some pressure, one of them said, “Not everyone in Namibia is a rober, just because you’re European.” It felt like a racism accusation. But better safe than sorry, I thought. I also took the opportunity to take a leak—I couldn’t leave Namibia without at least peeing against one tree!&lt;/p&gt;


&lt;figure&gt;
 &lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width:100%" src="https://monkemanx.github.io/attachments/namibia/IMG_20250222_115421252.jpg"&gt;
&lt;/figure&gt;


&lt;p&gt;When driving off major highways, the amount of traffic is incredibly low. Later, when using the D1261 road, there were stretches where you could drive for 20 minutes without seeing a single car. And if you did see a car, you could spot it from a distance because the region is flat, with no trees or anything obstructing the view. Even if you couldn&amp;rsquo;t see the car, you could always spot the giant dust cloud it created in the distance—depending on how much it had rained and how dusty the road was (this particular road was very dusty). When a car passed us, for the next five seconds, we couldn’t see anything due to the dust it stirred up.&lt;/p&gt;


&lt;figure&gt;
 &lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width:100%" src="https://monkemanx.github.io/attachments/namibia/IMG_20250222_124534.jpg"&gt;
&lt;/figure&gt;


&lt;p&gt;Driving on the D1275, the number of butterflies was incredible. They were constantly flying in front of the car, fluttering away when we got too close, and some of them inevitably slammed into the windshield with a loud thud. One reason we chose this route was because it passed through the Spreetshoogte Mountain Pass, which I highly recommend. The views are spectacular, and the drive itself is quite interesting.&lt;/p&gt;







	






































	
	

	
		&lt;script src="https://monkemanx.github.io/shortcode-gallery/jquery-3.7.1.min.js"&gt;&lt;/script&gt;
	

	

	&lt;script src="https://monkemanx.github.io/shortcode-gallery/swipebox/js/jquery.swipebox.min.js"&gt;&lt;/script&gt;
	&lt;link rel="stylesheet" href="https://monkemanx.github.io/shortcode-gallery/swipebox/css/swipebox.min.css"&gt;

	&lt;script src="https://monkemanx.github.io/shortcode-gallery/justified_gallery/jquery.justifiedGallery.min.js"&gt;&lt;/script&gt;
	&lt;link rel="stylesheet" href="https://monkemanx.github.io/shortcode-gallery/justified_gallery/justifiedGallery.min.css"/&gt;


&lt;style&gt;
	

	
&lt;/style&gt;





&lt;div id="gallery-26c3a4d75d2b1433cd182c38b587c513-7-wrapper" class="gallery-wrapper"&gt;
&lt;div id="gallery-26c3a4d75d2b1433cd182c38b587c513-7" class="justified-gallery"&gt;
	
		

			
			

			
			
				
			

			
				
			

			
			
				
					
				
			


			
			

			&lt;div&gt;
				
				
					
					
				

				
				
					
					
				

				&lt;a href="https://monkemanx.github.io/namibia/mountain_pass/IMG_20250222_113108.jpg"
					class="galleryImg"
					
					&gt;
					&lt;img
						width="600" height="270"

						
							src="https://monkemanx.github.io/namibia/mountain_pass/IMG_20250222_113108_hu_c9d79e4a8ad41f0d.jpg"
						

						
					&gt;
				&lt;/a&gt;
			&lt;/div&gt;
		
	
		

			
			

			
			
				
			

			
				
			

			
			
				
					
				
			


			
			

			&lt;div&gt;
				
				
					
					
				

				
				
					
					
				

				&lt;a href="https://monkemanx.github.io/namibia/mountain_pass/IMG_20250222_115132.jpg"
					class="galleryImg"
					
					&gt;
					&lt;img
						width="600" height="270"

						
							src="https://monkemanx.github.io/namibia/mountain_pass/IMG_20250222_115132_hu_ee451a0edeef09e0.jpg"
						

						
					&gt;
				&lt;/a&gt;
			&lt;/div&gt;
		
	
		

			
			

			
			
				
			

			
				
			

			
			
				
					
				
			


			
			

			&lt;div&gt;
				
				
					
					
				

				
				
					
					
				

				&lt;a href="https://monkemanx.github.io/namibia/mountain_pass/IMG_20250222_121023.jpg"
					class="galleryImg"
					
					&gt;
					&lt;img
						width="600" height="270"

						
							src="https://monkemanx.github.io/namibia/mountain_pass/IMG_20250222_121023_hu_606bdcecdc89f664.jpg"
						

						
					&gt;
				&lt;/a&gt;
			&lt;/div&gt;
		
	
&lt;/div&gt;
&lt;/div&gt;

&lt;script&gt;
	if (!("HSCGjQuery" in window)) {
		if (!window.jQuery) {
			throw new Error("jQuery is not loaded, hugo-shortcode-gallery wont work without it!");
		}
		window.HSCGjQuery = window.jQuery.noConflict(true);
	}

	
	
	
	
	
	;(function($) {

		$( document ).ready(() =&gt; {
			const gallery = $("#gallery-26c3a4d75d2b1433cd182c38b587c513-7");
			

			
			let swipeboxInstance = null;

			
			
			gallery.on('jg.complete', () =&gt; {
				

				swipeboxInstance = $('.galleryImg').swipebox(
					$.extend({},
						{ }
					)
				);
			});

			
			gallery.justifiedGallery($.extend(
				{
					rowHeight : "150",
					margins : "5",
					border : 0,
					randomize : false ,
					waitThumbnailsLoad : false,
					lastRow : "justify",
					captions : false,
					
					
				},
				{ }
			));

			
			
		});

	
	
	
	})(window.HSCGjQuery)
&lt;/script&gt;

&lt;p&gt;After encountering the C14, we drove to a small village called &amp;ldquo;Solitaire.&amp;rdquo; As you can guess by the name, the village is quite desolate, with only a few buildings in the middle of nowhere. However, it’s famous for two things: its McGregor apple pie and its collection of broken, rusty old cars, giving it a vibe straight out of a video game.&lt;/p&gt;







	







































&lt;style&gt;
	

	
&lt;/style&gt;





&lt;div id="gallery-26c3a4d75d2b1433cd182c38b587c513-8-wrapper" class="gallery-wrapper"&gt;
&lt;div id="gallery-26c3a4d75d2b1433cd182c38b587c513-8" class="justified-gallery"&gt;
	
		

			
			

			
			
				
			

			
				
			

			
			
				
					
				
			


			
			

			&lt;div&gt;
				
				
					
					
				

				
				
					
					
				

				&lt;a href="https://monkemanx.github.io/namibia/solitaire/IMG_20250222_131022.jpg"
					class="galleryImg"
					
					&gt;
					&lt;img
						width="600" height="270"

						
							src="https://monkemanx.github.io/namibia/solitaire/IMG_20250222_131022_hu_196cc5840b85c6f4.jpg"
						

						
					&gt;
				&lt;/a&gt;
			&lt;/div&gt;
		
	
		

			
			

			
			
				
			

			
				
			

			
			
				
					
				
			


			
			

			&lt;div&gt;
				
				
					
					
				

				
				
					
					
				

				&lt;a href="https://monkemanx.github.io/namibia/solitaire/IMG_20250222_131200.jpg"
					class="galleryImg"
					
					&gt;
					&lt;img
						width="600" height="270"

						
							src="https://monkemanx.github.io/namibia/solitaire/IMG_20250222_131200_hu_b43816670234f599.jpg"
						

						
					&gt;
				&lt;/a&gt;
			&lt;/div&gt;
		
	
		

			
			

			
			
				
			

			
				
			

			
			
				
					
				
			


			
			

			&lt;div&gt;
				
				
					
					
				

				
				
					
					
				

				&lt;a href="https://monkemanx.github.io/namibia/solitaire/IMG_20250222_134203.jpg"
					class="galleryImg"
					
					&gt;
					&lt;img
						width="600" height="270"

						
							src="https://monkemanx.github.io/namibia/solitaire/IMG_20250222_134203_hu_21f1dee9a20c2e95.jpg"
						

						
					&gt;
				&lt;/a&gt;
			&lt;/div&gt;
		
	
&lt;/div&gt;
&lt;/div&gt;

&lt;script&gt;
	if (!("HSCGjQuery" in window)) {
		if (!window.jQuery) {
			throw new Error("jQuery is not loaded, hugo-shortcode-gallery wont work without it!");
		}
		window.HSCGjQuery = window.jQuery.noConflict(true);
	}

	
	
	
	
	
	;(function($) {

		$( document ).ready(() =&gt; {
			const gallery = $("#gallery-26c3a4d75d2b1433cd182c38b587c513-8");
			

			
			let swipeboxInstance = null;

			
			
			gallery.on('jg.complete', () =&gt; {
				

				swipeboxInstance = $('.galleryImg').swipebox(
					$.extend({},
						{ }
					)
				);
			});

			
			gallery.justifiedGallery($.extend(
				{
					rowHeight : "150",
					margins : "5",
					border : 0,
					randomize : false ,
					waitThumbnailsLoad : false,
					lastRow : "justify",
					captions : false,
					
					
				},
				{ }
			));

			
			
		});

	
	
	
	})(window.HSCGjQuery)
&lt;/script&gt;

&lt;p&gt;When we got on the C19 road, it was the first time I drove the car before that, my friends had been driving. It took me a while to get used to it since I had never driven an automatic car before. But after a while, it basically drove itself. The roads were in pretty good condition, and we drove for tens of kilometers without turning. We blasted some music, for which we had started collecting songs a year prior specifically for a Namibia road trip playlist. During the 2 hours I drove, I saw five cars (I counted).&lt;/p&gt;


&lt;figure&gt;
 &lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width:100%" src="https://monkemanx.github.io/attachments/namibia/IMG_20250222_145942.jpg"&gt;
&lt;/figure&gt;


&lt;p&gt;We arrived at &amp;ldquo;Little Sossus&amp;rdquo; (haha, “Sus”), a campsite that consisted of several lots with concrete cubicles where we could go to the toilet, shower, and grill. However, there were no beds, so we slept in tents on top of our jeep.&lt;/p&gt;


&lt;figure&gt;
 &lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width:100%" src="https://monkemanx.github.io/attachments/namibia/IMG_20250222_183843881.jpg"&gt;
&lt;/figure&gt;


&lt;p&gt;The cubicle seemed to be inhabited by a little fellow, a cat, which for the rest of the day and the next day never left our sides. It lounged in the sand and caught insects that were attracted to our lights in the evening. Well, “caught” might be an exaggeration, as the cat just waited for the insects to come near and then bit them.&lt;/p&gt;


&lt;figure&gt;
 &lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width:100%" src="https://monkemanx.github.io/attachments/namibia/IMG_20250223_180825.jpg"&gt;
&lt;/figure&gt;


&lt;p&gt;The campsite also had a pool, which I wasn’t expecting because it was in the middle of the desert. The sun was shining at full force, and it was above 30°C. That the water didn’t evaporate seemed like a miracle to me, but maybe they filled it up daily. Relaxing in the pool with the backdrop of a mountain was divine.&lt;/p&gt;


&lt;figure&gt;
 &lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width:100%" src="https://monkemanx.github.io/attachments/namibia/IMG_20250222_183752647.jpg"&gt;
&lt;/figure&gt;


&lt;p&gt;For dinner, we grilled some oryx meat and made some pumpkins (gem squash). We wrapped them in aluminum foil and threw them in the fire. A bit of herb butter, and they were delicious. We let the day fade out with a couple of beers, staring at the night sky. The number of stars was massive, and they were so clear and bright that some of them looked unreal.&lt;/p&gt;


&lt;figure&gt;
 &lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width:100%" src="https://monkemanx.github.io/attachments/namibia/IMG_20250223_201118547.jpg"&gt;
&lt;/figure&gt;


&lt;p&gt;Before going to bed, we had to lock everything up in the campsite, because apparently, there were jackals known to steal food—and especially shoes.&lt;/p&gt;
&lt;h2 id="day-3-sossusvlei-inside-the-namib-desert"&gt;Day 3: Sossusvlei, Inside the Namib Desert&lt;/h2&gt;
&lt;p&gt;The plan for the day was to visit the Namibian desert, famous for its towering dunes. As such, we left the campsite as early as possible the later we went, the hotter it would get. We woke up at 6 a.m., followed the C19 to Sesriem, and were at the dunes by 9 a.m.&lt;/p&gt;


&lt;figure&gt;
 &lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width:100%" src="https://monkemanx.github.io/attachments/namibia/IMG_20250223_070844949.jpg"&gt;
&lt;/figure&gt;


&lt;p&gt;The car ride itself was relaxing but boring. We drove for over an hour on a road where the maximum speed limit was 40 km/h. The road was completely straight with no turns, and all you could see to the left or right was sand. The road was nearly empty, and when we did see a car, it was speeding at 40 km/h or more over the limit. This was the first time we realized that in Namibia, maximum speed limits seem more like a suggestion than a rule. However, it’s worth noting that Namibia ranks 9th in the world for the highest traffic-related deaths. So, I wouldn’t necessarily recommend following the locals’ lead.&lt;/p&gt;


&lt;figure&gt;
 &lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width:100%" src="https://monkemanx.github.io/attachments/namibia/IMG_20250223_073710501.jpg"&gt;
&lt;/figure&gt;


&lt;p&gt;On this stretch of road, we also noticed that in Namibia, there are no signs indicating when the last speed limit sign is lifted. To this day, we’re unsure how it works. We would always check if we saw a speed limit sign on the opposite direction of traffic and assume that one applied to us.&lt;/p&gt;
&lt;p&gt;Another reason the ride was boring was because of the car itself. It was automatic, so you only needed one foot for both pedals. Additionally, you could set a speed limit that the car would maintain, meaning you didn’t even need to use your foot to accelerate. With the straight road and no turns, we didn’t even need to steer. The highlight of the drive was when we saw our first exotic animals: springboks sitting beneath some trees and a jackal. We also had a brief moment driving on sand, which required us to lower the tire pressure to avoid getting stuck. One car behind us did get stuck, but they managed to get out.&lt;/p&gt;


&lt;figure&gt;
 &lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width:100%" src="https://monkemanx.github.io/attachments/namibia/IMG_20250223_074428.jpg"&gt;
&lt;/figure&gt;


&lt;p&gt;It’s incredible how diverse Namibia’s biomes are. On the first day in Windhoek, everything was green and lush with plants and trees. On the second day, we drove through a more stony landscape with less greenery but many mountains. Now, in the Namib Desert, there was neither much stone nor green, only sand. Sure, other countries like the U.S. have similar biome diversity, but in Namibia, all these biomes are just a day’s drive apart from each other.&lt;/p&gt;
&lt;p&gt;When we arrived at Sossusvlei, the temperature was already above 30°C, and there were no clouds to shield the sun. With no shadows to hide behind, I can only recommend using a lot of sunscreen, bringing plenty of water (1 liter per person won’t be enough), wearing a hat, and having sunglasses. The plan for the morning was to climb Big Daddy, the tallest sand dune in the world, standing at 325 meters, visit Deadvlei, and then visit Big Mama for lunch.&lt;/p&gt;


&lt;figure&gt;
 &lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width:100%" src="https://monkemanx.github.io/attachments/namibia/IMG_20250223_082948.jpg"&gt;
&lt;/figure&gt;


&lt;p&gt;Climbing Big Daddy can take an hour or two, depending on how fast you are. Importantly, you can’t go straight up because you’d sink in the sand. Instead, you need to follow the ridge of the dune. The total length of walking isn’t that long, but each step sinks you into the sand, and you have to constantly try to walk on paths where others have already walked.&lt;/p&gt;
&lt;p&gt;Reaching the top, the view is phenomenal. The way down is much quicker—if you’re daring enough to run straight down, it only takes about 5 minutes. Running down takes you straight into Deadvlei, a white clay pan famous for its dead trees, which are nearly 700 years old and have not decomposed due to the dry climate.&lt;/p&gt;







	







































&lt;style&gt;
	

	
&lt;/style&gt;





&lt;div id="gallery-26c3a4d75d2b1433cd182c38b587c513-18-wrapper" class="gallery-wrapper"&gt;
&lt;div id="gallery-26c3a4d75d2b1433cd182c38b587c513-18" class="justified-gallery"&gt;
	
		

			
			

			
			
				
			

			
				
			

			
			
				
					
				
			


			
			

			&lt;div&gt;
				
				
					
					
				

				
				
					
					
				

				&lt;a href="https://monkemanx.github.io/namibia/dune/IMG_20250223_084028.jpg"
					class="galleryImg"
					
					&gt;
					&lt;img
						width="600" height="270"

						
							src="https://monkemanx.github.io/namibia/dune/IMG_20250223_084028_hu_1e13907e1de592f5.jpg"
						

						
					&gt;
				&lt;/a&gt;
			&lt;/div&gt;
		
	
		

			
			

			
			
				
			

			
				
			

			
			
				
					
				
			


			
			

			&lt;div&gt;
				
				
					
					
				

				
				
					
					
				

				&lt;a href="https://monkemanx.github.io/namibia/dune/IMG_20250223_084507.jpg"
					class="galleryImg"
					
					&gt;
					&lt;img
						width="270" height="600"

						
							src="https://monkemanx.github.io/namibia/dune/IMG_20250223_084507_hu_56bc1680320c4532.jpg"
						

						
					&gt;
				&lt;/a&gt;
			&lt;/div&gt;
		
	
		

			
			

			
			
				
			

			
				
			

			
			
				
					
				
			


			
			

			&lt;div&gt;
				
				
					
					
				

				
				
					
					
				

				&lt;a href="https://monkemanx.github.io/namibia/dune/IMG_20250223_092433.jpg"
					class="galleryImg"
					
					&gt;
					&lt;img
						width="600" height="270"

						
							src="https://monkemanx.github.io/namibia/dune/IMG_20250223_092433_hu_e9222ca69c7b7531.jpg"
						

						
					&gt;
				&lt;/a&gt;
			&lt;/div&gt;
		
	
		

			
			

			
			
				
			

			
				
			

			
			
				
					
				
			


			
			

			&lt;div&gt;
				
				
					
					
				

				
				
					
					
				

				&lt;a href="https://monkemanx.github.io/namibia/dune/IMG_20250223_092545.jpg"
					class="galleryImg"
					
					&gt;
					&lt;img
						width="600" height="270"

						
							src="https://monkemanx.github.io/namibia/dune/IMG_20250223_092545_hu_c26e73bdbf84ea4b.jpg"
						

						
					&gt;
				&lt;/a&gt;
			&lt;/div&gt;
		
	
&lt;/div&gt;
&lt;/div&gt;

&lt;script&gt;
	if (!("HSCGjQuery" in window)) {
		if (!window.jQuery) {
			throw new Error("jQuery is not loaded, hugo-shortcode-gallery wont work without it!");
		}
		window.HSCGjQuery = window.jQuery.noConflict(true);
	}

	
	
	
	
	
	;(function($) {

		$( document ).ready(() =&gt; {
			const gallery = $("#gallery-26c3a4d75d2b1433cd182c38b587c513-18");
			

			
			let swipeboxInstance = null;

			
			
			gallery.on('jg.complete', () =&gt; {
				

				swipeboxInstance = $('.galleryImg').swipebox(
					$.extend({},
						{ }
					)
				);
			});

			
			gallery.justifiedGallery($.extend(
				{
					rowHeight : "150",
					margins : "5",
					border : 0,
					randomize : false ,
					waitThumbnailsLoad : false,
					lastRow : "justify",
					captions : false,
					
					
				},
				{ }
			));

			
			
		});

	
	
	
	})(window.HSCGjQuery)
&lt;/script&gt;

&lt;p&gt;Walking through Deadvlei and back to the parking area can take another hour. When I finally arrived, I was exhausted. I hadn’t brought enough water, so I was incredibly thirsty. My clothes were full of sand, and the sun was relentlessly beating down on us.&lt;/p&gt;


&lt;figure&gt;
 &lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width:100%" src="https://monkemanx.github.io/attachments/namibia/IMG_20250223_101924.jpg"&gt;
&lt;/figure&gt;


&lt;p&gt;We decided against climbing Big Mama or any of the other smaller dunes and opted instead to eat a small lunch. It consisted of untoasted toast with fresh cream and cheese slices that tasted like nothing. It was one of the worst lunches I’ve had! Afterward, we headed back, but not before making a detour to the Sesriem Canyon. We could climb down and walk through it a bit, but since it had rained a few days prior, there was water at the bottom, so we couldn’t walk through the entire canyon.&lt;/p&gt;


&lt;figure&gt;
 &lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width:100%" src="https://monkemanx.github.io/attachments/namibia/IMG_20250223_135547.jpg"&gt;
&lt;/figure&gt;


&lt;p&gt;When we returned to our campsite from the day before, we relaxed in the pool, grilled some kudu meat with chakalaka, looked at the stars, and went to sleep.&lt;/p&gt;
&lt;h2 id="day-4-driving-and-swakopmund"&gt;Day 4: Driving and Swakopmund&lt;/h2&gt;
&lt;p&gt;This was mostly a driving day. We took the C14, stopped briefly in Solitaire for another slice of apple pie, and then continued all the way up to Walvis Bay.&lt;/p&gt;
&lt;p&gt;On our way, we saw various animals such as gnus, oryx, and a Cape fox. We passed through two mountain passes again, though the views weren&amp;rsquo;t as spectacular as the first mountain pass we drove through on Day 2. The remaining route was the most monotonous drive so far, tens of kilometers of nothing but a flat landscape scattered with small stones. Every hill became exciting because we thought maybe something new would be behind it, but it never was. We dubbed this terrain the &amp;ldquo;void.&amp;rdquo;&lt;/p&gt;


&lt;figure&gt;
 &lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width:100%" src="https://monkemanx.github.io/attachments/namibia/IMG_20250224_093835.jpg"&gt;
&lt;/figure&gt;


&lt;p&gt;It was interesting to note that most of the land was privately owned, and nearly everything was fenced in. If it wasn&amp;rsquo;t, the owner marked their territory by piling up stones from the environment. I really wondered what people did with that barren, stony land, especially since it’s at least a two-hour drive from any other settlement.&lt;/p&gt;
&lt;p&gt;In the afternoon, we arrived at Swakopmund, a coastal city near the Atlantic. It had the vibe of a small city along the Baltic Sea, with clear signs of German colonial influence, from the buildings to the fact that you could hear German being spoken wherever you walked.&lt;/p&gt;


&lt;figure&gt;
 &lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width:100%" src="https://monkemanx.github.io/attachments/namibia/IMG_20250224_134633.jpg"&gt;
&lt;/figure&gt;


&lt;p&gt;What struck me was that just a day before, we were in the desert, and now we were at the Atlantic. We checked for places to swim, but bathing was forbidden due to the strong currents. The first thing we did was walk along the coastline and pier, just soaking in the atmosphere.&lt;/p&gt;


&lt;figure&gt;
 &lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width:100%" src="https://monkemanx.github.io/attachments/namibia/IMG_20250224_145057.jpg"&gt;
&lt;/figure&gt;


&lt;p&gt;As I mentioned earlier, just before flying to Namibia, I had an optimization theory exam. When I checked the status of the exam, I found that I had failed it, for the second time. This meant I would have to take an oral re-examination, or I would be kicked out of university. Furthermore, I saw that the deadline to register for the insight (where you can check that the examiner didn&amp;rsquo;t miss anything or make a mistake) had already passed, and the professor had threatened that if I didn’t respond within the next few days, I would be expelled. So, I hastily wrote an email explaining my situation—being on holiday and having missed the email. Even though I knew it was now out of my hands and, as the Stoics say, &amp;ldquo;if it concerns anything beyond our power, be prepared to say that it is nothing to you,&amp;rdquo; it still cast a shadow over the rest of the day.&lt;/p&gt;


&lt;figure&gt;
 &lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width:100%" src="https://monkemanx.github.io/attachments/namibia/IMG_20250224_150733.jpg"&gt;
&lt;/figure&gt;


&lt;p&gt;After our walk on the pier, we resupplied at the local supermarket since most of our food and water had run out. Finally, we could grab a snack, which we did at Kücki&amp;rsquo;s Pub. The food there was delicious. I got Beef Trinchado, a South African Portuguese dish, though the portion was a bit small. They served good beer, but the food leaned more toward German-style dishes than traditional Namibian ones.&lt;/p&gt;
&lt;p&gt;In the evening, we watched some local TV in the hotel room. &amp;ldquo;Local&amp;rdquo; might be a stretch—there was one South African channel, which had a bizarre dwarf scene. Two dwarfs were on a romantic date, and the local barkeep kept harassing them and making jokes about their height. There was also a sports channel (which, surprisingly, was the most normal one, showing regular football), an Indian channel that was very over-the-top in traditional Bollywood style, an educational channel that looked like Khan Academy lectures, and a Western channel showing &lt;em&gt;Hawaii Five-O&lt;/em&gt;. I had remembered &lt;em&gt;Hawaii Five-O&lt;/em&gt; as being quite good, but watching it again, it seemed more like a bad soap opera.&lt;/p&gt;
&lt;h2 id="day-5-cape-cross-and-seals"&gt;Day 5: Cape Cross and Seals&lt;/h2&gt;
&lt;p&gt;Today’s plan was to head out to Cape Cross, which is famous for its seal colony, the largest in the world, and do some kayaking around them to get a closer look.&lt;/p&gt;


&lt;figure&gt;
 &lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width:100%" src="https://monkemanx.github.io/attachments/namibia/IMG_20250225_081538.jpg"&gt;
&lt;/figure&gt;


&lt;p&gt;The kayaking excursion was based in Walvis Bay, and a guide drove us towards Cape Cross. The colony there consists of nearly 100,000 seals, all grouped together in large clusters, sometimes as many as 2,000 per group, scattered around the cape. Surrounding them, jackals roamed the area. Interestingly, the jackals don’t hunt the seals; instead, they wait for a seal to die, which happens quite often, as nearly 40% of baby seals don’t survive. You could see dead seals lying around everywhere, their carcasses being scavenged by the jackals. What’s fascinating is that there’s no fresh water available to the jackals, so after feeding, they need to walk for almost two days before they can find fresh water again and then return.&lt;/p&gt;


&lt;figure&gt;
 &lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width:100%" src="https://monkemanx.github.io/attachments/namibia/IMG_20250225_080251.jpg"&gt;
&lt;/figure&gt;


&lt;p&gt;We also saw some pelicans and flamingos, which can be classified as greater and lesser flamingos. These flamingos travel up to Botswana when it rains, sending out scouts to check for rainfall. If the scouts don’t return, the rest of the flock knows it has rained, and they head off to Botswana.&lt;/p&gt;


&lt;figure&gt;
 &lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width:100%" src="https://monkemanx.github.io/attachments/namibia/IMG_20250225_105728.jpg"&gt;
&lt;/figure&gt;


&lt;p&gt;The ocean around the area was filled with tanker ships, as Walvis Bay is a harbor. Around 300 years ago, it was used as a jumping-off point for whale hunting, and for a long time, there were no whales in the area. However, they have recently started to return.&lt;/p&gt;
&lt;p&gt;After exploring the area, we hopped into our kayaks and paddled around the seal colony, getting as close as a few meters to the seals. A bit further out, we spotted a dolphin. Interestingly, dolphins are the primary food of orcas, who love to hunt them but don’t bother with seals.&lt;/p&gt;
&lt;p&gt;Here’s a rapid round of seal facts:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Female seals are pregnant for most of their lives. For four months, the fetus doesn’t grow, then for eight months, it develops, after which the seal gives birth, gets pregnant again, and the cycle continues.&lt;/li&gt;
&lt;li&gt;At 12 years old, male seals become dominant and claim a harem of females.&lt;/li&gt;
&lt;li&gt;Seals have no natural predators, either on land or in the water in Namibia.&lt;/li&gt;
&lt;li&gt;Lions have recently started preying on seals, but researchers are trying to keep them away because seals contain an enzyme that lions can’t digest, causing them to die.&lt;/li&gt;
&lt;li&gt;Seals sleep with their noses up in the air to smell better. If one of them detects danger and runs away, all the others follow.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The guide was friendly and gave us a good tip: if we’re driving to Etosha on gravel roads (which offer a more cinematic view than the asphalt roads), we should be careful, as the rain from the previous days might have made some roads undrivable due to rivers. We should check with locals for safe routes, a tip we forgot, which caused some issues later on in the trip.&lt;/p&gt;
&lt;p&gt;I’ve mentioned before how the traffic laws in Namibia seem to be more like recommendations than strict rules, and this was perfectly illustrated on our way back from Walvis Bay to Swakopmund, where a police car overtook us, speeding by 20 km/h.&lt;/p&gt;


&lt;figure&gt;
 &lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width:100%" src="https://monkemanx.github.io/attachments/namibia/IMG_20250225_172830.jpg"&gt;
&lt;/figure&gt;


&lt;p&gt;In the evening, we took a walk around the old parts of Swakopmund, visiting places like the presidential summer house. Just in front of it, we saw animals that looked like a mix between chickens and peacocks crossing the streets. We also visited the old railroad station. For dinner, I had some Namibian pizza, which replaces the boring salami with a variety of different game meats—highly recommended!&lt;/p&gt;


&lt;figure&gt;
 &lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width:100%" src="https://monkemanx.github.io/attachments/namibia/IMG_20250225_173722.jpg"&gt;
&lt;/figure&gt;


&lt;h2 id="day-6-skeleton-coast-and-spitzkoppe"&gt;Day 6: Skeleton Coast and Spitzkoppe&lt;/h2&gt;
&lt;p&gt;Remember the issue with my optimization theory exam? I finally got a response email from the professor, who graciously allowed me to attend the insight session for the exam, even though I had missed the deadline. Things were looking up, great news to start the day with.&lt;/p&gt;
&lt;p&gt;It was time to continue our journey, so we packed up and said goodbye to Swakopmund. We drove along the C34 from Swakopmund to Henties Bay. This route was a pleasure to drive as it runs along the Skeleton Coast, a stretch of coastline famous for its harsh conditions. The area got its name because of the many shipwrecks that occurred due to frequent fog and the treacherous, sharp coastline. Ships would often crash, and if they survived and managed to make landfall, all they would find was endless desert with no access to food or water. Survival chances were slim. The coast is still littered with the remains of these wrecks, many of which have never been removed. We stopped at one wreck to take some photos, but as soon as we left the car, we were swarmed by a group of locals trying to sell us items, which made us leave quickly.&lt;/p&gt;


&lt;figure&gt;
 &lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width:100%" src="https://monkemanx.github.io/attachments/namibia/IMG_20250226_095147.jpg"&gt;
&lt;/figure&gt;


&lt;p&gt;The day before, the kayaking guide had warned us about the gravel roads due to the rain, but we completely forgot his advice. While driving, we came across a closed gate, which is common in Namibia as protection against wild animals. From what we heard, when you encounter a gate like this, you should leave it as you found it, so we closed it after going through.&lt;/p&gt;
&lt;p&gt;Soon after, a man came out of his house, walking toward us and shouting. We weren’t sure what he wanted, so we waited for him to approach. He introduced himself as a local and began telling us how poor he was and how hard he had worked as a miner. We weren’t sure what he was expecting from us, but we offered some coins, which he declined. Just then, another car drove through the gate, distracting him long enough for us to quickly drive away.&lt;/p&gt;
&lt;p&gt;The road was muddy, but we kept going. As you might expect, we got stuck. We tried maneuvering the car, but it wouldn’t budge. We got out to assess the situation, and sure enough, the car was stuck in the mud. I used the shovel to dig around the tires, but we couldn’t get it free. Thankfully, another car that just had driven past us was occupied by tourists from South Africa. They had traction boards—these are boards that can be placed under tires to give them more grip. Further the local helped us dig, and once the car was free, the South African tourists used the boards to pull us out of the mud. Afterward, we thanked them, and as we re-inflated the tires, the local man (who had helped) started telling us his life story.&lt;/p&gt;


&lt;figure&gt;
 &lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width:100%" src="https://monkemanx.github.io/attachments/namibia/IMG_20250226_120706034.jpg"&gt;
&lt;/figure&gt;


&lt;p&gt;His name was Baki Johannes. His first name was his tribal name, and his second name was his Christian name. He went to school until he was 18, but then was forced by South Africa to fight as a soldier for the next nine years—likely during the Namibian War of Independence. After returning from the war, he went back to live with his mother in his home village. His great-great-grandparents were German and Polish, arriving in Namibia in 1864, and one of them married a person from the &lt;a href="https://en.wikipedia.org/wiki/San_people"&gt;San people&lt;/a&gt;. He himself didn’t speak German, but his daughter was learning it at the Martin Luther School. As we left, he said that &amp;ldquo;the Father in Heaven has led us to him&amp;rdquo; and that in his eyes, we were all the same people.&lt;/p&gt;
&lt;p&gt;After this encounter, we continued our drive to our destination for the day: Spitzkoppe. This mountain is famous for its challenging climbs due to its smooth surface, which made it only climbable in the 1950s. We looked for a camping spot, which we could choose freely as long as it was unoccupied. Some campsites are better than others, especially if they have some shade from trees. The best campsites also offer a good view of the mountain at sunset, when the light turns it a deep red. I’d recommend Campsite 11A or 11B, both of which offer easy access to a rock with a fantastic view.&lt;/p&gt;


&lt;figure&gt;
 &lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width:100%" src="https://monkemanx.github.io/attachments/namibia/IMG_20250226_140801.jpg"&gt;
&lt;/figure&gt;


&lt;p&gt;We drove around Spitzkoppe and visited the &amp;ldquo;Bridge&amp;rdquo; rock formation, where we met a friendly couple of German tourists. In exchange for a photo of them, they took one of us. We also visited the rock pool—a small pond surrounded by stones. But here’s the surprise: we found a turtle living in the pond! We asked a local about it, and he told us that the pool isn’t always there year-round. When it’s not, the turtle buries itself deep in the sand.&lt;/p&gt;


&lt;figure&gt;
 &lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width:100%" src="https://monkemanx.github.io/attachments/namibia/IMG_20250226_144053.jpg"&gt;
&lt;/figure&gt;


&lt;p&gt;In addition to the mountain, the area is famous for its ancient &lt;a href="https://sacredsites.com/africa/namibia/spitzkoppe.html"&gt;Bushman paintings&lt;/a&gt;. These paintings are between 2,000 and 4,000 years old and were made by the Bushman, the native people of the region. There are two sites where you can view them. One is easily accessible by foot, and the other requires a 100-meter climb up a mountain. Once you’ve seen one, you’ve seen the other too, but the paintings on the mountaintop are more rewarding due to the better view. For both sites, you need a guide, who are usually hanging around and can be tipped afterward based on how much you feel their tour was worth.&lt;/p&gt;


&lt;figure&gt;
 &lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width:100%" src="https://monkemanx.github.io/attachments/namibia/IMG_20250226_150808.jpg"&gt;
&lt;/figure&gt;


&lt;p&gt;The paintings were made using animal blood mixed with powders to create color. They’ve been so well-preserved due to the dry climate and lack of moisture. The paintings depict various animals that the Bushman people encountered, and they were often used to communicate information about these animals to other groups. Interestingly, there’s a squid depicted in the paintings, even though we’re in the middle of the desert. This is because, long ago, the area was actually covered by sea. If a Bushman group grew too large (over 26 people), they would split into smaller groups because it was more efficient to gather food that way.&lt;/p&gt;


&lt;figure&gt;
 &lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width:100%" src="https://monkemanx.github.io/attachments/namibia/IMG_20250226_150800.jpg"&gt;
&lt;/figure&gt;


&lt;p&gt;In the evening, we sat on the aforementioned rock by our campsite, drank some apple cider, and admired Spitzkoppe as the sun set, turning the mountain red. The rock was also home to a few Rock Hyraxes, which were very trusting. You could get as close as a meter to them, and they wouldn’t care.&lt;/p&gt;


&lt;figure&gt;
 &lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width:100%" src="https://monkemanx.github.io/attachments/namibia/IMG_20250226_192624.jpg"&gt;
&lt;/figure&gt;


&lt;h2 id="day-7-traffic-mayhem"&gt;Day 7: Traffic Mayhem&lt;/h2&gt;
&lt;p&gt;Today was a driving day, and it was a crazy one at that. One of the main roads, the B1, was undergoing renovation. The goal was to add new lanes, but the old lanes were still accessible. Being a major highway, it was packed with cars. The speed limit was 60 km/h, and overtaking was prohibited. Despite this, we saw regular cars overtaking and speeding, which was especially dangerous because the road was narrow. If you veered too far to the left, you’d fall off a 30 cm cliff where the new lane was supposed to be. One wrong move, and you wouldn’t be able to get back up.&lt;/p&gt;
&lt;p&gt;For example, we saw one truck trying to overtake another, speeding, and the overtaking maneuver itself took almost a minute. We also witnessed, separately, a police car, a city council member’s car (it was clearly marked with giant letters on the side), and a military truck overtaking and speeding. It was clear that overtaking was forbidden and the speed limit was posted everywhere—every 100 meters or so, but they still went ahead with it.&lt;/p&gt;
&lt;p&gt;The situation was made even crazier by humans standing every kilometer or so on the side of the road, waving flags to indicate &amp;ldquo;danger.&amp;rdquo; I’m not sure how much it helped, given the way people were driving. The situation was made even worse by the road markings, which were all over the place. There were lines directing you toward the edge of the road, where the cliff was, lines that appeared and disappeared unpredictably, and lines leading into oncoming traffic.&lt;/p&gt;
&lt;p&gt;The danger of this construction zone was not just theoretical; it was real. In the span of just 20 km, we witnessed the aftermath of at least two accidents. One truck veered too far to the left and ended up headfirst in the ground, while two cars collided on the side of the road. I think now you can understand why Namibia has such a high traffic-related death rate.&lt;/p&gt;
&lt;p&gt;All of this chaos was summed up perfectly by a billboard we saw along the way, which read in big letters: &amp;ldquo;Please choose to obey the speed limit.&amp;rdquo;&lt;/p&gt;
&lt;p&gt;One last thing about traffic that I couldn’t leave out: Not far from the construction zone, we saw a jeep in front of us that was overloaded with electrical scrap, things like fridges and air conditioners. When I say overloaded, I mean that the back was so packed with scrap that you couldn’t even see the driver’s seat, and everything was loosely held together with a few straps. Imagine if even one item fell off—fatalities behind the jeep would be certain. To make matters even crazier, the jeep was overtaken by a small truck. My friend, who was driving, asked if we should overtake too. I could only respond with, &amp;ldquo;When in Namibia, do like the Namibians do&amp;rdquo; (or, as they say, &amp;ldquo;When in Rome, do like the Romans do&amp;rdquo;).&lt;/p&gt;
&lt;p&gt;As we drove, the landscape changed once again. It shifted from desert to rocky terrain, then back to the greenery we saw at the start of the trip in Windhoek. The landscape was also dotted with pointed dirt hills, some almost as tall as trees. My guess is that these were termite mounds.&lt;/p&gt;


&lt;figure&gt;
 &lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width:100%" src="https://monkemanx.github.io/attachments/namibia/IMG_20250227_123002922.jpg"&gt;
&lt;/figure&gt;


&lt;h2 id="day-8-weirdness"&gt;Day 8: Weirdness&lt;/h2&gt;
&lt;p&gt;Not much happened today. We drove from our campsite to visit Vingerklip Rock, which looks like a giant finger. The entry fee wasn’t much—only around 20 Namibian dollars.&lt;/p&gt;


&lt;figure&gt;
 &lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width:100%" src="https://monkemanx.github.io/attachments/namibia/IMG_20250228_085137180.jpg"&gt;
&lt;/figure&gt;


&lt;p&gt;In the afternoon, I found myself in a reflective mood. Maybe it was because I had some time during the drive and finished reading the book &lt;em&gt;Stoner&lt;/em&gt;. It made me think about what it means to live a fulfilling life, about the journey so far, about the mundane versus the divine, and about virtue. I ended up writing down my &lt;a href="https://monkemanx.github.io/tangled_thoughts/stoicism_and_ramblings/"&gt;incoherent ramblings&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;On a happier note, we spotted some Chacma baboons by the roadside. They looked so fluffy! And just like in Sossusvlei, the night sky was breathtaking. There were so many stars, all shining so brightly.&lt;/p&gt;


&lt;figure&gt;
 &lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width:100%" src="https://monkemanx.github.io/attachments/namibia/20250306142751.JPG"&gt;
&lt;/figure&gt;


&lt;h2 id="day-9-11-etosha"&gt;Day 9-11: Etosha&lt;/h2&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;All the menageries in the world turned loose would not compare to the sight I saw that day.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;~ G. McKiernan 1876, about Etosha&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;This was arguably the highlight of the trip, the &lt;a href="https://www.etoshanationalpark.org"&gt;Etosha National Park&lt;/a&gt; and also one of the main reasons people visit Namibia. It&amp;rsquo;s famous for the abundant wildlife, and geographically, the park is centered around a vast salt pan, with the rest of the park surrounding it.&lt;/p&gt;
&lt;p&gt;Etosha operates under specific rules: you&amp;rsquo;re only allowed to exit the car at designated rest or camp sites, and you&amp;rsquo;re required to stay inside the car otherwise. Visitors typically drive around to various waterholes, where the chances of seeing animals are higher. Whenever we spotted something, we’d stop, take a photo, and continue on our way. It’s highly recommended to book campsites inside Etosha well in advance, especially in the high season, as they get quite popular.&lt;/p&gt;
&lt;p&gt;On our first day, the plan was to explore everything to the left of Okaukuejo camp, then drive to Halali camp to sleep there. On the second day, we&amp;rsquo;d cover everything between Okaukuejo and Namutoni camp. But when we arrived at Okaukuejo, we were informed that Halali had water and power issues, and we couldn’t stay there. So, we decided to skip exploring anything further left from Okaukuejo and head straight to Namutoni to ensure everything was operational there.&lt;/p&gt;


&lt;figure&gt;
 &lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width:100%" src="https://monkemanx.github.io/attachments/namibia/Etosha-Map-2025.jpg"&gt;
&lt;/figure&gt;


&lt;p&gt;As we left Okaukuejo, we spotted a herd of springbok near the road. It seemed that the territory of springbok, at least at that time, was mostly around Okaukuejo.&lt;/p&gt;
&lt;p&gt;We also saw our first animal from the &lt;a href="https://www.namibiaexperience.com/blog/where-can-you-see-the-big-five-in-namibia/"&gt;Big Five&lt;/a&gt; list—a rhinoceros. It was far away, but later we saw another one up close, so I wont show a picture here.&lt;/p&gt;
&lt;p&gt;On our way to Namutoni, we encountered various animals, including ostriches, zebras, and giraffes. Upon arrival at Namutoni, we were relieved to find that the water and power were working, and we could stay there. The campsite features a restaurant, a tourist shop, and an illuminated waterhole where we could sit and watch for animals. Unfortunately, nothing came by during our visit.&lt;/p&gt;







	







































&lt;style&gt;
	

	
&lt;/style&gt;





&lt;div id="gallery-26c3a4d75d2b1433cd182c38b587c513-41-wrapper" class="gallery-wrapper"&gt;
&lt;div id="gallery-26c3a4d75d2b1433cd182c38b587c513-41" class="justified-gallery"&gt;
	
		

			
			

			
			
				
			

			
				
			

			
			
				
					
				
			


			
			

			&lt;div&gt;
				
				
					
					
				

				
				
					
					
				

				&lt;a href="https://monkemanx.github.io/namibia/etosha/20250301210712.JPG"
					class="galleryImg"
					
					&gt;
					&lt;img
						width="600" height="400"

						
							src="https://monkemanx.github.io/namibia/etosha/20250301210712_hu_b8ed599a640125ed.JPG"
						

						
					&gt;
				&lt;/a&gt;
			&lt;/div&gt;
		
	
		

			
			

			
			
				
			

			
				
			

			
			
				
					
				
			


			
			

			&lt;div&gt;
				
				
					
					
				

				
				
					
					
				

				&lt;a href="https://monkemanx.github.io/namibia/etosha/IMG_20250301_093011978.jpg"
					class="galleryImg"
					
					&gt;
					&lt;img
						width="600" height="338"

						
							src="https://monkemanx.github.io/namibia/etosha/IMG_20250301_093011978_hu_2ffaa7f03ed53d63.jpg"
						

						
					&gt;
				&lt;/a&gt;
			&lt;/div&gt;
		
	
		

			
			

			
			
				
			

			
				
			

			
			
				
					
				
			


			
			

			&lt;div&gt;
				
				
					
					
				

				
				
					
					
				

				&lt;a href="https://monkemanx.github.io/namibia/etosha/IMG_20250301_130209.jpg"
					class="galleryImg"
					
					&gt;
					&lt;img
						width="600" height="270"

						
							src="https://monkemanx.github.io/namibia/etosha/IMG_20250301_130209_hu_ef08da394883315b.jpg"
						

						
					&gt;
				&lt;/a&gt;
			&lt;/div&gt;
		
	
		

			
			

			
			
				
			

			
				
			

			
			
				
					
				
			


			
			

			&lt;div&gt;
				
				
					
					
				

				
				
					
					
				

				&lt;a href="https://monkemanx.github.io/namibia/etosha/IMG_20250301_165418.jpg"
					class="galleryImg"
					
					&gt;
					&lt;img
						width="600" height="270"

						
							src="https://monkemanx.github.io/namibia/etosha/IMG_20250301_165418_hu_be785cf5cde54fec.jpg"
						

						
					&gt;
				&lt;/a&gt;
			&lt;/div&gt;
		
	
&lt;/div&gt;
&lt;/div&gt;

&lt;script&gt;
	if (!("HSCGjQuery" in window)) {
		if (!window.jQuery) {
			throw new Error("jQuery is not loaded, hugo-shortcode-gallery wont work without it!");
		}
		window.HSCGjQuery = window.jQuery.noConflict(true);
	}

	
	
	
	
	
	;(function($) {

		$( document ).ready(() =&gt; {
			const gallery = $("#gallery-26c3a4d75d2b1433cd182c38b587c513-41");
			

			
			let swipeboxInstance = null;

			
			
			gallery.on('jg.complete', () =&gt; {
				

				swipeboxInstance = $('.galleryImg').swipebox(
					$.extend({},
						{ }
					)
				);
			});

			
			gallery.justifiedGallery($.extend(
				{
					rowHeight : "150",
					margins : "5",
					border : 0,
					randomize : false ,
					waitThumbnailsLoad : false,
					lastRow : "justify",
					captions : false,
					
					
				},
				{ }
			));

			
			
		});

	
	
	
	})(window.HSCGjQuery)
&lt;/script&gt;

&lt;p&gt;We also explored the campsite, which has a notable structure, Fort Namutoni, a fort built in the early 1900s by the Germans during their colonial rule. The fort was destroyed after locals attacked it. It was restored in the 1950s and now serves as a lodge and viewpoint for visitors.&lt;/p&gt;
&lt;p&gt;Later in the night, the washroom area became a nightmare. Someone had left the door open, the lights on, and it was swarming with insects. There were so many grasshoppers in front of the door that they started jumping on us the moment we tried to enter. Inside, the place was filled with various creepy and dead insects. It was so bad, it still haunts my dreams.&lt;/p&gt;
&lt;p&gt;A key tip for Etosha is to start driving early in the morning and take a break around noon. Animals don’t move much during the peak heat of the day. On our first day, from noon until about 3 p.m., we didn’t see much. On the second day, we got started earlier ans as such seen much more.&lt;/p&gt;
&lt;p&gt;In the afternoon of the second day. We saw our second Big Five animal, a herd of elephants crossing the road right in front of us. It was an incredible sight!&lt;/p&gt;







	







































&lt;style&gt;
	

	
&lt;/style&gt;





&lt;div id="gallery-26c3a4d75d2b1433cd182c38b587c513-42-wrapper" class="gallery-wrapper"&gt;
&lt;div id="gallery-26c3a4d75d2b1433cd182c38b587c513-42" class="justified-gallery"&gt;
	
		

			
			

			
			
				
			

			
				
			

			
			
				
					
				
			


			
			

			&lt;div&gt;
				
				
					
					
				

				
				
					
					
				

				&lt;a href="https://monkemanx.github.io/namibia/etosha2/20250302171532.JPG"
					class="galleryImg"
					
					&gt;
					&lt;img
						width="600" height="400"

						
							src="https://monkemanx.github.io/namibia/etosha2/20250302171532_hu_b7ef25f4a51a943f.JPG"
						

						
					&gt;
				&lt;/a&gt;
			&lt;/div&gt;
		
	
		

			
			

			
			
				
			

			
				
			

			
			
				
					
				
			


			
			

			&lt;div&gt;
				
				
					
					
				

				
				
					
					
				

				&lt;a href="https://monkemanx.github.io/namibia/etosha2/20250302171544.JPG"
					class="galleryImg"
					
					&gt;
					&lt;img
						width="600" height="400"

						
							src="https://monkemanx.github.io/namibia/etosha2/20250302171544_hu_f3b08110ae9e242c.JPG"
						

						
					&gt;
				&lt;/a&gt;
			&lt;/div&gt;
		
	
		

			
			

			
			
				
			

			
				
			

			
			
				
					
				
			


			
			

			&lt;div&gt;
				
				
					
					
				

				
				
					
					
				

				&lt;a href="https://monkemanx.github.io/namibia/etosha2/20250302171550.JPG"
					class="galleryImg"
					
					&gt;
					&lt;img
						width="600" height="400"

						
							src="https://monkemanx.github.io/namibia/etosha2/20250302171550_hu_c9d3a7a89e98494.JPG"
						

						
					&gt;
				&lt;/a&gt;
			&lt;/div&gt;
		
	
		

			
			

			
			
				
			

			
				
			

			
			
				
					
				
			


			
			

			&lt;div&gt;
				
				
					
					
				

				
				
					
					
				

				&lt;a href="https://monkemanx.github.io/namibia/etosha2/20250302171612.JPG"
					class="galleryImg"
					
					&gt;
					&lt;img
						width="600" height="400"

						
							src="https://monkemanx.github.io/namibia/etosha2/20250302171612_hu_99f25cb49cf2563.JPG"
						

						
					&gt;
				&lt;/a&gt;
			&lt;/div&gt;
		
	
&lt;/div&gt;
&lt;/div&gt;

&lt;script&gt;
	if (!("HSCGjQuery" in window)) {
		if (!window.jQuery) {
			throw new Error("jQuery is not loaded, hugo-shortcode-gallery wont work without it!");
		}
		window.HSCGjQuery = window.jQuery.noConflict(true);
	}

	
	
	
	
	
	;(function($) {

		$( document ).ready(() =&gt; {
			const gallery = $("#gallery-26c3a4d75d2b1433cd182c38b587c513-42");
			

			
			let swipeboxInstance = null;

			
			
			gallery.on('jg.complete', () =&gt; {
				

				swipeboxInstance = $('.galleryImg').swipebox(
					$.extend({},
						{ }
					)
				);
			});

			
			gallery.justifiedGallery($.extend(
				{
					rowHeight : "150",
					margins : "5",
					border : 0,
					randomize : false ,
					waitThumbnailsLoad : false,
					lastRow : "justify",
					captions : false,
					
					
				},
				{ }
			));

			
			
		});

	
	
	
	})(window.HSCGjQuery)
&lt;/script&gt;

&lt;p&gt;Not long after, it started raining heavily. The rain was so intense, visibility was reduced to only 10 meters in front of the car. At one point, a kudu suddenly jumped in front of us, and we narrowly avoided hitting it.&lt;/p&gt;
&lt;p&gt;When we returned to the campsite, it was basically underwater due to the rain. We couldn’t cook, and the restaurant was already closed. So, we went to a small supermarket in the camp, bought crackers, and ate them with the leftover cheese. The only comfort was knowing that the next day we’d have an all-you-can-eat buffet at the next campsite.&lt;/p&gt;
&lt;p&gt;On our third and final day in Etosha, we got up early once again and started driving around, hoping to spot a few more animals before we left, which we did, on exiting nation cal we saw a rhinoceros with babies. Unfortunately, we didn’t manage to see any lions or leopards, which were probably located further west from Okaukuejo, an area we didn’t get to explore. However, we were still happy with the variety of animals we’d seen. Reflecting back to the second day of our trip when a German tourist warned us that they themselves hadn’t seen any Big Five animals during their three day visit, we came away pretty good.&lt;/p&gt;







	







































&lt;style&gt;
	

	
&lt;/style&gt;





&lt;div id="gallery-26c3a4d75d2b1433cd182c38b587c513-43-wrapper" class="gallery-wrapper"&gt;
&lt;div id="gallery-26c3a4d75d2b1433cd182c38b587c513-43" class="justified-gallery"&gt;
	
		

			
			

			
			
				
			

			
				
			

			
			
				
					
				
			


			
			

			&lt;div&gt;
				
				
					
					
				

				
				
					
					
				

				&lt;a href="https://monkemanx.github.io/namibia/etosha3/20250303205837.JPG"
					class="galleryImg"
					
					&gt;
					&lt;img
						width="600" height="400"

						
							src="https://monkemanx.github.io/namibia/etosha3/20250303205837_hu_9a407f08800cfa7e.JPG"
						

						
					&gt;
				&lt;/a&gt;
			&lt;/div&gt;
		
	
		

			
			

			
			
				
			

			
				
			

			
			
				
					
				
			


			
			

			&lt;div&gt;
				
				
					
					
				

				
				
					
					
				

				&lt;a href="https://monkemanx.github.io/namibia/etosha3/20250303205933.JPG"
					class="galleryImg"
					
					&gt;
					&lt;img
						width="400" height="600"

						
							src="https://monkemanx.github.io/namibia/etosha3/20250303205933_hu_e244e5b7852f2ddf.JPG"
						

						
					&gt;
				&lt;/a&gt;
			&lt;/div&gt;
		
	
		

			
			

			
			
				
			

			
				
			

			
			
				
					
				
			


			
			

			&lt;div&gt;
				
				
					
					
				

				
				
					
					
				

				&lt;a href="https://monkemanx.github.io/namibia/etosha3/20250306142000.JPG"
					class="galleryImg"
					
					&gt;
					&lt;img
						width="600" height="400"

						
							src="https://monkemanx.github.io/namibia/etosha3/20250306142000_hu_f800712aa42214a0.JPG"
						

						
					&gt;
				&lt;/a&gt;
			&lt;/div&gt;
		
	
		

			
			

			
			
				
			

			
				
			

			
			
				
					
				
			


			
			

			&lt;div&gt;
				
				
					
					
				

				
				
					
					
				

				&lt;a href="https://monkemanx.github.io/namibia/etosha3/20250306142004.JPG"
					class="galleryImg"
					
					&gt;
					&lt;img
						width="600" height="400"

						
							src="https://monkemanx.github.io/namibia/etosha3/20250306142004_hu_7826e8f5616b1e73.JPG"
						

						
					&gt;
				&lt;/a&gt;
			&lt;/div&gt;
		
	
		

			
			

			
			
				
			

			
				
			

			
			
				
					
				
			


			
			

			&lt;div&gt;
				
				
					
					
				

				
				
					
					
				

				&lt;a href="https://monkemanx.github.io/namibia/etosha3/20250306142013.JPG"
					class="galleryImg"
					
					&gt;
					&lt;img
						width="600" height="400"

						
							src="https://monkemanx.github.io/namibia/etosha3/20250306142013_hu_8b45dbc902d123a4.JPG"
						

						
					&gt;
				&lt;/a&gt;
			&lt;/div&gt;
		
	
&lt;/div&gt;
&lt;/div&gt;

&lt;script&gt;
	if (!("HSCGjQuery" in window)) {
		if (!window.jQuery) {
			throw new Error("jQuery is not loaded, hugo-shortcode-gallery wont work without it!");
		}
		window.HSCGjQuery = window.jQuery.noConflict(true);
	}

	
	
	
	
	
	;(function($) {

		$( document ).ready(() =&gt; {
			const gallery = $("#gallery-26c3a4d75d2b1433cd182c38b587c513-43");
			

			
			let swipeboxInstance = null;

			
			
			gallery.on('jg.complete', () =&gt; {
				

				swipeboxInstance = $('.galleryImg').swipebox(
					$.extend({},
						{ }
					)
				);
			});

			
			gallery.justifiedGallery($.extend(
				{
					rowHeight : "150",
					margins : "5",
					border : 0,
					randomize : false ,
					waitThumbnailsLoad : false,
					lastRow : "justify",
					captions : false,
					
					
				},
				{ }
			));

			
			
		});

	
	
	
	})(window.HSCGjQuery)
&lt;/script&gt;

&lt;p&gt;Our stop for the third day was the &lt;a href="https://www.sachsenheimguestfarm.com/"&gt;Sachsenheim Guest Farm&lt;/a&gt;. Their main business is farming, but they also offer accommodations as a side job. The farm had an excellent all-you-can-eat buffet, with German-style food and unlimited drinks.&lt;/p&gt;
&lt;h2 id="day-12-13-waterberg-plateau"&gt;Day 12-13: Waterberg Plateau&lt;/h2&gt;
&lt;p&gt;We’ve reached the final major section of our Namibia trip: the Waterberg Plateau, a landscape marked by table mountains. These are distinctive, flat, elevated landforms, nearly level at the top. The plateau is home to many plant species, abundant birdlife, and another Big Five animal, the buffalo.&lt;/p&gt;


&lt;figure&gt;
 &lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width:100%" src="https://monkemanx.github.io/attachments/namibia/IMG_20250305_094008.jpg"&gt;
&lt;/figure&gt;


&lt;p&gt;Before we arrived at the plateau, we made one final stop at the world’s largest meteorite: &lt;a href="https://en.wikipedia.org/wiki/Hoba_meteorite"&gt;Hoba&lt;/a&gt;. To get close to the meteorite, you need to pay a fee of 15€, which honestly feels a bit overpriced, given that the whole visit lasts about five minutes. You simply look at the meteorite, take a few photos, and that&amp;rsquo;s it. There is always someone there making sure no one damages it. Two interesting things to note: first, one can see parts of the meteorite that have been damaged because people used to break off pieces as amulets. Second, if you stand on top of the meteorite in the middle and speak, it echoes, as the meteorite is almost entirely made of metal. It’s pretty wild that they let you stand on top of it in the first place.&lt;/p&gt;


&lt;figure&gt;
 &lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width:100%" src="https://monkemanx.github.io/attachments/namibia/IMG_20250304_095218339.jpg"&gt;
&lt;/figure&gt;


&lt;p&gt;After that brief visit, we continued to our next stop: the Waterberg campsite. The campsite offers several hiking routes. Since it was already afternoon, we opted for the shortest one—the History Path, which is 2.2km long. This path features information about the 1904 Waterberg battle between German colonial forces and the Herero people, as well as the subsequent events. There are more hiking routes, but none lead up to the plateau. To hike up to the plateau, you need to book a guided tour (400 Namibian dollars), which has to be reserved at least one day in advance, so we missed out on that.&lt;/p&gt;
&lt;p&gt;What’s special about Waterberg Plateau is that it stays green year-round, unlike most other places in Namibia. However, since we were in Namibia during the rainy season (the off-season), and we had already seen Etosha in its lush green state, it wasn’t as striking as we expected.&lt;/p&gt;
&lt;p&gt;In the evening, just as it was getting dark, a monkey appeared at our campsite, probably drawn by the smell of food. Later, after we were in our tents, a honey badger came by and knocked over our trash can. Waterberg has many monkeys, so it&amp;rsquo;s advised not to leave anything unattended that they might steal, and always keep the car and tent closed.&lt;/p&gt;
&lt;p&gt;One thing I really appreciated about the campsite was that each lot had its own toilet and shower. Compared to the campsite in Etosha, these facilities were incredibly clean—pure bliss!&lt;/p&gt;
&lt;p&gt;The next day, since we had missed the guided tour to the top of the plateau, we decided to explore the remaining hiking routes. We hiked the Dassie Trail (3.2km), Foundation Trail (1.0km), Porcupine Highway (1.0km), and Anderson Trail (2.8km). There was another trail, the Giraffe Crossing (5.8km), but it was closed due to the rain in the previous days.&lt;/p&gt;


&lt;figure&gt;
 &lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width:100%" src="https://monkemanx.github.io/attachments/namibia/IMG_20250305_093633.jpg"&gt;
&lt;/figure&gt;


&lt;p&gt;Originally, we had planned to eat at a lodge for dinner, but when we arrived, we were told we needed to register a day in advance. Unfortunately, we had already thrown away most of our food in preparation for our departure the next day. So, we went to the reception, where they sold us some frozen meat, which we fried in a pot of oil over our camping gas cooker.&lt;/p&gt;
&lt;h2 id="day-14-on-our-way-back"&gt;Day 14: On Our Way Back&lt;/h2&gt;
&lt;p&gt;This was the last day of our trip. We made sure the car was clean, packed up all our belongings, and drove back to Windhoek. Before heading there, we made a detour to Okahandja to visit the famous wood market. It&amp;rsquo;s filled with local stands selling all kinds of wooden crafts, and we picked up some carved animals that we had seen in Etosha as souvenirs.&lt;/p&gt;
&lt;p&gt;However, I will say the vibe at the market was a bit strange. As soon as we entered, we were swarmed by around 10 different vendors, all trying to sell us something. We picked the first stand and went there, there aren’t any fixed prices, and instead, everything is negotiable. The vendors will try to take advantage of you, and bargaining is a must. After picking out four wood pieces, the seller took us to a corner of the shop and wrote the price in the sand, probably so that the other shopkeepers couldn’t hear and undercut him. He started with a price of 4500 Namibian dollars (about 220€), and we countered with 450 Namibian dollars. In the end, we showed him that we only had 700 Namibian dollars on us, and he reluctantly accepted, though he took the 5€ piece we had as well.&lt;/p&gt;
&lt;p&gt;If you decide to visit, I&amp;rsquo;d recommend being cautious: don’t take too much money with you and try to bring another person for safety.&lt;/p&gt;
&lt;p&gt;On the way into Windhoek, we couldn’t help but notice the big billboards with humorous traffic safety tips, like &amp;ldquo;Do not speed&amp;rdquo; or &amp;ldquo;Do not drink and drive.&amp;rdquo; I wish I could’ve gotten a picture of them.&lt;/p&gt;
&lt;p&gt;In Windhoek, we finally checked off something we had missed on the first day: visiting &lt;a href="https://joesbeerhouse.com/"&gt;Joe&amp;rsquo;s Beerhouse&lt;/a&gt; for lunch. It&amp;rsquo;s one of the most famous restaurants in the city, known for its distinct atmosphere, full of rustic old items hanging around. And I mean that in the best way possible. The food was fantastic. I had lasagna, but with a twist: it was made with game meat. I highly recommend visiting this place. When we went for lunch, it was fairly empty, but by evening, it became quite busy.&lt;/p&gt;


&lt;figure&gt;
 &lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width:100%" src="https://monkemanx.github.io/attachments/namibia/IMG_20250306_133849.jpg"&gt;
&lt;/figure&gt;


&lt;p&gt;The last thing we did in Windhoek was visit Christ Church, one of the city’s characteristic landmarks. Unfortunately, it was closed when we arrived, but it looked swell from the outside. It was amusing to see that the church&amp;rsquo;s bulletin board was very German, with something along the lines of, &amp;ldquo;We invite visitors to our weekly coffee party, where Pastor&amp;hellip; will say a few words,&amp;rdquo; a very German thing.&lt;/p&gt;
&lt;p&gt;With that done, we drove to the car rental business to return the car. They didn’t find any issues with it, and shortly after, they drove us to the airport. We were about to fly back on the last plane to Frankfurt, but funny enough, the flight also coincided with Namibia&amp;rsquo;s National Floorball Team heading to the 2025 Olympics. So we shared our flight with them.&lt;/p&gt;</description></item><item><title>More Optimization Problems</title><link>https://monkemanx.github.io/articles/optimization_problems/</link><pubDate>Tue, 18 Feb 2025 16:00:00 +0000</pubDate><author>monkeman@cock.li (MonkeMan)</author><guid>https://monkemanx.github.io/articles/optimization_problems/</guid><description>&lt;p&gt;The following is a sheet of optimization problems and their solutions. It is a mix of problems taken from old exams and practice sheets from the &lt;a href="https://www.kit.edu/english/"&gt;KIT&lt;/a&gt; &lt;em&gt;&amp;quot;&lt;a href="https://www.math.kit.edu/ianm3/lehre/optim2024s/de"&gt;Optimierungstheorie&lt;/a&gt;&amp;quot;&lt;/em&gt; lecture.&lt;/p&gt;
&lt;h2 id="problems-with-confirmed-solution"&gt;Problems with Confirmed Solution&lt;/h2&gt;
&lt;p&gt;This section contains only problems with official solutions.&lt;/p&gt;
&lt;h3 id="problem-1"&gt;Problem 1&lt;/h3&gt;
&lt;p&gt;Consider the following linear optimization problem:&lt;/p&gt;
&lt;p&gt;Minimize&lt;/p&gt;
\[
f(x) = 4x_1 + 12x_2 + 3x_3 - 6x_4, \quad x \in \mathbb{R}^4,
\]&lt;p&gt;subject to the constraints&lt;/p&gt;
\[
-x_1 + 2x_2 - 5x_3 - 2x_4 \geq 2,
\]\[
2x_1 + x_2 + 3x_3 - x_4 \geq 1,
\]\[
x_1, x_2, x_3, x_4 \geq 0.
\]&lt;p&gt;Formulate the dual problem and determine all solutions of the dual problem graphically.&lt;/p&gt;
&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution&lt;/summary&gt;
 
 &lt;p&gt;We write the problem first in its default form&lt;/p&gt;
$$
(P) \quad f(x) \ \ \text{unter} \ \ M 
$$&lt;p&gt;Where&lt;/p&gt;
$$
\begin{align}
&amp; M = \{ \\
&amp; -x_1 + 2x_2 - 5x_3 - 2x_4 - x_5 = 2, \\
&amp; 2x_1 + x_2 + 3x_3 - x_3 - x_6 = 1 \\
&amp; \}
\end{align}
$$&lt;p&gt;The dual problem is then&lt;/p&gt;
$$
\begin{align}
(D) \quad 
\begin{pmatrix}
2 \\
1 
\end{pmatrix}
\begin{pmatrix}
y_1 &amp; y_2 
\end{pmatrix}
\ \ \text{unter} \ \
\begin{pmatrix}
-1 &amp; 2 \\
2 &amp; 1\\
-5 &amp; 3\\
-2 &amp; -1\\
-1 &amp; 0 \\
0 &amp; -1
\end{pmatrix}
\begin{pmatrix}
y_1 &amp; y_2 
\end{pmatrix}
\leq 
\begin{pmatrix}
4 \\
12 \\
3 \\
-6 \\
0 \\
0
\end{pmatrix}
\end{align}
$$&lt;p&gt;We draw the condition on paper&lt;/p&gt;
&lt;figure&gt;
 &lt;img style="display: block; margin-left: auto; margin-right: auto; width:60%" src="https://monkemanx.github.io/attachments/WS17_task1.jpg"&gt;
 &lt;figcaption&gt;
 I have drawn this a bit dirty and hastily, thus the solution looks a bit weird.
 &lt;/figcaption&gt;
&lt;/figure&gt;
&lt;p&gt;The solution is the line between (4,4) and (6, 0) with the maxiumum value of 12.&lt;/p&gt;

 
&lt;/details&gt;


&lt;h3 id="problem-2"&gt;Problem 2&lt;/h3&gt;
&lt;p&gt;Determine for \(\beta \geq 2\), and the following sytem the possible solutions&lt;/p&gt;
$$
\begin{align}
x_1 + x_2 - 2x_3 &amp;= 1, \\
2x_1 + 3x_2 - 5x_3 &amp;= \beta, \\
2x_2 - 5x_3 \leq 4
\end{align}
$$&lt;p&gt;For every \(\beta\) name its solution.&lt;/p&gt;
&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution&lt;/summary&gt;
 
 &lt;p&gt;The system has a solution if and only if Phase 1 of the Simplex algorithm provides a solution. To achieve this, we introduce a variable \( x_5 \) for the third condition in order to bring the problem into normal form.&lt;/p&gt;
&lt;p&gt;Then, we write our problem as a tableau&lt;/p&gt;
$$
\begin{array}{cccccc|c}
x_1 &amp; x_2 &amp; x_3 &amp; x_4 &amp; x_5 &amp; x_6 &amp; b \\
\hline
-3 &amp; -4 &amp; 7 &amp; 0 &amp; 0 &amp; 0 &amp; -1 - \beta \\
\hline
\fbox{1} &amp; 1 &amp; -2 &amp; 1 &amp; 0 &amp; 0 &amp; 1 \\
2 &amp; 3 &amp; -5 &amp; 0 &amp; 1 &amp; 0 &amp; \beta \\
0 &amp; 2 &amp; -5 &amp; 0 &amp; 0 &amp; 1 &amp; 4
\end{array}
$$&lt;p&gt;The pivot element is in the first row and first column since it has the smallest pivot.&lt;/p&gt;
$$
\begin{array}{cccccc|c}
x_1 &amp; x_2 &amp; x_3 &amp; x_4 &amp; x_5 &amp; x_6 &amp; b \\
\hline
0 &amp; -1 &amp; 1 &amp; 3 &amp; 0 &amp; 0 &amp; 2 - \beta \\
\hline
1 &amp; 1 &amp; -2 &amp; 1 &amp; 0 &amp; 0 &amp; 1 \\
0 &amp; 1 &amp; -1 &amp; -2 &amp; 1 &amp; 0 &amp; \beta - 2 \\
0 &amp; 2 &amp; -5 &amp; 0 &amp; 0 &amp; 1 &amp; 4
\end{array}
$$&lt;p&gt;We now look at the second column.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Case 1:&lt;/strong&gt; \( \beta \geq 3 \) Then, the pivot is in the first row.&lt;/p&gt;
$$
\begin{array}{cccccc|c}
x_1 &amp; x_2 &amp; x_3 &amp; x_4 &amp; x_5 &amp; x_6 &amp; b \\
\hline
0 &amp; -1 &amp; 1 &amp; 3 &amp; 0 &amp; 0 &amp; 2 - \beta \\
\hline
1 &amp; \fbox{1} &amp; -2 &amp; 1 &amp; 0 &amp; 0 &amp; 1 \\
0 &amp; 1 &amp; -1 &amp; -2 &amp; 1 &amp; 0 &amp; \beta - 2 \\
0 &amp; 2 &amp; -5 &amp; 0 &amp; 0 &amp; 1 &amp; 4
\end{array}
$$&lt;p&gt;Thus we get&lt;/p&gt;
$$
\begin{array}{cccccc|c}
x_1 &amp; x_2 &amp; x_3 &amp; x_4 &amp; x_5 &amp; x_6 &amp; b \\
\hline
1 &amp; 0 &amp; -1 &amp; 3 &amp; 0 &amp; 0 &amp; 3 - \beta \\
\hline
1 &amp; 1 &amp; -2 &amp; 1 &amp; 0 &amp; 0 &amp; 1 \\
-1 &amp; 0 &amp; \fbox{1} &amp; -3 &amp; 1 &amp; 0 &amp; \beta - 3 \\
-2 &amp; 0 &amp; -1 &amp; -2 &amp; 0 &amp; 1 &amp; 2
\end{array}
$$&lt;p&gt;And hence&lt;/p&gt;
$$
\begin{array}{cccccc|c}
x_1 &amp; x_2 &amp; x_3 &amp; x_4 &amp; x_5 &amp; x_6 &amp; b \\
\hline
0 &amp; 0 &amp; 0 &amp; 1 &amp; 1 &amp; 0 &amp; 0 \\
\hline
-1 &amp; 1 &amp; 0 &amp; -5 &amp; 2 &amp; 0 &amp; 2\beta-5 \\
-1 &amp; 0 &amp; 1 &amp; -3 &amp; 1 &amp; 0 &amp; \beta - 3 \\
-3 &amp; 0 &amp; 0 &amp; -5 &amp; 1 &amp; 1 &amp; \beta - 1
\end{array}
$$&lt;p&gt;Thus, we are done and have found a solution with&lt;/p&gt;
\[
x^* = (0, 2\beta -5, \beta -3, 0).
\]&lt;p&gt;&lt;strong&gt;Case 2:&lt;/strong&gt; \( 2 \leq \beta \leq 3 \) Then, the pivot is in the second row.&lt;/p&gt;
$$
\begin{array}{cccccc|c}
x_1 &amp; x_2 &amp; x_3 &amp; x_4 &amp; x_5 &amp; x_6 &amp; b \\
\hline
0 &amp; -1 &amp; 1 &amp; 3 &amp; 0 &amp; 0 &amp; 2 - \beta \\
\hline
1 &amp; 1 &amp; -2 &amp; 1 &amp; 0 &amp; 0 &amp; 1 \\
0 &amp; \fbox{1} &amp; -1 &amp; -2 &amp; 1 &amp; 0 &amp; \beta - 2 \\
0 &amp; 2 &amp; -5 &amp; 0 &amp; 0 &amp; 1 &amp; 4
\end{array}
$$&lt;p&gt;Hence&lt;/p&gt;
$$
\begin{array}{cccccc|c}
x_1 &amp; x_2 &amp; x_3 &amp; x_4 &amp; x_5 &amp; x_6 &amp; b \\
\hline
0 &amp; 0 &amp; 0 &amp; 1 &amp; 1 &amp; 0 &amp; 0 \\
\hline
1 &amp; 0 &amp; -1 &amp; 3 &amp; -1 &amp; 0 &amp; -\beta + 3 \\
0 &amp; \fbox{1} &amp; -1 &amp; -2 &amp; 1 &amp; 0 &amp; \beta - 2 \\
0 &amp; 0 &amp; -3 &amp; 4 &amp; -2 &amp; 1 &amp; -2\beta + 8
\end{array}
$$&lt;p&gt;And thus, we are done with the solution&lt;/p&gt;
\[
x^* = (-\beta + 3, \beta -2, 0).
\]
 
&lt;/details&gt;


&lt;h3 id="problem-3"&gt;Problem 3&lt;/h3&gt;
&lt;p&gt;Given the function&lt;/p&gt;
$$
f(x, y) = ax^2 + by^2 - 4xy - 2x + 4y
$$&lt;p&gt;where \(a,b \in \mathbb{R}\) are parameters.&lt;/p&gt;
&lt;p&gt;a) Determine all \(a,b\), so that f is convex.&lt;br&gt;
b) For which \(a,b\) is \((1, 1)\) a local minima of \(f\).&lt;/p&gt;
&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution&lt;/summary&gt;
 
 &lt;p&gt;&lt;strong&gt;a)&lt;/strong&gt;&lt;br&gt;
First, we determine the Hessian matrix of the function. The first derivative is&lt;/p&gt;
$$
\nabla f(x) = (2ax - 4y - 2, \ 2by - 4x + 4)
$$&lt;p&gt;Thus, the Hessian matrix is&lt;/p&gt;
$$
\nabla^2 f = H_f = 
\begin{pmatrix}
2a &amp; -4 \\
-4 &amp; 2b
\end{pmatrix}
$$&lt;p&gt;We determine whether the matrix is positive semidefinite and for which values by using the minors.&lt;/p&gt;
$$
det_1(H_f) = 2a
$$$$
det_2(H_f) = 4ab - 12
$$&lt;p&gt;That is, the matrix is semidefinite, and therefore the function \( f \) is convex, if and only if \( a \geq 0 \) and \( ab \geq 4 \).&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;b)&lt;/strong&gt;
For the minimum value, \(\nabla f = 0\) has to be true&lt;/p&gt;
$$
\begin{align}
2a - 6 =^! 0 \\
2b =^! 0
\end{align}
$$&lt;p&gt;It follows that \( b = 0 \) and \( a = 3 \). Due to the condition \( ab \geq 4 \), the problem is not convex in this case.&lt;/p&gt;
&lt;p&gt;For&lt;br&gt;
&lt;/p&gt;
\[
f(1, 1, 0, 3) = 3 \cdot 1^2 + 0 \cdot 1^2 - 4 - 2 + 4 = 3 - 2 = 1 &gt; f(1, 1, 0 , 0) = -4 -2 + 4 = -2,
\]&lt;p&gt;&lt;br&gt;
this means that \( (1,1) \) is not a local minimum.&lt;/p&gt;

 
&lt;/details&gt;


&lt;h3 id="problem-4"&gt;Problem 4&lt;/h3&gt;
&lt;p&gt;Let \(B\) be symmetric and positiv definit and \(A\) have full rank. Further, \(c\) is not in range of \(A^T\).&lt;/p&gt;
&lt;p&gt;Given the problem&lt;/p&gt;
$$
\min \ c^Tx \ \ \text{under} \ \ x^TBx \leq 1, \ Ax = 0
$$&lt;p&gt;a) Show that a minima \(x^*\) exists.&lt;br&gt;
b) Proof, that \(AB^{-1}A^T\) is regular.&lt;br&gt;
c) Show that \(\alpha\) exists with \(x^* = \alpha(Pc-B^{-1}c)\), where \(P = B^{-1}A^T(AB^{-1}A^T)^{-1}AB^{-1}\), is \(x^* = 0\)?&lt;br&gt;
d) Determine \(\alpha\) and \(x^*\).&lt;/p&gt;
&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution&lt;/summary&gt;
 
 &lt;p&gt;&lt;strong&gt;a)&lt;/strong&gt;&lt;br&gt;
The objective function is continuous. Furthermore, \( M \) is bounded because \( 0 &lt; x^T B x \leq 1 \), and it is closed, thus compact. Since the objective function is continuous and the constraint set is compact, there exists a local solution (LSG).&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;b)&lt;/strong&gt;&lt;br&gt;
Since \( A \) has full rank, both \( A \) and \( A^T \) are bijective. Assume \( A B^{-1} A^T x = 0 \).&lt;br&gt;
Let \( x A B^{-1} A^T x = (A^T x)^T B^{-1} (A^T x) = y^T B^{-1} y \). Then \( y^T B^{-1} y = 0 \) if and only if \( y = 0 \), because \( B^{-1} \) is positive definite.&lt;br&gt;
It follows that \( x = 0 \). Thus, \( A B^{-1} A^T \) is bijective and, therefore, regular.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;c)&lt;/strong&gt;&lt;br&gt;
The problem is convex because \( f(x) = c^T x \) and \( g(x) = x^T B x - 1 \) are convex, as \( B \) is symmetric and positive definite.&lt;/p&gt;
&lt;p&gt;The Slater condition holds because:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The rank of \( A \) is maximal.&lt;/li&gt;
&lt;li&gt;\( A x' = 0 \) and \( g(x') &lt; 0 \), with \( x' = 0 \).&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Thus, there is no duality gap, and a local solution (LSG) exists. We obtain this LSG using the Lagrange multiplier theorem, i.e.,&lt;/p&gt;
\[
L(x, u, v) = c^T x + u(x^T B x - 1) + v(Ax)
\]&lt;p&gt;For the LSG to hold, the following must be true:&lt;/p&gt;
\[
\begin{align}
\nabla L = c + 2u B x + A^T v = 0 \\
u g(x) = u(x^T B x - 1) = 0
\end{align}
\]&lt;p&gt;In particular, \( x^* \neq 0 \), because otherwise, \( u = 0 \) must hold due to the second condition, but then we would have \( c = 0 \) from the first condition, which is impossible according to the assumption, as it would then lie in the image of \( A^T \).&lt;/p&gt;
&lt;p&gt;Thus, it follows that \( x^* = - \frac{1}{2} u B^{-1} (c + A^T v) \). Substituting this into \( A x^* = 0 \), we obtain the desired form.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;d)&lt;/strong&gt;&lt;br&gt;
Solving for \( \alpha \) gives the solution.&lt;/p&gt;

 
&lt;/details&gt;


&lt;h3 id="problem-5"&gt;Problem 5&lt;/h3&gt;
&lt;p&gt;Given the function&lt;/p&gt;
$$
f(x) = x_1 + 2x_2 + 4x_3 
$$&lt;p&gt;and the set&lt;/p&gt;
$$
M = \{x_1 x_2 x_3 = 1, \ x_1, x_2, x_3 &gt; 0\}
$$&lt;p&gt;a) Is M closed? Is M restricted?&lt;br&gt;
b) Exist a global minima or maxima of f on M?&lt;br&gt;
c) Determine all local and global minima and maxima of f on M.&lt;/p&gt;
&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution&lt;/summary&gt;
 
 &lt;p&gt;&lt;strong&gt;a)&lt;/strong&gt;&lt;br&gt;
Let \((a_1), (a_2), (a_3)\) be any sequence in \(M\). Then, it holds that \(a_1 a_2 a_3 \to a^1 a^2 a^3 = 1\), and thus \(M\) is closed.&lt;br&gt;
\(M\) is not bounded because \((t, 1/t, 0) \to (\infty, 0, 0)\).&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;b)&lt;/strong&gt;&lt;br&gt;
There is no maximum point because of the sequence \(a = (t, 1/t, 0) \in M\) and \(f(a) \to \infty\).&lt;br&gt;
\(M\) is bounded from below because \(x_1, x_2, x_3 &gt; 0\), and we can restrict ourselves to the set \(M = \{ f(x) &lt; f(1, 1, 1) \}\). This set is closed and bounded, hence compact. Since \(f(x)\) is continuous, there exists a minimum point.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;c)&lt;/strong&gt;&lt;br&gt;
The problem is differentiable because \(f(x)\) and \(g(x) = x_1 x_2 x_3 - 1\) are differentiable.&lt;/p&gt;
&lt;p&gt;Let’s examine CQ1:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;\(\text{Rank}(h) = n\), which is satisfied since we do not have an \(h\) function.&lt;/li&gt;
&lt;li&gt;\(g(x) + u g'(x) &lt; 0\), which is satisfied for \(x = 0\).&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This means we can apply the Lagrange Multiplier Theorem. We first form the Lagrangian function:&lt;/p&gt;
\[
L(x, u, v) = x_1 + 2x_2 + 4x_3 + u(x_1 x_2 x_3 - 1)
\]&lt;p&gt;The LSG (local solution) is a KKT point, for which the following conditions hold:&lt;/p&gt;
\[
\begin{align}
0 &amp;= 1 + u x_2 x_3 \\
0 &amp;= 2 + u x_1 x_3 \\
0 &amp;= 4 + u x_1 x_2
\end{align}
\]&lt;p&gt;Multiply the first equation by \(x_1\), the second by \(x_2\), and the third by \(x_3\), then we obtain \(x_1 x_2 x_3 = 1\).&lt;/p&gt;
\[
\begin{align}
x_1 + u &amp;= 0 \\
2 x_2 + u &amp;= 0 \\
4 x_3 + u &amp;= 0
\end{align}
\]&lt;p&gt;Thus, \(x^* = -u(1, 1/2, 1/4)\). The constraint \(x_1 x_2 x_3 = 1\) gives us \(u = -2\), and therefore \(f(x^*) = 6\).&lt;/p&gt;

 
&lt;/details&gt;


&lt;h3 id="problem-6"&gt;Problem 6&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;Prove or disprove the following statement:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Every feasible optimization problem of the form&lt;/p&gt;
\[
\min f(x) \quad \text{subject to} \quad M = \{x \in X: g(x) \leq 0, h(x) = 0\}
\]&lt;p&gt;with \( X \subset \mathbb{R}^n \), \( f: X \to \mathbb{R} \), \( g: X \to \mathbb{R}^l \), and \( h: X \to \mathbb{R}^m \) has a solution, provided that&lt;/p&gt;
\[
\inf\{f(x): x \in M\} &gt; -\infty.
\]&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution&lt;/summary&gt;
 
 &lt;p&gt;The given statement is incorrect. Consider the following counterexample:&lt;/p&gt;
\[
f(x) = |x|, \quad g(x) = x, \quad h(x) = x - 1
\]&lt;p&gt;Then we have \( f(x) \geq 0 \). Furthermore, from \( h(x) = x - 1 = 0 \), we get \( x = 1 \), but the constraint \( g(x) \leq 0 \) requires \( x \leq 0 \), leading to a contradiction.&lt;/p&gt;
&lt;p&gt;Another counterexample is:&lt;/p&gt;
\[
f(x) = e^x, \quad g(x) = 0, \quad h(x) = 0
\]&lt;p&gt;Here, \( f(x) \geq 0 \) and has no solution because as \( x \to -\infty \), \( f(x) \to 0 \). This means we can always find a better \( x \), preventing the existence of an optimal solution.&lt;/p&gt;

 
&lt;/details&gt;


&lt;h3 id="problem-7"&gt;Problem 7&lt;/h3&gt;
&lt;p&gt;A tire manufacturer produces two different types of tires made from different rubber compounds. For each tire set of type \( R_1 \) and \( R_2 \), different amounts of raw materials \( A \) and \( B \) are used, with a certain maximum capacity available per month. The sale of each tire set generates different profits, which, along with the other data, are listed in the following table:&lt;/p&gt;
\[
\begin{array}{c|ccc}
\hline
 &amp; R_1 &amp; R_2 &amp; Capacity \\
\hline
\text{Raw material A (units per set)} &amp; 1 &amp; 2 &amp; 32 \\
\text{Raw material B (units per set)} &amp; 4 &amp; 2 &amp; 60 \\
\text{Profit (euros per set)} &amp; 45 &amp; 30 &amp; \\
\hline
\end{array}
\]&lt;p&gt;The tire manufacturer wants to maximize its profit. Formulate this linear optimization problem in standard form.&lt;/p&gt;
&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution&lt;/summary&gt;
 
 &lt;p&gt;The optimization problem is formulated as:&lt;/p&gt;
\[
(P) \quad \max \ f(x) = 45 R_1 + 30 R_2
\]&lt;p&gt;subject to:&lt;/p&gt;
\[
R_1 + 2 R_2 \leq 32, \quad 4 R_1 + 2 R_2 \leq 60, \quad R_1, R_2 \geq 0.
\]&lt;p&gt;In standard form, we convert the inequalities into equalities by introducing slack variables \( c_1 \) and \( c_2 \):&lt;/p&gt;
\[
(P) \quad \min \ f(x) = -45 R_1 - 30 R_2
\]&lt;p&gt;subject to:&lt;/p&gt;
\[
R_1 + 2 R_2 + c_1 = 32,
\]\[
4 R_1 + 2 R_2 + c_2 = 60,
\]\[
R_1, R_2, c_1, c_2 \geq 0.
\]
 
&lt;/details&gt;


&lt;h3 id="problem-8"&gt;Problem 8&lt;/h3&gt;
&lt;p&gt;Solve the following linear optimization problem using the &lt;strong&gt;Simplex method&lt;/strong&gt; and &lt;strong&gt;Bland&amp;rsquo;s rule&lt;/strong&gt;:&lt;/p&gt;
\[
\max \quad x_1 + x_2
\]&lt;p&gt;subject to:&lt;/p&gt;
\[
M = \{(x_1, x_2) \in \mathbb{R}^2 \mid x_1 + 2x_2 \geq 2, \quad 4x_1 + 4x_2 \leq 1\}.
\]&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution&lt;/summary&gt;
 
 &lt;p&gt;We first convert the problem into standard form by introducing unrestricted-sign variables:&lt;/p&gt;
\[
x_1 := x_1^+ - x_1^-, \quad x_2 := x_2^+ - x_2^-
\]&lt;p&gt;Additionally, we introduce slack variables \( x_3 \) and \( x_4 \). This gives us the following problem:&lt;/p&gt;
\[
(P) \quad \min f(x) = -x_1^+ + x_1^- - x_2^+ + x_2^- 
\]&lt;p&gt;subject to:&lt;/p&gt;
\[
x_1^+ - x_1^- + 2x_2^+ - 2x_2^- - x_3 = 2,
\]\[
4x_1^+ - 4x_1^- + 4x_2^+ - 4x_2^- + x_4 = 1.
\]&lt;p&gt;Now, we construct the &lt;strong&gt;Simplex tableau&lt;/strong&gt;:&lt;/p&gt;
\[
T_1: \quad
\begin{array}{cccccc|c}
-1 &amp; 1 &amp; -1 &amp; 1 &amp; 0 &amp; 0 &amp; \gamma \\
\hline
1 &amp; -1 &amp; 2 &amp; -2 &amp; -1 &amp; 0 &amp; 2 \\
4 &amp; -4 &amp; 4 &amp; -4 &amp; 0 &amp; 1 &amp; 1
\end{array}
\]&lt;p&gt;Since the second-to-last column does not contain a unit vector, we begin &lt;strong&gt;Phase 1 of the Simplex algorithm&lt;/strong&gt;, applied to this specific column.&lt;/p&gt;
$$
T_2: \ \
\begin{array}{ccccccc|c}
-1 &amp; 1 &amp; -2 &amp; 2 &amp; 1 &amp; 0 &amp; 0 &amp; -2 \\
\hline
-1 &amp; 1 &amp; -1 &amp; 1 &amp; 0 &amp; 0 &amp; 0 &amp; \gamma \\
\hline
1 &amp; -1 &amp; 2 &amp; -2 &amp; -1 &amp; 0 &amp; 1 &amp; 2 \\
\fbox{4} &amp; -4 &amp; 4 &amp; -4 &amp; 0 &amp; 1 &amp; 0 &amp; 1
\end{array}
$$$$
T_3: \ \
\begin{array}{ccccccc|c}
0 &amp; 0 &amp; -1 &amp; 1 &amp; 1 &amp; 1/4 &amp; 0 &amp; -7/4 \\
\hline
0 &amp; 0 &amp; 0 &amp; 0 &amp; 0 &amp; 1/4 &amp; 0 &amp; \gamma + 1/4 \\
\hline
0 &amp; 0 &amp; 1 &amp; -1 &amp; -1 &amp; -1/4 &amp; 1 &amp; 7/4 \\
1 &amp; -1 &amp; \fbox{1} &amp; -1 &amp; 0 &amp; 1/4 &amp; 0 &amp; 1/4
\end{array}
$$$$
T_4: \ \
\begin{array}{ccccccc|c}
1 &amp; -1 &amp; 0 &amp; 0 &amp; 1 &amp; 2/4 &amp; 0 &amp; -6/4 \\
\hline
0 &amp; 0 &amp; 0 &amp; 0 &amp; 0 &amp; 1/4 &amp; 0 &amp; \gamma + 1/4 \\
\hline
-1 &amp; \fbox{1} &amp; 0 &amp; 0 &amp; -1 &amp; -2/4 &amp; 1 &amp; 6/4 \\
1 &amp; -1 &amp; 1 &amp; -1 &amp; 0 &amp; 1/4 &amp; 0 &amp; 1/4
\end{array}
$$$$
T_5: \ \
\begin{array}{ccccccc|c}
0 &amp; 0 &amp; 0 &amp; 0 &amp; 0 &amp; 0 &amp; 1 &amp; 0 \\
\hline
0 &amp; 0 &amp; 0 &amp; 0 &amp; 0 &amp; 1/4 &amp; 0 &amp; \gamma + 1/4 \\
\hline
-1 &amp; 1 &amp; 0 &amp; 0 &amp; -1 &amp; -2/4 &amp; 1 &amp; 6/4 \\
0 &amp; 0 &amp; 1 &amp; -1 &amp; -1 &amp; -1/4 &amp; 1 &amp; 7/4
\end{array}
$$&lt;p&gt;Phase 1 of the Simplex algorithm is now complete, and we can proceed to Phase 2. However, as we can see, Phase 2 is already finished since all entries in the corresponding row are non-negative.&lt;/p&gt;
&lt;p&gt;Thus, our solution is:&lt;/p&gt;
\[
x_1^+ = 0, \quad x_1^- = \frac{3}{2}, \quad x_2^+ = \frac{7}{4}, \quad x_2^- = 0, \quad x_3 = 0, \quad x_4 = 0.
\]&lt;p&gt;This means our final solution is:&lt;/p&gt;
\[
x^* = \left(-\frac{3}{2}, \frac{7}{4} \right)
\]&lt;p&gt;with an optimal function value:&lt;/p&gt;
\[
f(x^*) = 0.
\]
 
&lt;/details&gt;


&lt;h3 id="problem-9"&gt;Problem 9&lt;/h3&gt;
&lt;p&gt;Consider the following optimization problem:&lt;/p&gt;
\[
(P) \quad \min \left( x_1 + e^{x_2} \right)
\]&lt;p&gt;subject to:&lt;/p&gt;
\[
3x_1 - 2e^{x_2} \geq 10 \quad \text{and} \quad x_2 \geq 0.
\]&lt;p&gt;&lt;strong&gt;(a)&lt;/strong&gt; Prove that this is a convex optimization problem.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;(b)&lt;/strong&gt; Show that the Slater condition is satisfied for (P).&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;(c)&lt;/strong&gt; Formulate the dual problem (D) of (P). Explicitly give the function in (D) that appears as:&lt;/p&gt;
\[
F(u, v) = \inf_{x \in \mathbb{R}^2} L(x, u, v).
\]&lt;p&gt;&lt;strong&gt;(d)&lt;/strong&gt; Solve (D).&lt;/p&gt;
&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution a)&lt;/summary&gt;
 
 &lt;p&gt;First, let&amp;rsquo;s consider the objective function \( f \) and form its Hessian matrix \( H_f \):&lt;/p&gt;
\[
\nabla f(x) = (1, e^{x_2}), \quad \nabla^2 f = H_f = 
\begin{pmatrix}
0 &amp; 0 \\
0 &amp; e^{x_2}
\end{pmatrix}
\]&lt;p&gt;Next, we look at the minors to determine definiteness:&lt;/p&gt;
\[
\text{det}_1(H_f) = 0, \quad \text{det}_2(H_f) = 0
\]&lt;p&gt;Since all minors are 0, our function is semi-positive definite, and thus convex.&lt;/p&gt;
&lt;p&gt;Next, we examine the constraints \( g_1(x) = -3 x_1 + 2 e^{x_2} + 10 \) and \( g_2(x) = -x_2 \). We compute their derivatives:&lt;/p&gt;
\[
\nabla g_1 = (-3, 2e^{x_2}), \quad \nabla g_2 = (0, 0), 
\]\[
\nabla^2 g_1 = H_{g_1} = 
\begin{pmatrix}
0 &amp; 0 \\
0 &amp; 2e^{x_2}
\end{pmatrix}, \quad 
\nabla^2 g_2 = H_{g_2} = 
\begin{pmatrix}
0 &amp; 0 \\
0 &amp; 0
\end{pmatrix}
\]&lt;p&gt;Now, we check their minors:&lt;/p&gt;
\[
\text{det}_1(H_{g_1}) = 0, \quad \text{det}_2(H_{g_1}) = 0, \quad \text{det}_1(H_{g_2}) = 0, \quad \text{det}_2(H_{g_2}) = 0
\]&lt;p&gt;Since all minors are 0, the functions are semi-positive definite and thus convex.&lt;/p&gt;
&lt;p&gt;Since both the objective function and the constraints are convex, our problem is convex.&lt;/p&gt;

 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution b)&lt;/summary&gt;
 
 &lt;p&gt;The &lt;strong&gt;Slater condition&lt;/strong&gt; is satisfied because we don&amp;rsquo;t have a constraint of the form \( Ax = b \). Therefore, the first condition is fulfilled. Additionally, for the point \( (x_1, x_2) = (10, 1) \), we have:&lt;/p&gt;
\[
g_1(10, 1) = -3(10) + 2e^{1} + 10 &lt; 0, \quad g_2(10, 1) = -1 &lt; 0.
\]&lt;p&gt;Since both inequality constraints are strictly satisfied at \( (10, 1) \), the Slater condition is fulfilled.&lt;/p&gt;

 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution c)&lt;/summary&gt;
 
 &lt;p&gt;First, we set up the Lagrangian function:&lt;/p&gt;
\[
L(x, u, v) = x_1 + e^{x_2} + u_1 (-3x_1 + 2e^{x_2} + 10) - u_2 x_2
\]&lt;p&gt;Now, we seek \( F(u) \), which involves finding where \( L \) attains its infimum. To do this, we solve for the derivatives:&lt;/p&gt;
\[
(1) \quad 0 = \nabla_{x_1} L = 1 - 3 u_1 x_1
\]&lt;p&gt;
&lt;/p&gt;
\[
(2) \quad 0 = \nabla_{x_2} L = e^{x_2} + 2 u_1 e^{x_2} - u_2
\]&lt;p&gt;From (1), we get \( \frac{1}{3} u_1 = x_1 \). From (2), we get:&lt;/p&gt;
\[
u_2 = e^{x_2} + 2 u_1 e^{x_2}
\]&lt;p&gt;
&lt;/p&gt;
\[
\iff u_2 = e^{x_2} (1 + 2 u_1)
\]&lt;p&gt;
&lt;/p&gt;
\[
\iff \ln(u_2) = \ln(e^{x_2} (1 + 2 u_1))
\]&lt;p&gt;
&lt;/p&gt;
\[
\iff \ln(u_2) = \ln(e^{x_2}) + \ln(1 + 2 u_1)
\]&lt;p&gt;
&lt;/p&gt;
\[
\iff \ln(u_2) = x_2 + \ln(1 + 2 u_1)
\]&lt;p&gt;
&lt;/p&gt;
\[
\iff x_2 = \ln\left( \frac{u_2}{1 + 2 u_1} \right)
\]&lt;p&gt;Now, we substitute our result into the Lagrangian function:&lt;/p&gt;
\[
F(x, u) = \frac{1}{3} u_1 + e^{\ln\left( \frac{u_2}{1 + 2 u_1} \right)} + u_1 \left( -3 \cdot \frac{1}{3} u_1 + 2 e^{\ln\left( \frac{u_2}{1 + 2 u_1} \right)} + 10 \right) - u_2 \ln\left( u_2 (1 + 2 u_1) \right)
\]\[
= \frac{1}{3} u_1 + \frac{u_2}{1 + 2 u_1} + u_1 \left( -u_1 + 2 \cdot \frac{u_2}{1 + 2 u_1} + 10 \right) - u_2 \ln\left( \frac{u_2}{1 + 2 u_1} \right)
\]\[
= \frac{1}{3} u_1 + \frac{u_2}{1 + 2 u_1} - u_1^2 + 2 u_1 \frac{u_2}{1 + 2 u_1} + 10 u_1 - u_2 \ln\left( \frac{u_2}{1 + 2 u_1} \right)
\]\[
= \frac{1}{3} u_1 + u_2 - u_1^2 + 10 u_1 - u_2 \ln\left( \frac{u_2}{1 + 2 u_1} \right)
\]\[
= u_2 + \frac{1}{3} u_1 - u_1^2 - u_2 \ln\left( \frac{u_2}{1 + 2 u_1} \right) + 10 u_1
\]&lt;p&gt;Furthermore, we have the restriction that \( F(u) \) must be greater than \(-\infty\), meaning we need to check for which \( u_i \) this condition is satisfied.&lt;/p&gt;
&lt;p&gt;It must be that \( u_2 \geq 0 \), because otherwise, as \( u_2 \to -\infty \), we would also have \( F(u) \to -\infty \). Similarly, \( u_1 = \frac{1}{3} \) must hold. Thus, we obtain:&lt;/p&gt;
\[
F(u) = u_2 - u_2 \ln\left( \frac{u_2}{1 + 2/3} \right) + \frac{10}{3}
\]&lt;p&gt;Thus, the dual problem is:&lt;/p&gt;
\[
(D) \quad \max F(u) \quad \text{subject to} \quad u_2 \geq 0
\]
 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution d)&lt;/summary&gt;
 
 &lt;p&gt;Since the &lt;strong&gt;Slater condition&lt;/strong&gt; is satisfied, the &lt;strong&gt;strong duality theorem&lt;/strong&gt; holds, and therefore \( \max(F) = \min(f) \).&lt;/p&gt;
&lt;p&gt;Now, we examine the derivative of \( F(u) \):&lt;/p&gt;
\[
F'(u_2) = 1 - \ln\left( \frac{u_2}{1 + 2/3} \right) - u_2 \cdot \frac{1}{u_2 \ln\left( \frac{u_2}{1 + 2/3} \right)} = -\ln\left( \frac{3 u_2}{5} \right)
\]&lt;p&gt;Next, we solve:&lt;/p&gt;
\[
F'(u_2) = 0 \quad \iff \quad 1 = \frac{3 u_2}{5} \quad \iff \quad u_2 = \frac{5}{3}
\]&lt;p&gt;Thus, the maximum of \( F \) occurs at the point \( u_1 = \frac{1}{3}, u_2 = \frac{5}{3} \), with \( F(u_2) = 5 \).&lt;/p&gt;

 
&lt;/details&gt;


&lt;h3 id="problem-10"&gt;Problem 10&lt;/h3&gt;
&lt;p&gt;Look at the following optimization problem&lt;/p&gt;
$$
(P) \quad \min \ (x_{1}-1)^{2}-x_{2}^{2}+x_{3}^{2}-4x_{3}
$$&lt;p&gt;subject to&lt;/p&gt;
$$
x_{1}+x_{2}-x_{3}=0
$$$$
x_{2}+x_{3}^{2}=0
$$&lt;p&gt;&lt;strong&gt;(a)&lt;/strong&gt; Determine all KKT points of (P).&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;(b)&lt;/strong&gt; Using the necessary second-order optimality condition, show that the function f does not have a local minimum at the point (0,-1,-1).&lt;/p&gt;
&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution a)&lt;/summary&gt;
 
 &lt;p&gt;The &lt;strong&gt;CQ1 condition&lt;/strong&gt; is satisfied, because we don&amp;rsquo;t have \( Ax = b \), which satisfies the first condition. Additionally, with \( z = 0 \) and \( h'(x) z = 0 \), the second condition is fulfilled.&lt;/p&gt;
&lt;p&gt;Now, we formulate the Lagrangian function:&lt;/p&gt;
\[
L(x, v) = (x_1 - 1)^2 - x_2^2 + x_3^2 - 4x_3 + v_1 (x_1 + x_2 - x_3) + v_2 (x_2 + x_3^2)
\]&lt;p&gt;For the &lt;strong&gt;KKT points&lt;/strong&gt;, we have the following conditions:&lt;/p&gt;
\[
(1) \quad 0 = \nabla_{x_1} L = 2(x_1 - 1) + v_1
\]&lt;p&gt;
&lt;/p&gt;
\[
(2) \quad 0 = \nabla_{x_2} L = -2x_2 + v_1 + v_2
\]&lt;p&gt;
&lt;/p&gt;
\[
(3) \quad 0 = \nabla_{x_3} L = 2x_3 - 4 - v_1 + 2v_2x_3
\]&lt;p&gt;
&lt;/p&gt;
\[
(4) \quad 0 = h_1 = x_1 + x_2 - x_3
\]&lt;p&gt;
&lt;/p&gt;
\[
(5) \quad 0 = h_2 = x_2 + x_3^2
\]&lt;p&gt;From (1), we get:&lt;/p&gt;
\[
v_1 = -2(x_1 - 1)
\]&lt;p&gt;Next, from (2), by substitution, we get:&lt;/p&gt;
\[
v_2 = 2x_2 + 2(x_1 - 1)
\]&lt;p&gt;Substituting into (3), we get:&lt;/p&gt;
\[
0 = 2x_3 - 4 + 2(x_1 - 1) + 2x_3 (2x_2 + 2(x_1 - 1))
\]\[
\iff 2 = x_3 + (x_1 - 1) + x_3(2x_2 + 2x_1 - 2)
\]\[
\iff 3 = x_3 + x_1 + 2x_2 x_3 + 2x_1 x_3 - 2x_3
\]\[
\iff 3 = x_1 + 2x_2 x_3 + 2x_1 x_3 - x_3
\]&lt;p&gt;In the above equation, we can substitute (4) and (5):&lt;/p&gt;
\[
3 = (x_3 + x_3^2) + 2(-x_3^2) x_3 + 2(x_3 + x_3^2) x_3 - x_3
\]\[
\iff 3 = x_3 + x_3^2 - 2x_3^3 + 2x_3^2 + 2x_3^3 - x_3
\]\[
\iff 3 = 3x_3^2
\]&lt;p&gt;Thus, we find the solution \( x_3 \in \{1, -1\} \). With (5) and then (4), we obtain the KKT points \( (2, -1, 1, -2, 0) \) and \( (0, -1, -1, 2, -4) \).&lt;/p&gt;

 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution b)&lt;/summary&gt;
 
 &lt;p&gt;According to the necessary second-order optimization condition, \( f \) does not have a local minimum at a point if the second derivative at this point is not positive definite.&lt;/p&gt;
&lt;p&gt;The Hessian matrix is:&lt;/p&gt;
\[
\nabla^2 f = H_f = 
\begin{pmatrix}
2 &amp; 0 &amp; 0 \\
0 &amp; -2 &amp; 0 \\
0 &amp; 0 &amp; 2 + v_2
\end{pmatrix}
\]&lt;p&gt;Now, we examine the principal minors to check for definiteness:&lt;/p&gt;
\[
\text{det}_1(H_f) = 2 &gt; 0, \quad \text{det}_2(H_f) = 2 \cdot (-2) = -4 &lt; 0
\]&lt;p&gt;Since the second minor is negative, \( H_f \) is not positive definite, and thus the point is not a local minimum.&lt;/p&gt;

 
&lt;/details&gt;


&lt;h3 id="problem-11"&gt;Problem 11&lt;/h3&gt;
&lt;p&gt;Prove the following statement:&lt;/p&gt;
&lt;p&gt;If the minimum of the linear optimization problem&lt;/p&gt;
\[
\min \ f(x) \text{ on } \{x \in \mathbb{R}^{n}_{\geq 0} \mid Ax = b\}
\]&lt;p&gt;is attained at more than one vertex, then it is attained on the convex hull of these vertices.&lt;/p&gt;
&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution&lt;/summary&gt;
 
 &lt;p&gt;Let \( E \) be the set of vertices that are the minima, and let \( x_i \) represent these minima.&lt;/p&gt;
&lt;p&gt;The convex hull of this set is given by:&lt;/p&gt;
$$
\text{conv}(E) = \left\{ \sum \lambda_i x_i : x_i \in E, \lambda_i \geq 0, \sum \lambda_i = 1 \right\}
$$&lt;p&gt;Let \( x^* \in \text{conv}(E) \). Then:&lt;/p&gt;
$$
f(x^*) = f\left( \sum \lambda_i x_i \right) = \sum \lambda_i f(x_i) = f(x_1) \sum \lambda_i = f(x_1)
$$&lt;p&gt;Thus, \( x^* \) is a minimum of \( f \).&lt;/p&gt;

 
&lt;/details&gt;


&lt;h3 id="problem-12"&gt;Problem 12&lt;/h3&gt;
&lt;p&gt;Let \( A \in \mathbb{R}^{m \times n} \), \( b \in \mathbb{R}^m \). Prove the following Gale&amp;rsquo;s Alternative Theorem: Exactly one of the following two statements is true:&lt;/p&gt;
$$
\text{(I)} \quad Ax = b \text{ has a solution } x \in \mathbb{R}^n
$$&lt;p&gt;&lt;strong&gt;or&lt;/strong&gt;&lt;/p&gt;
$$
\text{(II)} \quad A^T y = 0, \quad y \geq 0, \quad b^T y &lt; 0 \text{ has a solution } y \in \mathbb{R}^m
$$&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution&lt;/summary&gt;
 
 &lt;p&gt;We first introduce the sign-restricted variables \(x^{+}, x^{-} \geq 0\) and write \(x = x^{+} - x^{-}\). By further introducing the slack variable \(z \in \mathbb{R}^{n_2}\), we find that the system \(Ax \leq b\) is equivalent to the linear system of equations:&lt;/p&gt;
$$
\begin{pmatrix}
 A &amp; -A &amp; I \\
\end{pmatrix}
\begin{pmatrix}
 x^{+} \\
 x^{-} \\
 z
\end{pmatrix}
= b \tag{5}
$$&lt;p&gt;Applying Farkas&amp;rsquo; Lemma to (5) now states that either (and exclusively) the system (5) or the system&lt;/p&gt;
$$
\begin{pmatrix}
 A^{T} \\
 -A^{T} \\
 I
\end{pmatrix}
y \leq 0 \text{ and } b^{T}y &gt; 0 \tag{6}
$$&lt;p&gt;has a solution. The system (6) is, in turn, equivalent to the system&lt;/p&gt;
$$
\begin{aligned}
A^{T}y &amp;= 0 \\
y &amp;\leq 0 \\
b^{T}y &amp;&gt; 0.
\end{aligned}
$$&lt;p&gt;With this the theorem has been shown.&lt;/p&gt;

 
&lt;/details&gt;


&lt;h3 id="problem-13"&gt;Problem 13&lt;/h3&gt;
&lt;p&gt;Consider the linear program in standard form with \(A \in \mathbb{R}^{K \times N}\), \(b \in \mathbb{R}^K\), and \(c \in \mathbb{R}^N\):&lt;/p&gt;
$$
(P) \quad \min c^T x \ \ \text{over}
$$&lt;p&gt;
&lt;/p&gt;
$$
M = \{x \in \mathbb{R}^N : Ax = b, x \ge 0\}
$$&lt;p&gt;&lt;strong&gt;(a)&lt;/strong&gt; Formulate the dual problem (D) to (P).&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;(b)&lt;/strong&gt; Formulate Farkas&amp;rsquo; Lemma for \(A \in \mathbb{R}^{K \times N}\) and \(b \in \mathbb{R}^K\).&lt;/p&gt;
&lt;p&gt;Given the optimization problem:&lt;/p&gt;
$$
(P) \quad \min \ x_1 + x_3 \ \ \text{subject to:}
$$&lt;p&gt;
&lt;/p&gt;
$$
x_1 \ge 1
$$&lt;p&gt;
&lt;/p&gt;
$$
x_2 \ge 0
$$&lt;p&gt;
&lt;/p&gt;
$$
x_1 - x_2 - x_3 = 1
$$&lt;p&gt;
&lt;/p&gt;
$$
x_1 + x_2 + x_3 = 1
$$&lt;p&gt;
&lt;/p&gt;
$$
x_1 + x_2 - x_3 = 2
$$&lt;p&gt;&lt;strong&gt;(c)&lt;/strong&gt; Convert the optimization problem (P) into standard form. Explicitly provide \(A\), \(b\), and \(c\).&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;(d)&lt;/strong&gt; Show that the dual problem to (P) is feasible.&lt;/p&gt;
&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution a)&lt;/summary&gt;
 
 &lt;p&gt;The dual problem to \((P)\) is given by&lt;/p&gt;
\[
(D) \quad \max \ b^T y \quad \text{subject to} \quad N = \{A^T y \leq c\}
\]
 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution b)&lt;/summary&gt;
 
 &lt;p&gt;Farkas&amp;rsquo; Lemma states that exactly one of the following statements is always true:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;\( Ax \leq b, \quad x \geq 0 \)&lt;/li&gt;
&lt;li&gt;\( A^T y \leq 0, \quad b^T y &gt; 0 \)&lt;/li&gt;
&lt;/ol&gt;
 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution c)&lt;/summary&gt;
 
 &lt;p&gt;To bring the problem into standard form, we introduce sign-restrictive variables \( x_3 = x_3^+ - x_3^- \) with \( x_3^+, x_3^- \geq 0 \).&lt;br&gt;
Additionally, we introduce a slack variable \( x_4 \).&lt;/p&gt;
&lt;p&gt;The problem then becomes:&lt;/p&gt;
\[
(P) \quad \min x_1 + x_3^+ - x_3^- \quad \text{subject to:}
\]\[
x_1 + x_2 + x_3^+ - x_3^- = 1
\]&lt;p&gt;
&lt;/p&gt;
\[
x_1 - x_2 - x_3^+ + x_3^- = 2
\]&lt;p&gt;
&lt;/p&gt;
\[
x_1 + x_2 - x_3^+ - x_3^- = 1
\]&lt;p&gt;
&lt;/p&gt;
\[
x_1 - x_4 = 1
\]\[
x_1, x_2, x_3^+, x_3^-, x_4 \geq 0
\]&lt;p&gt;Rewriting in matrix form:&lt;/p&gt;
\[
(P) \quad \min c^T x \quad \text{subject to } x \in M
\]&lt;p&gt;where&lt;/p&gt;
\[
M = \{x \in \mathbb{R}^5 : Ax = b, x \geq 0\}
\]&lt;p&gt;with&lt;/p&gt;
\[
c = (1, 0, 1, -1, 0)
\]\[
b = (1, 2, 1, 1)
\]\[
A =
\begin{pmatrix}
1 &amp; 1 &amp; 1 &amp; -1 &amp; 0 \\
1 &amp; -1 &amp; -1 &amp; 1 &amp; 0 \\
1 &amp; 1 &amp; -1 &amp; -1 &amp; 0 \\
1 &amp; 0 &amp; 0 &amp; 0 &amp; -1
\end{pmatrix}
\]
 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution d)&lt;/summary&gt;
 
 Choose the point \( x = (1, 1/2, -1/2, 0) \) (this point can be found using Gaussian elimination). Then, \( x \in M \), and thus the set is feasible.
 
&lt;/details&gt;


&lt;h3 id="problem-14"&gt;Problem 14&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;a)&lt;/strong&gt; State the Projection Theorem for Convex Sets.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;b)&lt;/strong&gt; Sketch the following sets in \( \mathbb{R}^2 \):&lt;/p&gt;
$$
K = \text{conv} \left\{ \begin{pmatrix} -1 \\ 2 \end{pmatrix}, \begin{pmatrix} 1 \\ -1 \end{pmatrix} \right\}, \quad 
V = \text{cone} \left( \begin{pmatrix} 0 \\ 2 \end{pmatrix}, \begin{pmatrix} 2 \\ 2 \end{pmatrix} \right) 
$$&lt;p&gt;&lt;strong&gt;c)&lt;/strong&gt; Formulate the Nash Equilibrium for a Two-Person Matrix Game. Define the strategy sets for player \( P_1 \) and player \( P_2 \), as well as the expected average payoff for a payoff matrix \( A \in \mathbb{R}^{K \times N} \). When is the matrix game considered fair?&lt;/p&gt;
&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution a)&lt;/summary&gt;
 
 &lt;p&gt;&lt;strong&gt;Projection Theorem&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Let \(\emptyset \neq M \subset \mathbb{R}^n\) be a closed and convex set. For any \(x \in \mathbb{R}^n\), there exists a unique \(x^* \in M\) such that&lt;/p&gt;
\[
\|x - x^*\| \leq \|x - z\| \quad \forall z \in M
\]\[
(x - x^*)^T (z - x^*) \leq 0 \quad \forall z \in M.
\]&lt;p&gt;This means that \(x^*\) is the closest point in \(M\) to \(x\), and the second condition ensures that the vector \(x - x^*\) is orthogonal to the set \(M\) in a generalized sense.&lt;/p&gt;

 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution b)&lt;/summary&gt;
 
 &lt;figure&gt;
 &lt;img style="display: block; margin-left: auto; margin-right: auto; width:100%" src="https://monkemanx.github.io/attachments/ws_21_task_2_b.jpg"&gt;
&lt;/figure&gt;

 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution c)&lt;/summary&gt;
 
 &lt;p&gt;The strategy sets for players \( P_1 \) and \( P_2 \) in a two-player matrix game are given as:&lt;/p&gt;
\[
M_1 = \left\{ x \in \mathbb{R}^n : e^T x = 1, x \geq 0 \right\}
\]&lt;p&gt;and&lt;/p&gt;
\[
M_2 = \left\{ y \in \mathbb{R}^n : e^T y = 1, y \geq 0 \right\}
\]&lt;p&gt;The expected payoff for the matrix game with payoff matrix \( A \) is given by:&lt;/p&gt;
\[
y^T A x
\]&lt;p&gt;A matrix game with players \( P_1 \) and \( P_2 \) is in Nash equilibrium if and only if the following condition holds:&lt;/p&gt;
\[
\max_{x \in M_1} \min_{y \in M_2} y^T A x = \min_{y \in M_2} \max_{x \in M_1} y^T A x
\]&lt;p&gt;A matrix game is &lt;strong&gt;fair&lt;/strong&gt; if the expected payoff is 0:&lt;/p&gt;
\[
y^T A x = 0
\]&lt;p&gt;This means that, on average, neither player has an advantage.&lt;/p&gt;

 
&lt;/details&gt;


&lt;h3 id="problem-15"&gt;Problem 15&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;a)&lt;/strong&gt; Sketch the polar cone to the set of all \( x \in \mathbb{R}^2 \) with the following conditions:&lt;/p&gt;
\[
2x_2 \le 2, \quad 2x_1 - x_2 \le 0, \quad x_2 \ge 0, \quad 2x_1 \ge x_2
\]&lt;p&gt;and the set itself.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;b)&lt;/strong&gt; Show that \( (-M)^\circ = -(M^\circ) \).&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;c)&lt;/strong&gt; Let \( M_1 \subset M_2 \). Show that \( M_2^\circ \subset M_1^\circ \).&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;d)&lt;/strong&gt; Show that the polar cone is a convex set.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;e)&lt;/strong&gt; Let \( C \) be a cone. Show that for the convex projection \( P_C(x) = 0 \), this holds if and only if \( x \in C^\circ \).&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;f)&lt;/strong&gt; Let \( V \subset \mathbb{R}^N \) be a linear subspace. Show that the corresponding polar cone to \( V \) is given by:&lt;/p&gt;
\[
V^\circ = V^\perp = \{x \in \mathbb{R}^N : v^T x = 0 \text{ for all } v \in V\}
\]&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution a)&lt;/summary&gt;
 
 &lt;figure&gt;
 &lt;img style="display: block; margin-left: auto; margin-right: auto; width:100%" src="https://monkemanx.github.io/attachments/ws_21_task_3_a.jpg"&gt;
&lt;/figure&gt;
&lt;p&gt;On the left is the polar cone and on the right the original set.&lt;/p&gt;
 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution b)&lt;/summary&gt;
 
 $$
\begin{align*}
(-M)^\circ &amp;= \{ x \in \mathbb{R}^n : y^T x \leq 0, \forall y \in (-M) \} \\
&amp;= \{ x \in \mathbb{R}^n : -y^T x \leq 0, \forall y \in M \} \\
&amp;= -\{ x \in \mathbb{R}^n : y^T x \leq 0, \forall y \in M \} \\
&amp;= -(M)^\circ
\end{align*}
$$
 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution c)&lt;/summary&gt;
 
 Let \( M_1 \subset M_2 \). For \( x_2 \in M_2^\circ \), it holds that \( y_2^T x_2 \leq 0 \) for all \( y_2 \in M_2 \). In particular, this also holds for \( y_1 \in M_1 \subset M_2 \). Therefore, \( x_2 \in M_1^\circ \) and \( M_2^\circ \subset M_1^\circ \).
 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution d)&lt;/summary&gt;
 
 &lt;p&gt;Let \( \lambda \in (0,1) \) and \( x_1, x_2 \in M^\circ \) arbitrarily fixed. Then it holds that&lt;/p&gt;
\[
y^T (\lambda x_1 + (1 - \lambda) x_2) = \lambda y^T x_1 + (1 - \lambda) y^T x_2 \leq 0
\]&lt;p&gt;Thus, \( M^\circ \) is convex.&lt;/p&gt;

 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution e)&lt;/summary&gt;
 
 &lt;p&gt;Since \( 0 \in C \) and the convex projection is unique, it follows that&lt;/p&gt;
\[
x^* = P_C(x) = 0 \iff (x - 0)^T(y - 0) \leq 0, \ \forall y \in M
\]&lt;p&gt;Thus, for all \( y \in M \), it holds that \( x^T y \leq 0 \), so \( x \in C^\circ \).&lt;/p&gt;

 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution f)&lt;/summary&gt;
 
 $$
\begin{align}
V^\circ &amp;= \{ x \in \mathbb{R}^n : v^T x \leq 0, \ \forall v \in M \} \\
&amp;= \{ x \in \mathbb{R}^n : v^T x \leq 0, \ -v^T x \leq 0, \ \forall v \in M \} \\
&amp;= \{ x \in \mathbb{R}^n : v^T x \leq 0, \ v^T x \geq 0, \ \forall v \in M \} \\
&amp;= \{ x \in \mathbb{R}^n : v^T x = 0, \ \forall v \in M \}
\end{align}
$$
 
&lt;/details&gt;


&lt;h3 id="problem-16"&gt;Problem 16&lt;/h3&gt;
&lt;p&gt;Given the linear program:&lt;/p&gt;
$$
(P) \quad \min \ x_1 - 4x_2 - 2x_3 \ \ \text{subject to} $$\[
x_1 + x_3 \le 2
\]&lt;p&gt;
&lt;/p&gt;
\[
x_1 + x_2 \le 4
\]&lt;p&gt;
&lt;/p&gt;
\[
x_2 + x_3 \le 8
\]&lt;p&gt;
&lt;/p&gt;
\[
x \geq 0
\]&lt;p&gt;&lt;strong&gt;a)&lt;/strong&gt; Formulate the pivot rule according to Bland.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;b)&lt;/strong&gt; Solve the linear program using the Simplex method.&lt;/p&gt;
&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution a)&lt;/summary&gt;
 
 &lt;p&gt;&lt;strong&gt;Pivot rule according to Bland:&lt;/strong&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;First, find the first column whose first entry is negative, i.e., \( i := \min\{ i : c_i \leq 0 \} \)&lt;/li&gt;
&lt;li&gt;If all \( a_{ij} &lt; 0 \), then \( \inf(P) = -\infty \)&lt;/li&gt;
&lt;li&gt;Then, find the row whose quotient with the \( b \)-vector is the smallest, i.e., \( j := \min\{ j : b_j / a_{ij} \} \)&lt;/li&gt;
&lt;li&gt;Our pivot is then \( a_{ij} \)&lt;/li&gt;
&lt;/ol&gt;
 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution b)&lt;/summary&gt;
 
 &lt;p&gt;First, we bring our problem into standard form by introducing slack variables \( s_1, s_2, s_3 \) for each constraint. We can directly start with Phase 2 of the Simplex algorithm and thus obtain the following tableau:&lt;/p&gt;
\[
T_1 : \ \ 
\begin{array}{cccccc|c}
1 &amp; -4 &amp; -2 &amp; 0 &amp; 0 &amp; 0 &amp; \gamma \\
\hline
1 &amp; 0 &amp; 1 &amp; 1 &amp; 0 &amp; 0 &amp; 2 \\
1 &amp; \fbox{1} &amp; 0 &amp; 0 &amp; 1 &amp; 0 &amp; 4 \\
0 &amp; 1 &amp; 1 &amp; 0 &amp; 0 &amp; 0 &amp; 8 \\
\end{array}
\]\[
T_2 : \ \ 
\begin{array}{cccccc|c}
5 &amp; 0 &amp; -2 &amp; 0 &amp; 4 &amp; 0 &amp; \gamma + 16 \\
\hline
1 &amp; 0 &amp; \fbox{1} &amp; 1 &amp; 0 &amp; 0 &amp; 2 \\
1 &amp; 1 &amp; 0 &amp; 0 &amp; 1 &amp; 0 &amp; 4 \\
-1 &amp; 0 &amp; 1 &amp; 0 &amp; -1 &amp; 0 &amp; 4 \\
\end{array}
\]\[
T_3 : \ \ 
\begin{array}{cccccc|c}
7 &amp; 0 &amp; 0 &amp; 2 &amp; 4 &amp; 0 &amp; \gamma + 20 \\
\hline
1 &amp; 0 &amp; 1 &amp; 1 &amp; 0 &amp; 0 &amp; 2 \\
1 &amp; 1 &amp; 0 &amp; 0 &amp; 1 &amp; 0 &amp; 4 \\
-2 &amp; 0 &amp; 0 &amp; -1 &amp; -1 &amp; 0 &amp; 2 \\
\end{array}
\]&lt;p&gt;Thus, we are done and have the optimal solution \( x^* = (0, 4, 2) \) with \( f(x^*) = -20 \).&lt;/p&gt;

 
&lt;/details&gt;


&lt;h3 id="problem-17"&gt;Problem 17&lt;/h3&gt;
&lt;p&gt;Given the optimization problem in \( \mathbb{R}^2 \):&lt;/p&gt;
$$
(P) \quad \min \ f(x) = -\exp\left(-\frac{x_1^2}{2}\right) \ \ \text{subject to} \ \ x_1^2 + x_2^2 \le 1.
$$&lt;p&gt;&lt;strong&gt;a)&lt;/strong&gt; Sketch the feasible set.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;b)&lt;/strong&gt; Determine all the KKT points of the problem (P).&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;c)&lt;/strong&gt; Show that the KKT points satisfy the (CQ2) condition.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;d)&lt;/strong&gt; Show that the KKT points satisfy the second-order necessary condition.&lt;/p&gt;
&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution a)&lt;/summary&gt;
 
 &lt;figure&gt;
 &lt;img style="display: block; margin-left: auto; margin-right: auto; width:80%" src="https://monkemanx.github.io/attachments/ws_21_task_6_a.jpg"&gt;
&lt;/figure&gt;

 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution b)&lt;/summary&gt;
 
 &lt;p&gt;We first set up the Lagrange function:&lt;/p&gt;
$$
L(x, u) = -\exp\left(-\frac{x_1^2}{2}\right) + u(x_1^2 + x_2^2 - 1)
$$&lt;p&gt;We then obtain the following conditions for the KKT points:&lt;/p&gt;
\[
\begin{aligned}
0 &amp;= \nabla_{x_1} f = x_1 \exp\left(-\frac{x_1^2}{2}\right) + 2u x_1 \quad &amp;(1) \\
0 &amp;= \nabla_{x_2} f = 2u x_2 \quad &amp;(2) \\
0 &amp;= u g = u(x_1^2 + x_2^2 - 1) \quad &amp;(3) \\
0 &amp;\geq g = x_1^2 + x_2^2 - 1 \quad &amp;(4)
\end{aligned}
\]&lt;p&gt;&lt;strong&gt;Case 1&lt;/strong&gt; (u = 0): Substituting into (1), we get:&lt;/p&gt;
$$
0 = x_1 \exp\left(-\frac{x_1^2}{2}\right) \implies x_1 = 0
$$&lt;p&gt;From (4), we then have \(x_2^2 \leq 1\), i.e., \(x_2 \in [-1, 1]\), and thus we obtain the KKT points \(((0, x_2), 0)\).&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Case 2&lt;/strong&gt; \(u &gt; 0\): From (2), we obtain \(x_2 = 0\), and from (3) we get \(1 = x_1^2\), so \(x_1 = \pm 1\). Substituting \( \pm 1 \) into (1):&lt;/p&gt;
$$
x_1 \exp\left(-\frac{1}{2}\right) + 2u = 0 \implies u = -\frac{1}{2} \exp\left(-\frac{1}{2}\right)
$$&lt;p&gt;This leads to a contradiction because \(\exp\left(-\frac{1}{2}\right)\) is not negative and cannot equal \(-\infty\). Therefore, there are no KKT points in this case.&lt;/p&gt;

 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution c)&lt;/summary&gt;
 
 &lt;p&gt;We calculate the derivative of \(g\):&lt;/p&gt;
$$
\nabla g = (2x_1, 2x_2)
$$&lt;p&gt;We substitute the KKT points we found:&lt;/p&gt;
$$
\nabla g((0, x_2)) = (0, 2x_2) \quad \text{with} \quad x_2 \in [-1, 1]
$$&lt;p&gt;This is linearly independent for all points and thus CQ2 is satisfied.&lt;/p&gt;

 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution d)&lt;/summary&gt;
 
 &lt;p&gt;To check if the second-order necessary condition is satisfied, we need to verify if \(f\) is positive definite.&lt;/p&gt;
&lt;p&gt;That is, we first calculate the Hessian matrix of \(f\):&lt;/p&gt;
$$
\nabla^2 f = H_f = 
\begin{pmatrix}
\exp\left(-\frac{x_1^2}{2}\right)(1 - x_1^2) &amp; 0 \\
0 &amp; 2u
\end{pmatrix}
$$&lt;p&gt;We now look at the minors to check definiteness:&lt;/p&gt;
$$
\det_1(H_f) = \exp\left(-\frac{x_1^2}{2}\right)(1 - x_1^2), \quad \det_2(H_f) = \exp\left(-\frac{x_1^2}{2}\right)(1 - x_1^2) \cdot 2u
$$&lt;p&gt;These are positive for the point \(((0, x_2), 0)\) with \(x_2 \in [-1, 1]\).&lt;/p&gt;

 
&lt;/details&gt;


&lt;h3 id="problem-18"&gt;Problem 18&lt;/h3&gt;
&lt;p&gt;Let \( \emptyset \neq M \subset \mathbb{R}^N \) be a convex set, and \( f: \mathbb{R}^N \to \mathbb{R} \) be a convex function. The optimization problem is given by:&lt;/p&gt;
$$
(P) \quad \min f(x) \ \ \text{subject to} \ \ x \in M \
$$&lt;p&gt;&lt;strong&gt;a)&lt;/strong&gt; Show that the solution set of (P):&lt;/p&gt;
$$
M^* := \{ x \in M : f(x) \leq f(y), \forall y \in M \}
$$&lt;p&gt;is convex.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;b)&lt;/strong&gt; Let \( \emptyset \neq M \subset \mathbb{R}^N \) now be a polytope. Show that \( f \) attains its maximum on \( V = \{ x \in M : x \text{ is a vertex of } M \} \).&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Hint:&lt;/em&gt; You can use the fact that for \( y^k \in M, k = 1, \dots, K \),&lt;/p&gt;
$$
f\left(\sum_{k=1}^K \lambda_k y^k\right) \leq \sum_{k=1}^K \lambda_k f(y^k), \quad \lambda_k \geq 0, \quad \sum_{k=1}^K \lambda_k = 1.
$$&lt;p&gt;Now, for \( g: \mathbb{R}^N \to \mathbb{R}^P \) convex, and \( A \in \mathbb{R}^{K \times N} \) and \( b \in \mathbb{R}^K \), the set \( M \) is given by:&lt;/p&gt;
$$
M = \{ x \in \mathbb{R}^N : g(x) \leq 0, Ax = b \}.
$$&lt;p&gt;&lt;strong&gt;c)&lt;/strong&gt; State the Slater conditions for convex optimization problems.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;d)&lt;/strong&gt; Formulate the dual problem (D) for the convex optimization problem (P) on \( M \), and state the strong duality theorem.&lt;/p&gt;
&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution a)&lt;/summary&gt;
 
 &lt;p&gt;Let \( x_1, x_2 \in M^* \) be two solutions and let \( \lambda \in (0,1) \). Since \( x_1 \) and \( x_2 \) are both minima, we have \( f(x_1) = f(x_2) \), and thus:&lt;/p&gt;
\[
\begin{aligned}
f(\lambda x_1 + (1 - \lambda) x_2) &amp;\leq \lambda f(x_1) + (1 - \lambda) f(x_2) \\
&amp;= \lambda f(x_1) + (1 - \lambda) f(x_1) \\
&amp;= f(x_1) \leq f(y), \quad \forall y \in M.
\end{aligned}
\]&lt;p&gt;Therefore, \( M^* \) is convex.&lt;/p&gt;

 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution b)&lt;/summary&gt;
 
 &lt;p&gt;Since \( M \) is a polytope, it has a finite number of vertices. Let \( c^* = \arg\max_{c \in V} f(c) \), and suppose \( \sum \lambda_k = 1 \). Then, for every \( x \in M \), we have:&lt;/p&gt;
\[
\begin{aligned}
f(c^*) &amp;= \sum \lambda_k f(c^*) \\
&amp;\geq \sum \lambda_k f(c^k) \\
&amp;\geq f\left(\sum \lambda_k c^k\right) \\
&amp;= f(x).
\end{aligned}
\]&lt;p&gt;Thus, the global maximum is attained at \( c^* \).&lt;/p&gt;

 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution c)&lt;/summary&gt;
 
 &lt;p&gt;The Slater condition states:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;\( \operatorname{rank}(A) = n \leq m \).&lt;/li&gt;
&lt;li&gt;There exists \( x' \in \mathbb{R}^n \) such that \( g(x') \leq 0 \) and \( Ax' = b \).&lt;/li&gt;
&lt;/ol&gt;
 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution d)&lt;/summary&gt;
 
 &lt;p&gt;The dual problem is given by&lt;/p&gt;
$$
(D) \quad \max \ f^*(u, v) \quad \text{subject to} \quad M^* = \{(u,v) \in \mathbb{R}^p \times \mathbb{R}^K : u \geq 0, f^*(u, v) &gt; - \infty\}
$$&lt;p&gt;where&lt;/p&gt;
$$
f^*(u, v) = \inf_x L(x, u, v) = \inf_x \left[ f(x) + u^T g(x) + v^T (Ax - b) \right].
$$&lt;p&gt;If both (P) and (D) are feasible and the Slater condition holds, then:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;(P) is solvable \( \iff \) (D) is solvable.&lt;/li&gt;
&lt;li&gt;Complementary slackness holds: \( u g(x^*) = 0 \).&lt;/li&gt;
&lt;li&gt;The strong duality property holds:&lt;/li&gt;
&lt;/ol&gt;
$$
\min (P) = \max (D).
$$
 
&lt;/details&gt;


&lt;h3 id="problem-19"&gt;Problem 19&lt;/h3&gt;
&lt;p&gt;Prove or disprove: If \( f: \mathbb{R}^n \to \mathbb{R} \) is strictly convex and \( M \subset \mathbb{R}^n \) is convex and closed, so has problem&lt;/p&gt;
\[
(P) \quad \min_{x \in M} f(x)
\]&lt;p&gt;a solution.&lt;/p&gt;
&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution&lt;/summary&gt;
 
 &lt;p&gt;There is a theorem stating that an optimization problem has a solution if \( f \) is continuous and \( M \) is closed and bounded.&lt;/p&gt;
&lt;p&gt;Since \( f \) is convex, it is also continuous. However, &lt;strong&gt;boundedness is missing&lt;/strong&gt;, meaning there must exist a constant \( c \) such that&lt;/p&gt;
\[
\forall x \in M: |x| \leq c.
\]&lt;p&gt;For example, \( [1,1] \) is bounded, but \( (-\infty, 0] \) is not. Since \( M \) is not necessarily bounded, the theorem does not apply.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Counterexample:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Let \( f(x) = e^x \) and \( M = \mathbb{R} \). Then, there is no solution because we can always find an \( x \) where \( f(x) \) is smaller.&lt;/p&gt;

 
&lt;/details&gt;


&lt;h3 id="problem-20"&gt;Problem 20&lt;/h3&gt;
&lt;p&gt;A brewery can produce beers in three different flavors by mixing two types of hops. The table below specifies how many units (ME) of each hop type are required to produce one unit of each beer type. Additionally, the available quantity of each hop type and the profit per unit of each beer type are given. A minimum of 20 units of beer must be produced in total.&lt;/p&gt;
\[
\begin{array}{|c|cc|c|}
\hline
 &amp; \text{ME Hops 1} &amp; \text{ME Hops 2} &amp; \text{Profit per ME} \\
\hline
\text{Beer 1} &amp; 1 &amp; 2 &amp; 12 \\
\text{Beer 2} &amp; 3 &amp; 1 &amp; 20 \\
\text{Beer 3} &amp; 1 &amp; 3 &amp; 18 \\
\hline
\text{Available (ME)} &amp; 30 &amp; 40 &amp; \\
\hline
\end{array}
\]&lt;p&gt;The brewery aims to &lt;strong&gt;maximize its profit&lt;/strong&gt;. Formulate the problem as a &lt;strong&gt;linear optimization problem in standard form&lt;/strong&gt;.&lt;/p&gt;
&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution&lt;/summary&gt;
 
 &lt;p&gt;We have the standard form:&lt;/p&gt;
\[
(P) \quad \min c^T x \quad \text{subject to } x \in M
\]&lt;p&gt;with&lt;/p&gt;
\[
c = (-12, -20, -18, 0, 0, 0), \quad b = (30, 40, 20),
\]\[
A =
\begin{pmatrix}
1 &amp; 3 &amp; 1 &amp; 1 &amp; 0 &amp; 0 \\
2 &amp; 1 &amp; 3 &amp; 0 &amp; 1 &amp; 0 \\
1 &amp; 1 &amp; 1 &amp; 0 &amp; 0 &amp; -1 \\
\end{pmatrix}
\]&lt;p&gt;where \( x_4, x_5, x_6 \) are slack variables.&lt;/p&gt;

 
&lt;/details&gt;


&lt;h3 id="problem-21"&gt;Problem 21&lt;/h3&gt;
&lt;p&gt;We want to solve the following linear optimization problem using the &lt;strong&gt;Simplex Method&lt;/strong&gt;:&lt;/p&gt;
\[
\text{Maximize} \quad x_2 - x_1 \quad \text{subject to} \quad x \in M = \{x \in \mathbb{R}^2 : 2x_1 + x_2 \geq 2, x_1 \geq 0, x_1 + x_2 \leq 3\}.
\]&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution&lt;/summary&gt;
 
 &lt;p&gt;First, we convert the problem into standard form. To do this, we introduce sign-independent variables, \( x_2 = x_2^+ - x_2^- \), and slack variables \( s_1, s_2 \).&lt;/p&gt;
&lt;p&gt;Thus, we get the tableau.&lt;/p&gt;
$$
T_1 : \ \
\begin{array}{ccccc|c}
1 &amp; -1 &amp; 1 &amp; 0 &amp; 0 &amp; \gamma \\
\hline 
2 &amp; 1 &amp; -1 &amp; -1 &amp; 0 &amp; 2 \\
1 &amp; 1 &amp; -1 &amp; 0 &amp; 1 &amp; 3
\end{array}
$$&lt;p&gt;We cannot immediately read off a basic solution because the second-to-last column is not a unit vector, so we start with phase 1 of the simplex algorithm applied to the first row.&lt;/p&gt;
$$
T_2 : \ \
\begin{array}{cccccc|c}
-2 &amp; -1 &amp; 1 &amp; 1 &amp; 0 &amp; 0 &amp; -2 \\
\hline
1 &amp; -1 &amp; 1 &amp; 0 &amp; 0 &amp; 0 &amp; \gamma \\
\hline 
\fbox{2} &amp; 1 &amp; -1 &amp; -1 &amp; 0 &amp; 1 &amp; 2 \\
1 &amp; 1 &amp; -1 &amp; 0 &amp; 1 &amp; 0 &amp; 3
\end{array}
$$$$
T_3 : \ \
\begin{array}{cccccc|c}
0 &amp; 0 &amp; 0 &amp; 0 &amp; 0 &amp; 1 &amp; 0 \\
\hline
0 &amp; -3/2 &amp; 3/2 &amp; 1/2 &amp; 0 &amp; -1/2 &amp; \gamma - 1 \\
\hline 
1 &amp; 1/2 &amp; -1/2 &amp; -1/2 &amp; 0 &amp; 1/2 &amp; 1 \\
0 &amp; 1/2 &amp; -1/2 &amp; 1/2 &amp; 1 &amp; -1/2 &amp; 2
\end{array}
$$&lt;p&gt;Since the first row is positive, we are finished with phase 1 and can move on to phase 2 of the simplex algorithm.&lt;/p&gt;
$$
T_4 : \ \
\begin{array}{ccccc|c}
0 &amp; -3/2 &amp; 3/2 &amp; 1/2 &amp; 0 &amp; \gamma - 1 \\
\hline 
1 &amp; \fbox{1/2} &amp; -1/2 &amp; -1/2 &amp; 0 &amp; 1 \\
0 &amp; 1/2 &amp; -1/2 &amp; 1/2 &amp; 1 &amp; 2
\end{array}
$$$$
T_5 : \ \
\begin{array}{ccccc|c}
3 &amp; 0 &amp; 0 &amp; -1 &amp; 0 &amp; \gamma + 2 \\
\hline 
2 &amp; 1 &amp; -1 &amp; -1 &amp; 0 &amp; 2 \\
-1 &amp; 0 &amp; 0 &amp; \fbox{1} &amp; 1 &amp; 1
\end{array}
$$$$
T_6 : \ \
\begin{array}{ccccc|c}
2 &amp; 0 &amp; 0 &amp; 0 &amp; 1 &amp; \gamma + 3 \\
\hline 
1 &amp; 1 &amp; -1 &amp; 0 &amp; 1 &amp; 3 \\
-1 &amp; 0 &amp; 0 &amp; 1 &amp; 1 &amp; 1
\end{array}
$$&lt;p&gt;Thus, we are finished with phase 2 of the simplex algorithm, and the solution is \( x^* = (0, 3) \) with \( f(x^*) = 3 \).&lt;/p&gt;

 
&lt;/details&gt;


&lt;h3 id="problem-22"&gt;Problem 22&lt;/h3&gt;
&lt;p&gt;Given the optimization problem&lt;/p&gt;
\[
(P) \quad \text{Minimize } f(x) = e^{2x_1} + (x_2 - x_1)^2 \quad \text{subject to} \quad M = \{x \in \mathbb{R}^2 : x_2 - e^{-x_1} \geq 1\}
\]&lt;p&gt;&lt;strong&gt;(a)&lt;/strong&gt; Show that this is a convex optimization problem.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;(b)&lt;/strong&gt; Formulate the dual problem of (P), explicitly determining the objective function.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;(c)&lt;/strong&gt; Solve the dual problem.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;(d)&lt;/strong&gt; Justify that \( \hat{x} = (0, 2)^T \) is a solution to the problem (P).&lt;/p&gt;
&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution a)&lt;/summary&gt;
 
 &lt;p&gt;We examine the derivatives of \( f(x) \) and \( g(x) = -x_2 + e^{-x_1} + 1 \):&lt;/p&gt;
\[
\nabla f(x) = \begin{pmatrix} 2e^{2x_1} \\ 2(x_2 - x_1) \end{pmatrix}, \quad \nabla g(x) = \begin{pmatrix} -e^{-x_1} \\ -1 \end{pmatrix}
\]&lt;p&gt;The Hessian matrices are:&lt;/p&gt;
\[
\nabla^2 f(x) = H_f =
\begin{pmatrix}
4e^{2x_1} &amp; 0 \\
0 &amp; 2
\end{pmatrix}
\]\[
\nabla^2 g(x) = H_g =
\begin{pmatrix}
e^{-x_1} &amp; 0 \\
0 &amp; 0
\end{pmatrix}
\]&lt;p&gt;We consider the minors of the Hessian matrices:&lt;/p&gt;
\[
\det_1(H_f) = 4e^{2x_1}, \quad \det_2(H_f) = 2
\]\[
\det_1(H_g) = e^{-x_1}, \quad \det_2(H_g) = 0
\]&lt;p&gt;Since the minors of \( H_f \) and \( H_g \) are positive, both matrices are positive semi-definite, implying that \( f(x) \) and \( g(x) \) are convex.&lt;/p&gt;

 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution b)&lt;/summary&gt;
 
 &lt;p&gt;First, we set up the Lagrange function:&lt;/p&gt;
$$
L(x, u) = e^{2x_1} + (x_2 - 1)^2 + u(-x_2 + e^{-x_1} + 1)
$$&lt;p&gt;Now, we seek the infimum for \( x \) of this function:&lt;/p&gt;
$$
\begin{aligned}
0 &amp;= \nabla_{x_1} L = 2e^{2x_1} - ue^{-x_1} \\
0 &amp;= \nabla_{x_2} L = 2(x_2 - 1) - u
\end{aligned}
$$&lt;p&gt;From equation (2), we get \( u = 2x_2 - 2 \implies x_2 = (u - 2)/2 \). From equation (1), we get \( 2e^{2x_1} = ue^{-x_1} \implies 2e^{3x_1} = u \implies x_1 = \ln(u/2)/3 \).&lt;/p&gt;
&lt;p&gt;Thus, we have:&lt;/p&gt;
$$
\begin{aligned}
F(x_1, x_2) &amp;= e^{\ln(u/2)/3} + \left(\frac{u - 2}{2} - 1\right)^2 + u\left(-\frac{u - 2}{2} + e^{-\ln(u/2)/3} + 1\right) \\
&amp;= \left(\frac{u}{2}\right)^{1/3} + \left(\frac{u - 2}{2} - 1\right)^2 + u\left(-\frac{u - 2}{2} + \left(\frac{2}{u}\right)^{1/3} + 1\right) \\
&amp;= \begin{cases}
0, &amp;u = 0, \\
3\left(\frac{u}{2}\right)^{2/3} - \frac{u}{2}^2, \quad &amp;u &gt; 0
\end{cases}
\end{aligned}
$$&lt;p&gt;Thus, we obtain the dual problem:&lt;/p&gt;
$$
(D) \quad \max \ F(x)
$$
 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution c)&lt;/summary&gt;
 
 &lt;p&gt;We are looking for the point \( u \geq 0 \) where \( F'(u) = 0 \):&lt;/p&gt;
$$
F'(u) = \left(\frac{u}{2}\right)^{-1/3} - \frac{u}{2} = 0 \implies u = 2
$$&lt;p&gt;With \( F(2) = 2 &gt; 0 = F(0) \) and \( \lim_{u \to \infty} F(u) = -\infty \), the function \( F \) attains its maximum there.&lt;/p&gt;

 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution d)&lt;/summary&gt;
 
 It holds that \( f(x') = 1 + (2 -1)^2 = 2 = F(x') \). According to the weak duality theorem, \( x' \) is a solution to (p).
 
&lt;/details&gt;


&lt;h3 id="problem-23"&gt;Problem 23&lt;/h3&gt;
&lt;p&gt;Given the optimization problem&lt;/p&gt;
\[
(P) \quad \text{Minimize } f(x) = (x_1 - 6)^2 + x_2^2
\]&lt;p&gt;subject to \( x \in M \), where&lt;/p&gt;
\[
M = \{ x \in \mathbb{R}^2 : (4 - x_1)x_2 \geq x_1^3 \}.
\]&lt;p&gt;&lt;strong&gt;(a)&lt;/strong&gt; Determine all \( x \in M \) for which the Mangasarian-Fromowitz condition (MFB) is satisfied.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;(b)&lt;/strong&gt; Determine all KKT (Karush-Kuhn-Tucker) points for the optimization problem.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;(c)&lt;/strong&gt; Determine all solutions to (P) and the corresponding objective function values.&lt;/p&gt;
&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution a)&lt;/summary&gt;
 
 &lt;p&gt;We write \( M \) in the form:&lt;/p&gt;
\[
M = \{x \in \mathbb{R}^2 : g(x) \leq 0\} \quad \text{with} \quad g(x) = x_1^3 - (4 - x_1)x_2^2
\]&lt;p&gt;The CQ1/MFB condition is satisfied if there exists a \( z' \in \mathbb{R}^2 \) such that \( h(x) + h'(x)z &lt; 0 \). It holds that \( h'(x) = (3x_1^2, -2(4 - x_1)x_2) \), and thus, we have the condition:&lt;/p&gt;
\[
x_1^3 - (4 - x_1)x_2^2 + 3z_1 x_1^2 - 2 z_2(4 - x_1) x_2 &lt; 0
\]&lt;p&gt;or&lt;/p&gt;
\[
x_1^2 (x_1 + 3z_1) - x_2 (4 - x_1)(x_2 + 2z_2) &lt; 0
\]&lt;p&gt;For \( x = 0 \), we have \( h(0) = 0 \), so the condition is not satisfied for this point.&lt;/p&gt;
&lt;p&gt;Now, let \( x \in M \setminus \{0\} \), then \( x_1 &lt; 4 \), because \( h(x) &gt; 0 \) for \( x \geq 4 \). If \( x_1^2 \neq 0 \), set \( z_1 = -|x_1| \). If \( x_2 \neq 0 \), set \( z_2 = -|x_2| \). Then one of the two terms on the left-hand side of the inequality is strictly smaller than zero, and the other is at least smaller or equal to zero. Therefore, CQ1 is satisfied.&lt;/p&gt;

 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution b)&lt;/summary&gt;
 
 &lt;p&gt;The Lagrange function is:&lt;/p&gt;
\[
L(x, u) = (x_1 - 6)^2 + x_2^2 + u(x_1^3 - (4 - x_1)x_2^2)
\]&lt;p&gt;The KKT conditions are:&lt;/p&gt;
\[
\begin{aligned}
0 &amp;= \nabla_{x_1} L = 2(x_1 - 6) + u(3x_1^2 + x_2^2) \\
0 &amp;= \nabla_{x_2} L = 2x_2 - 2u(4 - x_1)x_2 \\
0 &amp;= u g = u(x_1^3 - (4 - x_1)x_2^2)
\end{aligned}
\]&lt;p&gt;&lt;strong&gt;Case 1&lt;/strong&gt; (\( u = 0 \)): From (1), we get \( x_1 = 6 \) and from (2), \( x_2 = 0 \), so \( x = (6, 0) \), but this point is not in \( M \).&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Case 2&lt;/strong&gt; (\( x_2 = 0 \)): Here, \( u \neq 0 \), and from (3), we get \( x_1 = 0 \). Substituting into (1) leads to a contradiction.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Case 3&lt;/strong&gt; (\( x_2 \neq 0 \)): From (2), we obtain:&lt;/p&gt;
\[
0 = 2 - 2u(4 - x_1) \implies 0 = 1 - 4u - ux_1 \implies u = \frac{1}{4 - x_1}.
\]&lt;p&gt;Substituting this into (1), we get:&lt;/p&gt;
\[
(4) \quad 0 = x_1^2 + 20x_1 - 48 x_2^2
\]&lt;p&gt;Now, we multiply (4) by the factor \( 4 - x_1 \) and substitute the expression from (3):&lt;/p&gt;
\[
0 = (x_1^2 + 20x_1 - 48)(4 - x_1) + x_1^3 = -16x_1^2 + 128x_1 - 192 = -16(x_1 - 4)^2 + 64.
\]&lt;p&gt;This implies \( x_2 = 2 \) or \( x_1 = 6 \). Since we established that \( x_1 &lt; 4 \), we must have \( x_1 = 2 \). Therefore, \( x_2 = \pm 2 \) and \( u = \frac{1}{2} \).&lt;/p&gt;
&lt;p&gt;Thus, the KKT points are \( ((2, 2), \frac{1}{2}) \) and \( ((2, -2), \frac{1}{2}) \).&lt;/p&gt;

 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution c)&lt;/summary&gt;
 
 &lt;p&gt;Since \( CQ1/MFB \) holds, we can apply the Lagrange theorem, meaning the KKT points are possible solutions. We have:&lt;/p&gt;
\[
f(0,0) = 36, \quad f(2,2) = f(2,-2) = 20
\]&lt;p&gt;Thus, \( x^1 = (2,2) \) and \( x^2 = (2,-2) \) are the solutions to the optimization problem, with an objective function value of 20.&lt;/p&gt;

 
&lt;/details&gt;


&lt;h3 id="problem-24"&gt;Problem 24&lt;/h3&gt;
&lt;p&gt;Let \( e^{(j)}, \ j=1,\dots,n \) denote the coordinate unit vectors in \( \mathbb{R}^n \). Define&lt;/p&gt;
\[
Q = \text{cone} \{e^{(1)},\dots,e^{(n)}\}
\]&lt;p&gt;and let \( b \in \mathbb{R}^n \setminus Q \).&lt;/p&gt;
&lt;p&gt;Furthermore, consider the matrix \( A = (a_{jk}) \in \mathbb{R}^{m \times n} \) with \( a_{jk} \geq 0 \) for all \( j = 1, \dots, m \), \( k = 1, \dots, n \).&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;(a)&lt;/strong&gt; Show that there exists a vector \( y \in \mathbb{R}^n \) such that&lt;/p&gt;
\[
Ay \leq 0 \quad \text{and} \quad b^T y &gt; 0.
\]&lt;p&gt;&lt;strong&gt;(b)&lt;/strong&gt; Specify a closed half-space&lt;/p&gt;
\[
H = \{x \in \mathbb{R}^n \mid a^T x \geq 0\}
\]&lt;p&gt;such that \( b \notin H \) and \( Q \subseteq H \) holds.&lt;/p&gt;
&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution a)&lt;/summary&gt;
 
 &lt;p&gt;First, we show that the vector \( b \) has at least one negative coordinate. By definition, we have&lt;/p&gt;
\[
Q = \left\{ \sum_{j=1}^{n} \lambda_j e^{(j)} : \lambda_j \geq 0 \right\} = \mathbb{R}_{\geq 0}^n.
\]&lt;p&gt;Since \( b \in \mathbb{R}^n \setminus Q \), there exists an index \( \mu \in \{1, \dots, n\} \) such that \( b_\mu &lt; 0 \).&lt;/p&gt;
&lt;p&gt;The second step is to show that the linear system \( A^T x = b \) has no solution \( x \in \mathbb{R}_{\geq 0}^m \). Since all coefficients of \( A \) are non-negative, it follows that \( A^T x \geq 0 \) for all \( x \in \mathbb{R}_{\geq 0}^m \). However, as we just established, \( b \notin \mathbb{R}_{\geq 0}^n \). Thus, the set&lt;/p&gt;
\[
\{x \in \mathbb{R}^m : A^T x = b\}
\]&lt;p&gt;is empty.&lt;/p&gt;
&lt;p&gt;The claim now follows from Farkas&amp;rsquo; Lemma, which states that the set&lt;/p&gt;
\[
\{y \in \mathbb{R}^n : Ay \leq 0, \ b^T y &gt; 0\}
\]&lt;p&gt;is non-empty. This is equivalent to the existence of the required vector \( y \).&lt;/p&gt;

 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution b)&lt;/summary&gt;
 
 &lt;p&gt;First, assume that \( b \in \mathbb{R}_{\geq 0}^n \setminus \{0\} \). Since \( b \notin Q \), we have \( b \neq 0 \). In this case, we choose \( a = -b \in \mathbb{R}_{\leq 0}^n \setminus \{0\} \). It follows directly that&lt;/p&gt;
\[
a^T b = -|b|^2 &lt; 0
\]&lt;p&gt;and&lt;/p&gt;
\[
a^T x = -b^T x \geq 0 \quad \text{for all } x \geq 0.
\]&lt;p&gt;If this is not the case, then there exists an index \( v \) such that \( b_v &gt; 0 \). Define&lt;/p&gt;
\[
a_v = -\frac{b_\mu}{2}, \quad a_\mu = b_v, \quad \text{and} \quad a_k = 0 \text{ otherwise}.
\]&lt;p&gt;Then we obtain&lt;/p&gt;
\[
a^T b = -\frac{b_\mu b_v}{2} + b_v b_\mu = \frac{b_\mu b_v}{2} &lt; 0,
\]&lt;p&gt;which implies \( b \notin H \). Moreover, for \( x \geq 0 \), we have&lt;/p&gt;
\[
a^T x = -\frac{b_\mu}{2} x_v + b_v x_\mu \geq 0,
\]&lt;p&gt;which shows that \( x \in H \).&lt;/p&gt;

 
&lt;/details&gt;


&lt;h3 id="problem-25"&gt;Problem 25&lt;/h3&gt;
&lt;p&gt;The Easter Bunny is experimenting with his recipe for magical blue Easter egg dye to increase its efficiency. The recipe consists of three ingredients: &lt;strong&gt;gentian flower petals, blueberry juice, and sapphire dust&lt;/strong&gt;. Through his experiments, he discovers that the number of eggs that can be painted with the dye is proportional to the function&lt;/p&gt;
\[
f(x) = x_1^2 \sqrt{x_2} \sqrt[3]{x_3}
\]&lt;p&gt;where \( x_j &gt; 0 \) for \( j = 1,2,3 \), representing the quantities used of gentian flower petals (sacks), blueberry juice (barrels), and sapphire dust (pinches), respectively.&lt;/p&gt;
&lt;p&gt;The Easter Bunny has also found the following constraints:&lt;/p&gt;
\[
\frac{x_2}{x_1} \leq 2, \quad x_1 x_2^2 \leq e^4 x_3, \quad x_3 \geq 1.
\]&lt;p&gt;The optimization problem is to &lt;strong&gt;maximize \( f(x) \) subject to these constraints&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;(a)&lt;/strong&gt; Show that this problem is equivalent to a &lt;strong&gt;linear optimization problem&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;(b)&lt;/strong&gt; Formulate the &lt;strong&gt;equivalent linear optimization problem in standard form&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Hint:&lt;/strong&gt; Consider taking the logarithm of \( f(x) \).&lt;/p&gt;
&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution a)&lt;/summary&gt;
 
 &lt;p&gt;Since the &lt;strong&gt;logarithm function is continuous and monotonic&lt;/strong&gt;, we can consider \( \log(f(x)) \) instead of \( f(x) \). Define \( y_j = \log(x_j) \), so that:&lt;/p&gt;
\[
\log(f(x)) = \log \left( x_1^2 \sqrt{x_2} \sqrt[3]{x_3} \right)
\]&lt;p&gt;Expanding the logarithms:&lt;/p&gt;
\[
\log(f(x)) = \log(x_1^2) + \log(x_2^{1/2}) + \log(x_3^{1/3})
\]\[
= 2 \log(x_1) + \frac{1}{2} \log(x_2) + \frac{1}{3} \log(x_3)
\]\[
= 2 y_1 + \frac{1}{2} y_2 + \frac{1}{3} y_3 =: g(y).
\]&lt;p&gt;Now, we apply \( \log() \) to the constraints:&lt;/p&gt;
\[
\log \left( \frac{x_2}{x_1} \right) = \log(x_2) - \log(x_1) = y_2 - y_1 \leq \log(2)
\]\[
\log(x_1 x_2^2) \leq \log(e^4 x_3) \quad \Rightarrow \quad \log(x_1) + 2 \log(x_2) \leq \log(e^4) + \log(x_3)
\]\[
\Rightarrow y_1 + 2y_2 - y_3 \leq 4.
\]\[
\log(x_3) \geq \log(1) \quad \Rightarrow \quad -y_3 \leq 0.
\]&lt;p&gt;Thus, we obtain the following &lt;strong&gt;linear optimization problem&lt;/strong&gt;:&lt;/p&gt;
\[
(LP) \quad \max g(y) \quad \text{subject to} \quad N = \left\{ y \in \mathbb{R}^2 \times \mathbb{R}_{\geq 0} \mid y_2 - y_1 \leq \log(2), \quad y_1 + 2y_2 - y_3 \leq 4 \right\}.
\]&lt;p&gt;Let \( x' \) be an &lt;strong&gt;optimal solution&lt;/strong&gt; to \( (P) \), meaning that for all \( x \), we have \( f(x') \leq f(x) \). This implies that for all \( y \), we get \( g(y') \leq g(y) \), proving the &lt;strong&gt;equivalence&lt;/strong&gt; of the two optimization problems.&lt;/p&gt;

 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution b)&lt;/summary&gt;
 
 &lt;p&gt;The &lt;strong&gt;standard form&lt;/strong&gt; of the problem is:&lt;/p&gt;
\[
(P) \quad \min c^T y \quad \text{subject to} \quad M = \left\{ y \mid Ay = b, \quad y \geq 0 \right\}
\]&lt;p&gt;where:&lt;/p&gt;
\[
c = (-2, 2, -1/2, 1/2, -1/3, 0, 0),
\]\[
b = (\log(2), 4),
\]\[
A =
\begin{pmatrix}
-1 &amp; 1 &amp; 1 &amp; -1 &amp; 0 &amp; 1 &amp; 0 \\
1 &amp; -1 &amp; 2 &amp; -2 &amp; -1 &amp; 0 &amp; 1
\end{pmatrix}.
\]&lt;p&gt;Here, we use:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;\( y_1 = y_1^+ - y_1^- \),&lt;/li&gt;
&lt;li&gt;\( y_2 = y_2^+ - y_2^- \),&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;where \( y_1^+, y_1^-, y_2^+, y_2^- \geq 0 \), and&lt;br&gt;
\( y_6, y_7 \geq 0 \) are &lt;strong&gt;slack variables&lt;/strong&gt; for the constraints.&lt;/p&gt;

 
&lt;/details&gt;


&lt;h3 id="problem-26"&gt;Problem 26&lt;/h3&gt;
&lt;p&gt;Solve the following &lt;strong&gt;linear optimization problem&lt;/strong&gt; using the &lt;strong&gt;Simplex method&lt;/strong&gt;:&lt;/p&gt;
\[
\max \quad x_1 + x_2 + x_3
\]&lt;p&gt;subject to&lt;/p&gt;
\[
M = \{ x \in \mathbb{R}^3_{\geq 0} \mid x_1 + x_3 \leq 3, \quad 2x_2 - 3x_3 \geq 3x_1 - 5, \quad 2x_1 - x_3 \leq 2 - x_2 \}.
\]&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution&lt;/summary&gt;
 
 &lt;p&gt;We first transform the problem into standard form:&lt;/p&gt;
\[
(P) \quad \min -x_1 - x_2 - x_3 \quad \text{subject to}
\]\[
x_1 + x_3 + s_1 = 3
\]\[
3x_1 - 2x_2 + 3x_3 + s_2 = 5
\]\[
2x_1 + x_2 - x_3 + s_3 = 2
\]&lt;p&gt;with the slack variables \( s_1, s_2, s_3 \geq 0 \).&lt;/p&gt;
&lt;p&gt;The initial tableau is:&lt;/p&gt;
\[
T_0 : \quad 
\begin{array}{cccccc|c}
-1 &amp; -1 &amp; -1 &amp; 0 &amp; 0 &amp; 0 &amp; \gamma \\
\hline
1 &amp; 0 &amp; 1 &amp; 1 &amp; 0 &amp; 0 &amp; 3 \\
3 &amp; -2 &amp; 3 &amp; 0 &amp; 1 &amp; 0 &amp; 5 \\
\fbox{2} &amp; 1 &amp; -1 &amp; 0 &amp; 0 &amp; 1 &amp; 2
\end{array}
\]&lt;p&gt;We can proceed directly with Phase 2 of the simplex algorithm:&lt;/p&gt;
\[
T_1 : \quad 
\begin{array}{cccccc|c}
0 &amp; -\frac{1}{2} &amp; -\frac{3}{2} &amp; 0 &amp; 0 &amp; 0 &amp; \gamma +1 \\
\hline
0 &amp; -\frac{1}{2} &amp; \frac{3}{2} &amp; 1 &amp; 0 &amp; -\frac{1}{2} &amp; 2 \\
0 &amp; -\frac{7}{2} &amp; \frac{9}{2} &amp; 0 &amp; 1 &amp; -\frac{3}{2} &amp; 2 \\
1 &amp; \fbox{1/2} &amp; -\frac{1}{2} &amp; 0 &amp; 0 &amp; \frac{1}{2} &amp; 1
\end{array}
\]\[
T_2 : \quad 
\begin{array}{cccccc|c}
1 &amp; 0 &amp; -2 &amp; 0 &amp; 0 &amp; 1 &amp; \gamma + 2 \\
\hline
1 &amp; 0 &amp; \fbox{1} &amp; 1 &amp; 0 &amp; 0 &amp; 3 \\
7 &amp; 0 &amp; 2 &amp; 0 &amp; 1 &amp; 2 &amp; 9 \\
2 &amp; 1 &amp; -1 &amp; 0 &amp; 0 &amp; 1 &amp; 2
\end{array}
\]\[
T_3 : \quad 
\begin{array}{cccccc|c}
3 &amp; 0 &amp; 0 &amp; 2 &amp; 0 &amp; 1 &amp; \gamma + 8 \\
\hline
1 &amp; 0 &amp; 1 &amp; 1 &amp; 0 &amp; 0 &amp; 3 \\
6 &amp; 0 &amp; 0 &amp; -1 &amp; 1 &amp; 2 &amp; 6 \\
3 &amp; 1 &amp; 0 &amp; 1 &amp; 0 &amp; 1 &amp; 5
\end{array}
\]&lt;p&gt;Thus, Phase 2 is complete, and the optimal solution is:&lt;/p&gt;
\[
x^* = (0, 5, 3) \quad \text{with} \quad f(x^*) = 8.
\]
 
&lt;/details&gt;


&lt;h3 id="problem-27"&gt;Problem 27&lt;/h3&gt;
&lt;p&gt;Given the optimization problem&lt;/p&gt;
\[
(P) \quad \min f(x) \quad \text{subject to} \quad M = \left\{ x = (x_1, x_2)^T \in \mathbb{R}^2 \mid x_1 + x_2 \geq 1 \right\}, \quad x \in M
\]&lt;p&gt;with \( f(x) = e^{x_1 + x_2^2}, \quad x \in \mathbb{R}^2 \).&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;(a)&lt;/strong&gt; Show that this is a convex optimization problem.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;(b)&lt;/strong&gt; Formulate the dual problem to (P), explicitly determining the objective function.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;(c)&lt;/strong&gt; Solve the dual problem.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;(d)&lt;/strong&gt; Determine the solution to (P) using the saddle point theorem.&lt;/p&gt;
&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution a)&lt;/summary&gt;
 
 &lt;p&gt;Let \( g(x) = - x_1 - x_2 + 1 \), and let&amp;rsquo;s look at the derivatives:&lt;/p&gt;
\[
\nabla g(x) = (-1, -1), \quad \nabla f(x) = \left( e^{x_1 + x_2^2}, 2x_2 e^{x_1 + x_2^2} \right)
\]&lt;p&gt;The second derivatives are:&lt;/p&gt;
\[
\nabla^2 g(x) = H_g = 
\begin{pmatrix}
0 &amp; 0 \\
0 &amp; 0
\end{pmatrix}
\]\[
\nabla^2 f(x) = H_f = 
\begin{pmatrix}
e^{x_1 + x_2^2} &amp; 2x_2 e^{x_1 + x_2^2} \\
2x_2 e^{x_1 + x_2^2} &amp; 2 e^{x_1 + x_2^2} + 4x_2^2 e^{x_1 + x_2^2}
\end{pmatrix}
\]&lt;p&gt;We examine the determinants of the principal minors to determine the definiteness:&lt;/p&gt;
\[
\det_1(H_g) = 0, \quad \det_2(H_g) = 0
\]\[
\det_1(H_f) = e^{x_1 + x_2^2} \geq 0, \quad \det_2(H_f) = e^{x_1 + x_2^2} \left( 2 e^{x_1 + x_2^2} + 4x_2^2 e^{x_1 + x_2^2} \right) - 2e^{x_1 + x_2^2} \cdot 2x_2 e^{x_1 + x_2^2}
\]&lt;p&gt;As we can see, \( g(x) \) is semi-positive definite, and therefore convex. Furthermore, the first principal minor of \( f(x) \) is also positive, so it remains to check the second principal minor of \( f(x) \):&lt;/p&gt;
\[
e^{(x_1 + x_2^2)} \left( 2 e^{(x_1 + x_2^2)} + 4x_2^2 e^{(x_1 + x_2^2)} \right) - 2e^{(x_1 + x_2^2)} \cdot 2x_2 e^{(x_1 + x_2^2)} &gt;^! 0
\]\[
\iff 2 e^{(x_1 + x_2^2)} \cdot e^{(x_1 + x_2^2)} + 4x_2^2 e^{(x_1 + x_2^2)} \cdot e^{(x_1 + x_2^2)} &gt;^! 4x_2^2 e^{(x_1 + x_2^2)} \cdot e^{(x_1 + x_2^2)}
\]\[
\iff 2 e^{2(x_1 + x_2^2)} + 4x_2^2 e^{2(x_1 + x_2^2)} &gt;^! 4x_2^2 e^{2(x_1 + x_2^2)}
\]\[
\iff 2 e^{2(x_1 + x_2^2)} &gt;^! 0
\]&lt;p&gt;which is true. Therefore, \( f(x) \) is semi-positive definite and thus convex. Since both \( f(x) \) and \( g(x) \) are convex, the optimization problem is convex.&lt;/p&gt;

 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution b)&lt;/summary&gt;
 
 &lt;p&gt;First, we determine the Lagrangian function:&lt;/p&gt;
\[
L(x, u) = e^{x_1 + x_2^2} + u(- x_1 - x_2 + 1).
\]&lt;p&gt;The objective function is:&lt;/p&gt;
\[
F(x, u) = \inf_x L(x, u).
\]&lt;p&gt;This means we need to determine the infimum of the Lagrangian function.&lt;/p&gt;
\[
\begin{aligned}
0 &amp;= \nabla_{x_1} L(x, u) = e^{x_1 + x_2^2} - u, \\
0 &amp;= \nabla_{x_2} L(x, u) = 2x_2 e^{x_1 + x_2^2} - u.
\end{aligned}
\]&lt;p&gt;&lt;strong&gt;Case 1:&lt;/strong&gt; \( u \leq 0 \) This leads to a contradiction from equation (1).&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Case 2:&lt;/strong&gt; \( u &gt; 0 \) From equation (1), we obtain:&lt;/p&gt;
\[
u = e^{x_1 + x_2^2}.
\]&lt;p&gt;Substituting this into equation (2) gives:&lt;/p&gt;
\[
2x_2 u = u \implies x_2 = \frac{1}{2}.
\]&lt;p&gt;Substituting \( x_2 = \frac{1}{2} \) into equation (1):&lt;/p&gt;
\[
e^{x_1 + \left(\frac{1}{2}\right)^2} = e^{x_1 + \frac{1}{4}} = u.
\]&lt;p&gt;Taking the natural logarithm:&lt;/p&gt;
\[
x_1 + \frac{1}{4} = \ln(u) 
\iff x_1 = \ln(u) - \frac{1}{4}.
\]&lt;p&gt;Thus, the point&lt;/p&gt;
\[
x^* = \left(\ln(u) - \frac{1}{4}, \frac{1}{2}\right)
\]&lt;p&gt;minimizes the function. Substituting this into \( L(x, u) \) gives:&lt;/p&gt;
\[
F(u) = \frac{7}{4}u - u \ln(u).
\]&lt;p&gt;Thus, the dual problem is:&lt;/p&gt;
\[
(D) \quad \max F(u) \quad \text{subject to} \quad u &gt; 0.
\]
 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution c)&lt;/summary&gt;
 
 &lt;p&gt;We examine the critical points of \( F \):&lt;/p&gt;
\[
0 = F'(u) = \frac{7}{4} - \log(u) - 1
\iff e^{3/4} = u.
\]&lt;p&gt;It holds that \( F(e^{3/4}) = e^{3/4} &gt; 0 \), and since \(\lim\limits_{u \to \infty} F(u) = -\infty\), it is, in particular, a global maximum.&lt;/p&gt;

 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution d)&lt;/summary&gt;
 
 &lt;p&gt;The saddle point theorem states that if we have \( x^* \) and \( u^* \) such that&lt;/p&gt;
\[
L(x^*, u) \leq L(x^*, u^*) \leq L(x, u^*)
\]&lt;p&gt;then this is a solution.&lt;/p&gt;
&lt;p&gt;In (b), we have already determined \( x^* \) with \( x_2 = \frac{1}{2} \) and \( x_1 = \log(u^*) - \frac{1}{4} = \frac{1}{2} \), and in (c), we found \( u^* = \frac{1}{2} \). Furthermore,&lt;/p&gt;
\[
L\left(\frac{1}{2}, \frac{1}{2}, u\right) = e^{3/4}
\]&lt;p&gt;satisfies the inequality chain of the saddle point theorem. Thus, \( x^* \) is a solution to the convex optimization problem.&lt;/p&gt;

 
&lt;/details&gt;


&lt;h3 id="problem-28"&gt;Problem 28&lt;/h3&gt;
&lt;p&gt;Given the set&lt;/p&gt;
\[
M = \{(x, y) \in \mathbb{R}^2 \mid (1 + x)(1 + x^2) \leq y^2 \}
\]&lt;p&gt;we seek points in \( M \) that have the minimal distance to the origin.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;(a)&lt;/strong&gt; Formulate the problem as a differentiable optimization problem and show that a solution exists.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;(b)&lt;/strong&gt; Determine all \( (x, y) \in M \) for which the Mangasarian-Fromovitz constraint qualification (MFCQ) holds.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;(c)&lt;/strong&gt; Determine all Karush-Kuhn-Tucker (KKT) points for the optimization problem.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;(d)&lt;/strong&gt; Find all points in \( M \) with the minimal distance to the origin.&lt;/p&gt;
&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution a)&lt;/summary&gt;
 
 &lt;p&gt;The problem is given by&lt;/p&gt;
\[
(P) \quad \min f(x) \quad \text{subject to} \quad M = \left\{ x \mid g(x) &lt; 0 \right\}
\]&lt;p&gt;with&lt;/p&gt;
\[
f(x) = x^2 + y^2
\]\[
g(x) = (1 + x)(1 - x^2) - y^2.
\]&lt;p&gt;Since \( f \) is continuous and \( M \) is closed, and since \( (-1, 0) \in M \), the set \( M \) is non-empty. However, \( M \) is not bounded. We can instead restrict ourselves to the set&lt;/p&gt;
\[
M' = \{(x, y) \in M \mid \|(x,y)\| \leq 1 \}
\]&lt;p&gt;which is bounded. This restriction is valid because \( f &gt; 1 \) on \( M \setminus M' \) and \( f \leq 1 \) on \( M' \), meaning that the points in \( M' \) are the only possible minimizers.&lt;/p&gt;
&lt;p&gt;Since the set \( M' \) is closed and bounded, it is compact. Moreover, since \( f \) is continuous, a solution exists.&lt;/p&gt;

 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution b)&lt;/summary&gt;
 
 &lt;p&gt;We have&lt;/p&gt;
\[
\nabla_x g = 1 + 2x + 3x^2
\]\[
\nabla_y g = 2y.
\]&lt;p&gt;We seek all \( (x, y) \) for which there exist \( z_1, z_2 \) such that&lt;/p&gt;
\[
g(x) + g'(x)z &lt; 0.
\]&lt;p&gt;That is,&lt;/p&gt;
\[
(1 + x)(1 - x^2) - y^2 + z_1(2x + 3x^2) + 2z_2 y &lt; 0.
\]&lt;p&gt;&lt;strong&gt;Case 1:&lt;/strong&gt; \( y \neq 0 \)&lt;/p&gt;
&lt;p&gt;Choose \( z_1 = 0 \) and \( z_2 \) such that&lt;/p&gt;
\[
(1 + x)(1 - x^2) - y^2 &lt; 2z_2 y.
\]&lt;p&gt;&lt;strong&gt;Case 2:&lt;/strong&gt; \( y = 0 \)&lt;/p&gt;
&lt;p&gt;Note that&lt;/p&gt;
\[
1 + 2x + 3x^2 = (1 + x)^2 + 2x^2 &gt; 0
\]&lt;p&gt;for all \( x \). Thus, MFCQ (Mangasarian-Fromovitz constraint qualification) holds if&lt;/p&gt;
\[
z_1 &lt; - \frac{1 + x + x^2 + x^3}{1 + 2x + 3x^2}.
\]&lt;p&gt;Overall, MFCQ is satisfied for all \( (x, y) \in M \).&lt;/p&gt;

 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution c)&lt;/summary&gt;
 
 \[
L(x, u) = x^2 + y^2 + u \left( (1 + x)(1 - x^2) - y^2 \right).
\]&lt;p&gt;The KKT conditions are:&lt;/p&gt;
\[
\begin{aligned}
0 &amp;= \nabla_x L(x, u) = 2x + u(1 + 2x + 3x^2), \\
0 &amp;= \nabla_y L(x, u) = 2y - 2yu = 2y(1 - u), \\
0 &amp;= u g(x) = u \left( 1 + x + x^2 + x^3 - y^2 \right).
\end{aligned}
\]&lt;p&gt;From (2), we obtain \( y = 0 \) or \( u = 1 \).&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Case 1:&lt;/strong&gt; \( u = 0 \)&lt;br&gt;
From the first two conditions, we get the point \( (0, 0) \).&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Case 2:&lt;/strong&gt; \( y = 0 \)&lt;br&gt;
From (3), we get \( x = -1 \), and from (1), we get \( u = 1 \).&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Case 3:&lt;/strong&gt; \( u = 1 \)&lt;br&gt;
Substituting into (1) gives:&lt;/p&gt;
\[
3x^2 + 4x + 1 = 0.
\]&lt;p&gt;Applying the quadratic formula:&lt;/p&gt;
\[
\frac{-4 \pm \sqrt{4^2 - 4 \cdot 3 \cdot 1}}{2 \cdot 3} 
\iff \frac{-4 \pm \sqrt{16 - 12}}{6} 
\iff \frac{-4 \pm 2}{6}
\implies x_1 = -\frac{1}{3}, \ x_2 = -1.
\]&lt;p&gt;Substituting into (3), we obtain the KKT points:&lt;/p&gt;
\[
\left( (0, 0), 0 \right), \left( \left( -\frac{1}{3}, -\frac{2}{3}\sqrt{\frac{5}{3}} \right), 1 \right), \left( \left( -\frac{1}{3}, \frac{2}{3}\sqrt{\frac{5}{3}} \right), 1 \right), \left( (-1, 0), 1 \right).
\]
 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution d)&lt;/summary&gt;
 
 &lt;p&gt;We check the KKT points for minimality. First, the point \( (0, 0) \) is not in \( M \). Next,&lt;/p&gt;
\[
f\left( \left( -\frac{1}{3}, -\frac{2}{3}\sqrt{\frac{5}{3}} \right), 1 \right) = \sqrt{\frac{23}{27}} &lt; 1
\]\[
f\left( \left( -\frac{1}{3}, \frac{2}{3}\sqrt{\frac{5}{3}} \right), 1 \right) = \sqrt{\frac{23}{27}} &lt; 1
\]\[
f\left( (-1, 0), 1 \right) = 1.
\]&lt;p&gt;Thus, the two sought points are \( \left( -\frac{1}{3}, -\frac{2}{3}\sqrt{\frac{5}{3}} \right) \) and \( \left( -\frac{1}{3}, \frac{2}{3}\sqrt{\frac{5}{3}} \right) \).&lt;/p&gt;

 
&lt;/details&gt;


&lt;h3 id="problem-29"&gt;Problem 29&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;(a)&lt;/strong&gt;&lt;br&gt;
Let \( K_1, K_2 \subset \mathbb{R}^n \) be non-empty, closed, and convex sets. Furthermore, let \( K_1 \) be compact. Show:&lt;/p&gt;
&lt;p&gt;(i) The set \( K_1 - K_2 = \{ z = x - y \mid x \in K_1, y \in K_2 \} \) is closed.&lt;/p&gt;
&lt;p&gt;(ii) If \( K_1 \cap K_2 = \emptyset \), there exists a hyperplane that strictly separates \( K_1 \) and \( K_2 \), i.e., there exist \( a \in \mathbb{R}^n \setminus \{0\} \) and \( \gamma \in \mathbb{R} \) such that&lt;/p&gt;
\[
a^T x &lt; \gamma &lt; a^T y \quad \text{for all} \, x \in K_1, \, y \in K_2.
\]&lt;p&gt;&lt;strong&gt;(b)&lt;/strong&gt;&lt;br&gt;
The subsets of \( \mathbb{R}^2 \)&lt;/p&gt;
\[
K_1 = \{ (x_1, x_2) \in \mathbb{R}^2 \mid x_2 \geq e^{x_1} \}, \quad K_2 = \{ (x_1, x_2) \in \mathbb{R}^2 \mid x_2 \leq 0 \}
\]&lt;p&gt;are both non-empty, closed, and convex. Show or disprove the statement: \( K_1 \) and \( K_2 \) can be strictly separated by a line.&lt;/p&gt;
&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution a)&lt;/summary&gt;
 
 &lt;p&gt;&lt;strong&gt;(i)&lt;/strong&gt;
Let \( z_n \in K_1 - K_2 \) be an arbitrary sequence with \( z_n \to z \) as \( n \to \infty \).&lt;br&gt;
Write \( z_n = x_n - y_n \), where \( x_n \in K_1 \) and \( y_n \in K_2 \).&lt;br&gt;
Since \( K_1 \) is compact and therefore closed, there exists a subsequence \( x_n \to x \in K_1 \).&lt;br&gt;
Furthermore, since \( z_n \) and \( x_n \) converge, it follows that \( y_n \to y \in K_2 \).&lt;br&gt;
Thus, we have&lt;/p&gt;
\[
z = \lim_{n \to \infty} z_n = \lim_{n \to \infty} (x_n - y_n) = x - y,
\]&lt;p&gt;and since \( x \in K_1 \) and \( y \in K_2 \), it follows that \( z \in K_1 - K_2 \). Therefore, \( K_1 - K_2 \) is closed.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;(ii)&lt;/strong&gt;
This follows from the separation theorem, which states that if a set is non-empty, closed, and convex, then there exists a hyperplane that strictly separates the sets.&lt;br&gt;
By assumption, the set \( K_1 \cap K_2 = \emptyset \) is non-empty and closed, and \( K_1 \) and \( K_2 \) are convex.&lt;br&gt;
Therefore, a separating hyperplane exists.&lt;br&gt;
I leave the proof of convexity to the reader.&lt;/p&gt;

 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution b)&lt;/summary&gt;
 
 The only lines in \( \mathbb{R}^2 \) that do not intersect the interior of \( K_2 \) are the lines of the form \( x_2 = c \) for \( c \geq 0 \). Among these, only the line \( x_2 = 0 \) has an empty intersection with the interior of \( K_1 \). Therefore, this is the only line in \( \mathbb{R}^2 \) that separates the two sets. However, since the line \( x_2 = 0 \) is contained in \( K_2 \), it does not strictly separate the two sets. Hence, there is no line in \( \mathbb{R}^2 \) that strictly separates \( K_1 \) and \( K_2 \).
 
&lt;/details&gt;


&lt;h3 id="problem-30"&gt;Problem 30&lt;/h3&gt;
&lt;p&gt;Given a symmetric and positive semi-definite matrix \( Q \in \mathbb{R}^{n \times n} \), as well as \( A \in \mathbb{R}^{m \times n} \) and the vectors \( c \in \mathbb{R}^n \) and \( b \in \mathbb{R}^m \), consider the quadratic optimization problem&lt;/p&gt;
\[
(P) \quad \text{Minimize} \quad \frac{1}{2} x^\top Q x + c^\top x \quad \text{subject to} \quad M := \{ x \in \mathbb{R}^n \mid Ax = b, \, x \geq 0 \}.
\]&lt;p&gt;Additionally, suppose there exists \( x^* \in M \) and \( y^* \in \mathbb{R}^m \) satisfying the conditions&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;\( Q x^* + c + A^\top y^* \geq 0 \),&lt;/li&gt;
&lt;li&gt;\( (Q x^* + c + A^\top y^*)^\top x^* = 0 \).&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Show that \( x^* \) is an optimal solution of \( (P) \).&lt;/p&gt;
&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution&lt;/summary&gt;
 
 &lt;p&gt;To show that \( f(x^*) \leq f(x) \), we first note that&lt;/p&gt;
\[
f(x) - f(x^*) = \frac{1}{2} x^\top Q x + c^\top x - \frac{1}{2} {x^*}^\top Q x^* - c^\top x^*
\]&lt;p&gt;Rewriting this expression:&lt;/p&gt;
\[
f(x) - f(x^*) = (Q x^* + c)^\top (x - x^*) + \frac{1}{2} (x - x^*)^\top Q (x - x^*).
\]&lt;p&gt;Thus, we can express \( f(x) \) as:&lt;/p&gt;
\[
f(x) = (Q x^* + c)^\top (x - x^*) + \frac{1}{2} (x - x^*)^\top Q (x - x^*) + f(x^*).
\]&lt;p&gt;Further,&lt;/p&gt;
\[
\begin{aligned}
f(x) &amp;= f(x^*) + (Qx^* + c)^\top (x - x^*) + \frac{1}{2} (x - x^*)^\top Q (x - x^*) \\
&amp;\geq f(x^*) + (Qx^* + c)^\top (x - x^*) \\
&amp;= f(x^*) + (Qx^* + c)^\top x - (Qx^* + c)^\top x^* \\
&amp;\overset{(i)}{\geq} f(x^*) + (-A^\top y^*)^\top x - (Qx^* + c)^\top x^* \\
&amp;\overset{(ii)}{\geq} f(x^*) - (A^\top y^*)^\top x + (A^\top y^*)^\top x^* \\
&amp;= f(x^*) - (y^*)^\top A(x - x^*) \\
&amp;= f(x^*).
\end{aligned}
\]&lt;p&gt;Thus, \( x^* \) is a minimum.&lt;/p&gt;

 
&lt;/details&gt;


&lt;h3 id="problem-31"&gt;Problem 31&lt;/h3&gt;
&lt;p&gt;Let \( m, n \in \mathbb{N} \), \( A \in \mathbb{R}^{m \times n} \), and \( e = (1, \dots, 1)^\top \in \mathbb{R}^n \).&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;(a)&lt;/strong&gt;&lt;br&gt;
Show that the following problems &lt;em&gt;(I)&lt;/em&gt; and &lt;em&gt;(II)&lt;/em&gt; are equivalent:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;em&gt;(I)&lt;/em&gt; There exists an \( x \in \mathbb{R}^n \) such that \( x \geq 0 \), \( x \neq 0 \), and \( Ax = 0 \).&lt;/li&gt;
&lt;li&gt;&lt;em&gt;(II)&lt;/em&gt; There exists an \( x \in \mathbb{R}^n \) such that \( x \geq 0 \), \( Ax = 0 \), and \( e^\top x = 1 \).&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;(b)&lt;/strong&gt;&lt;br&gt;
Using the &lt;em&gt;strong duality theorem&lt;/em&gt; and the result from part &lt;em&gt;(a)&lt;/em&gt;, prove &lt;em&gt;Gordan’s Transposition Theorem&lt;/em&gt;:&lt;br&gt;
The problem &lt;em&gt;(I)&lt;/em&gt; has a solution if and only if there does not exist a \( y \in \mathbb{R}^m \) such that \( A^\top y &lt; 0 \).&lt;/p&gt;
&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution a)&lt;/summary&gt;
 
 &lt;p&gt;&lt;strong&gt;\( (I) \implies (II) \)&lt;/strong&gt;&lt;br&gt;
Since \( x \neq 0 \), there exists at least one component \( x_i &gt; 0 \). This implies that&lt;/p&gt;
\[
e^\top x = \sum x_i &gt; 0.
\]&lt;p&gt;Now, define&lt;/p&gt;
\[
x' = \frac{x}{e^\top x}.
\]&lt;p&gt;This ensures that&lt;/p&gt;
\[
e^\top x' = \frac{e^\top x}{e^\top x} = 1.
\]&lt;p&gt;Thus, \( x' \) is a feasible solution to \( (II) \).&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;\( (II) \implies (I) \)&lt;/strong&gt;&lt;br&gt;
If \( x \) is a solution to \( (II) \), then by definition \( x \neq 0 \), since&lt;/p&gt;
\[
e^\top x = 1
\]&lt;p&gt;and \( x \geq 0 \). Therefore, \( x \) also satisfies \( (I) \).&lt;/p&gt;

 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution b)&lt;/summary&gt;
 
 &lt;p&gt;From part (a), we know that &lt;strong&gt;(I) is equivalent to (II)&lt;/strong&gt;, so we can consider problem &lt;strong&gt;(II)&lt;/strong&gt; instead.&lt;/p&gt;
&lt;p&gt;We formulate the following &lt;strong&gt;primal problem&lt;/strong&gt;:&lt;/p&gt;
\[
(P) \quad \min 0^\top y \quad \text{subject to} \quad M = \left\{ 
\begin{pmatrix}
A \\
e
\end{pmatrix}
x =
\begin{pmatrix}
0 \\
\vdots \\
0 \\
1
\end{pmatrix}
\right\}.
\]&lt;p&gt;The corresponding &lt;strong&gt;dual problem&lt;/strong&gt; is given by&lt;/p&gt;
\[
(D) \quad \max 
\begin{pmatrix}
0 \\
\vdots \\
0 \\
1
\end{pmatrix}^\top
y'
\quad \text{subject to} \quad
N = \left\{ 
\begin{pmatrix}
A^\top &amp; e
\end{pmatrix}
y'
\leq 
\begin{pmatrix}
0 \\
\vdots \\
0
\end{pmatrix}
\right\}.
\]&lt;p&gt;We observe that problem &lt;strong&gt;(D) is always feasible&lt;/strong&gt;, since \( y' = 0 \) is in \( N \).&lt;/p&gt;
&lt;p&gt;&amp;ldquo;\(\implies\)&amp;rdquo;&lt;/p&gt;
&lt;p&gt;If problem &lt;strong&gt;(II) has a solution&lt;/strong&gt;, then problem &lt;strong&gt;(P) is feasible&lt;/strong&gt;. By the &lt;strong&gt;strong duality theorem&lt;/strong&gt;, this implies that &lt;strong&gt;(D) is also feasible&lt;/strong&gt;, and we have&lt;/p&gt;
\[
0 = \min(P) = \max(D).
\]&lt;p&gt;&lt;strong&gt;Assumption:&lt;/strong&gt; Suppose there exists a \( y = (y_1, \dots, y_m)^\top \) such that&lt;/p&gt;
\[
A^\top y &lt; 0.
\]&lt;p&gt;Then we can choose \( y_{m+1} &gt; 0 \) such that&lt;/p&gt;
\[
0 \geq A^\top y + y_{m+1} e = 
\begin{pmatrix}
A^\top &amp; e
\end{pmatrix}
\begin{pmatrix}
y_1 \\
\vdots \\
y_m \\
y_{m+1}
\end{pmatrix}.
\]&lt;p&gt;Thus,&lt;/p&gt;
\[
y' = (y_1, \dots, y_m, y_{m+1})^\top \in N,
\]&lt;p&gt;and we obtain&lt;/p&gt;
\[
y_{m+1} (0, \dots, 0, 1)^\top y' &gt; 0,
\]&lt;p&gt;which &lt;strong&gt;contradicts&lt;/strong&gt; the fact that \( \max(D) = 0 \).&lt;/p&gt;
&lt;p&gt;&amp;ldquo;\(\impliedby\)&amp;rdquo;&lt;/p&gt;
&lt;p&gt;If &lt;strong&gt;(II) has no solution&lt;/strong&gt;, then problem &lt;strong&gt;(P) is infeasible&lt;/strong&gt;. By the &lt;strong&gt;strong duality theorem&lt;/strong&gt;, this implies that&lt;/p&gt;
\[
\max(D) = \infty.
\]&lt;p&gt;Thus, we can choose&lt;/p&gt;
\[
y' = (y_1, \dots, y_m, y_{m+1})^\top
\]&lt;p&gt;such that&lt;/p&gt;
\[
y_{m+1} = (0, \dots, 0, 1)^\top y' &gt; 0.
\]&lt;p&gt;Then we have&lt;/p&gt;
\[
(A^\top e)y' = A^\top
\begin{pmatrix}
y_1 \\
\vdots \\
y_m
\end{pmatrix}
+y_{m+1} e \leq 0.
\]&lt;p&gt;This implies&lt;/p&gt;
\[
A^\top y \leq -y_{m+1} e &lt; 0.
\]&lt;p&gt;Thus, there exists some \( y \in \mathbb{R}^m \) such that&lt;/p&gt;
\[
A^\top y &lt; 0.
\]
 
&lt;/details&gt;


&lt;h3 id="problem-32"&gt;Problem 32&lt;/h3&gt;
&lt;p&gt;Are the following statements true or false? Provide a brief justification.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;(a)&lt;/strong&gt; Let \( x \in M_i \). Every set \( M_i \) that satisfies the MFC (First-Order Conditions) at \( x \) also satisfies CQ2 at \( x \).&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;(b)&lt;/strong&gt; The set \( I \setminus I^+ \) contains all indices \( j \in \{0, \dots, n\} \) for which \( h_j(\hat{x}) = 0 \) and \( \hat{u}_j = 0 \) hold.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;(c)&lt;/strong&gt; We can, without loss of generality, assume that the matrix \( Q \) is symmetric in the function \( f(x) = x^\top Q x + c^\top x \) where \( Q \in \mathbb{R}^{n \times n} \). If \( Q \) is also positive semidefinite, then \( f(x) \) is convex.&lt;/p&gt;
&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution a)&lt;/summary&gt;
 
 Wrong, CQ2 \(\implies\) CQ1/MFB.
 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution b)&lt;/summary&gt;
 
 Correct, the set \(I \backslash I^+ \) are the active indices without the strong active indicies \(u_j &gt; 0\).
 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution c)&lt;/summary&gt;
 
 Correct, because \(Q = \frac{1}{2}(Q + Q^T)\).
 
&lt;/details&gt;


&lt;h3 id="problem-32-1"&gt;Problem 32&lt;/h3&gt;
&lt;p&gt;Are the following statements true or false? Provide a brief justification.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;(a)&lt;/strong&gt; KKT points are candidates for which the equation \( v \nabla f(\hat{x}) + \hat{u} \nabla h(\hat{x}) = 0 \) holds.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;(b)&lt;/strong&gt; The KKT (Karush-Kuhn-Tucker conditions) are constraint qualifications.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;(c)&lt;/strong&gt; If \( (\bar{x}, \hat{u}, v) \) is a KKT point, then either \( \hat{u}_j = 0 \) or \( f_j(\bar{x}) = 0 \).&lt;/p&gt;
&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution a)&lt;/summary&gt;
 
 Wrong, it would be \(0 = \nabla f(x) + ug'(x) + vh'(x)\).
 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution c)&lt;/summary&gt;
 
 Correct.
 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution d)&lt;/summary&gt;
 
 Wrong, it is \(u_j = 0\) or \(h_j = 0\).
 
&lt;/details&gt;


&lt;h3 id="problem-33"&gt;Problem 33&lt;/h3&gt;
&lt;p&gt;Are the following statements true or false? Provide a brief justification.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;(a)&lt;/strong&gt; Convex optimization problems are characterized by potentially many local extremal points, which complicates the identification of the global extremum.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;(b)&lt;/strong&gt; Weyl&amp;rsquo;s theorem is an important part of the existence statement for convex optimization problems, as it proves the boundedness of the set \( A \).&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;(c)&lt;/strong&gt; In the dual form of the convex optimization problem \( (P): \min_{x \in M} f(x), M = \{x \in \mathbb{R}^n : h(x) \leq 0, Ax = b\} \), the greatest lower bound of the Lagrange function \( L(x,u,v) = f(x) + u^\top h(x) + v^\top (Ax - b) \) is minimized.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;(d)&lt;/strong&gt; The validity of the saddle point theorem for convex problems implies the duality gap is 0 and therefore the optimality of the solution \( (\hat{x}, \hat{u}, \hat{v}) \).&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;(e)&lt;/strong&gt; The strong duality theorem for convex problems assumes the validity of the Slater condition and thus proves the solvability of the dual problem, given that the primal problem has a solution.&lt;/p&gt;
&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution a)&lt;/summary&gt;
 
 Incorrect. The advantage of the convex formulation of optimization problems lies precisely in the fact that every local extremum is also a global extremum. Therefore, if the existence of a solution can be proven, it is automatically a global solution.
 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution b)&lt;/summary&gt;
 
 Incorrect. Weyl&amp;rsquo;s theorem first states that a finitely generated convex cone can be described as a polyhedron. This allows us to show that the set \(A\) is polyhedral and, in particular, closed. However, the boundedness of the set cannot be proven in this way.
 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution c)&lt;/summary&gt;
 
 Incorrect. In the convex case, although in the dual form, the greatest lower bound of the Lagrange function \( L(x, u, v) \) is indeed optimized, it is a maximization problem.
 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution d)&lt;/summary&gt;
 
 Correct.
 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution e)&lt;/summary&gt;
 
 Correct. The Slater condition provides the necessary requirements for the set \( M \) (maximum rank of \( A \), existence of \( \tilde{x} \in M \) with \( h(\tilde{x}) &lt; 0 \)), and its fulfillment serves as the foundation for the solvability of the dual problem, in addition to ensuring the solvability of the primal problem according to the strong duality theorem.
 
&lt;/details&gt;


&lt;h3 id="problem-34"&gt;Problem 34&lt;/h3&gt;
&lt;p&gt;Are the following statements true or false? Provide a brief justification.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;(a)&lt;/strong&gt; A strictly convex function is always uniformly convex.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;(b)&lt;/strong&gt; Let \( M \subset \mathbb{R}^n \) be open and convex, and \( f: M \to \mathbb{R} \). The condition \( f \in C^2(M) \) is necessary for the validity of the characteristics (i), (ii), and (iii) for the uniform convexity of \( f \).&lt;/p&gt;
&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution a)&lt;/summary&gt;
 
 Wrong, a uniformly convex function is always strictly convex, but not the other way around.
 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution b)&lt;/summary&gt;
 
 Incorrect. Although the characteristics (i), (ii), and (iii) are equivalent, for the first two characteristics, the assumption \( f \in C^1(M) \) is sufficient, i.e., \( f \) only needs to be continuously differentiable.
 
&lt;/details&gt;


&lt;h3 id="problem-35"&gt;Problem 35&lt;/h3&gt;
&lt;p&gt;Are the following statements true or false? Justify briefly.&lt;/p&gt;
&lt;p&gt;(a) A set \( M \subset \mathbb{R}^n \) is called convex if, for all \( x, y \in M \) and \( \lambda \in \mathbb{R} \), it holds that \( x + \lambda(y - x) \in M \).&lt;/p&gt;
&lt;p&gt;(b) The convex hull \( \text{conv}(M) \) is the smallest convex set containing \( M \), i.e., \( M \subset \text{conv}(M) \).&lt;/p&gt;
&lt;p&gt;(c) Let \( M \) be a non-empty, closed, and convex set, and \( x, y \in M \) be the boundary points of this set, such that \( M = \{ z = \lambda x + (1-\lambda)y, \lambda \in [0, 1] \} \). According to the projection theorem, \( \hat{x} \in M \) is precisely the orthogonal projection of a point \( z \in \mathbb{R}^n \) onto the set \( M \), if \( (z - \hat{x})^\top(\hat{x} - y) = 0 \).&lt;/p&gt;
&lt;p&gt;(d) Linear programs with \( M_N = \{ x \in \mathbb{R}^n_0 : Ax = b \} \) are feasible if and only if \( b \) lies outside the convex cone hull of \( A \).&lt;/p&gt;
&lt;p&gt;(e) If \( M \) is a convex, closed cone, then \( \gamma \) cannot be set to 0 according to the separation theorem, because this would lead to a contradiction.&lt;/p&gt;
&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution a)&lt;/summary&gt;
 
 Incorrect. The concept of convexity is limited to \( \lambda \in [0, 1] \), meaning that a set \( M \) is called convex if for any \( x, y \in M \), all points on the line segment connecting them also lie within \( M \). Points outside this line segment, where \( \lambda &lt; 0 \) or \( \lambda &gt; 1 \), are not relevant for the concept of convexity.
 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution b)&lt;/summary&gt;
 
 Correct. First, it is obviously true that \( M \subseteq \text{conv}(M) \), regardless of whether \( M \) is convex or not. Now, if \( M \) is convex and \( M \subseteq K \subseteq \mathbb{R}^n \) with \( K \) being a convex set, it follows from Lemma in the lecture notes that all convex combinations of elements from \( M \) also lie within \( K \). Hence, \( \text{conv}(M) \subseteq K \). The convex hull is thus the smallest convex set that fully contains \( M \).
 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution c)&lt;/summary&gt;
 
 Correct. The dot product of the vectors \( (z - \hat{x}) \) and \( (\tilde{x} - \hat{x}) \) is zero if and only if the two vectors are orthogonal to each other. In that case, \( \hat{x} \) is the orthogonal projection of \( z \) onto the set \( M \).
 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution d)&lt;/summary&gt;
 
 Incorrect. If \( b \) lies outside the convex cone hull of the columns of \( A \), then no vector \( x \in \mathbb{R}^n_{\geq 0} \) satisfies \( \sum_{i=1}^{n} a_i^* x_i = b \). Therefore, the right-hand side \( b \) must lie within the convex cone hull.
 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution e)&lt;/summary&gt;
 
 Incorrect. If \( M \) is a convex, closed cone, then \( 0 \in M \), and we have \( 0 = a^T 0 \leq a^T \hat{x} = \gamma &lt; a^T x \). A contradiction arises only if there exists a \( y \in M \) with \( a^T y &gt; 0 \), since from the properties of the cone, we get \( \gamma \geq \lambda a^T y \to \infty \) as \( \lambda \to \infty \). Therefore, it is possible to set \( \hat{x} = 0 \) with \( \gamma = 0 \).
 
&lt;/details&gt;


&lt;h3 id="problem-36"&gt;Problem 36&lt;/h3&gt;
&lt;p&gt;Are the following statements true or false? Justify briefly.&lt;/p&gt;
&lt;p&gt;(a) A problem is always dual to itself.&lt;/p&gt;
&lt;p&gt;(b) The computational effort for the Simplex method is polynomial.&lt;/p&gt;
&lt;p&gt;(c) Every matrix game has optimal strategies.&lt;/p&gt;
&lt;p&gt;(d) At the optimum of a matrix game, both players have the same payoff.&lt;/p&gt;
&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution a)&lt;/summary&gt;
 
 False, an absolute exception case, but it holds for example for skew-symmetric problems.
 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution b)&lt;/summary&gt;
 
 False, in the worst case, \(2^n\) vertices must be traversed. However, in many cases, the effort is lower, and on average, it is even polynomial
 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution c)&lt;/summary&gt;
 
 True, the fundamental theorem on matrix games.
 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution d)&lt;/summary&gt;
 
 False, in the optimum, we have \( \min(P_1) = \hat{y}^T A \hat{x} = \max(P_2) \), but not \( \hat{y}^T A \hat{x} = 0 \). In this case, neither player would pay anything to the other, meaning both would have the same payoff, and the game would be considered fair.
 
&lt;/details&gt;


&lt;h3 id="problem-37"&gt;Problem 37&lt;/h3&gt;
&lt;p&gt;Are the following statements true or false? Justify briefly.&lt;/p&gt;
&lt;p&gt;(a) If the objective function value in Phase I of the Simplex method is not equal to 0, then the original problem has no feasible solution.&lt;/p&gt;
&lt;p&gt;(b) If the primal problem is feasible, then the dual problem is also feasible.&lt;/p&gt;
&lt;p&gt;(c) The maximal point of the dual problem corresponds to the minimal point of the primal problem.&lt;/p&gt;
&lt;p&gt;(d) Every problem \((P_N)\) in standard form can be uniquely associated with a dual problem \((D_N)\).&lt;/p&gt;
&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution a)&lt;/summary&gt;
 
 True, because the objective function \( e^T (b_N - A_N x) \) represents the distance to the feasible set.
 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution b)&lt;/summary&gt;
 
 False, it is possible that one of the problems is feasible and the other is not. In this case, the feasible problem is unbounded (Strong Duality Theorem). However, if both problems are feasible, we also know that both are solvable.
 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution c)&lt;/summary&gt;
 
 False, at the optimum, \( b^T y = c^T x \), but \( x \neq y \).
 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution d)&lt;/summary&gt;
 
 True, the dual problem is directly derived from the primal problem by definition.
 
&lt;/details&gt;


&lt;h3 id="problem-38"&gt;Problem 38&lt;/h3&gt;
&lt;p&gt;Are the following statements correct or incorrect? Justify briefly.&lt;/p&gt;
&lt;p&gt;(a) In Phase II of the Simplex method, each step leads to a decrease in the objective function value.&lt;/p&gt;
&lt;p&gt;(b) Degenerate solutions always lead to a cycle.&lt;/p&gt;
&lt;p&gt;(c) The Bland&amp;rsquo;s rule stops at an optimum of the problem (P) or results in f(P) = -∞.&lt;/p&gt;
&lt;p&gt;(d) If the Bland&amp;rsquo;s rule is modified so that the column index with the smallest cost entry \(c_j &lt; 0\) is always chosen, it is not guaranteed that the algorithm will stop after a finite number of steps.&lt;/p&gt;
&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution a)&lt;/summary&gt;
 
 &lt;strong&gt;Incorrect&lt;/strong&gt;, this is only true when a non-degenerate basic solution is present, i.e., all \(b_i &gt; 0\).
 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution b)&lt;/summary&gt;
 
 &lt;strong&gt;Incorrect&lt;/strong&gt;, degenerate solutions can lead to a cycle, but they do not necessarily have to.
 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution c)&lt;/summary&gt;
 
 Correct.
 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution d)&lt;/summary&gt;
 
 Correct.
 
&lt;/details&gt;


&lt;h3 id="problem-39"&gt;Problem 39&lt;/h3&gt;
&lt;p&gt;Are the following statements true or false? Justify briefly.&lt;/p&gt;
&lt;p&gt;(a) If a feasible linear problem \( P_N \) is solvable, then a corner of \( M_N \neq \emptyset \) is the unique solution.&lt;/p&gt;
&lt;p&gt;(b) Solutions found by the Simplex method are always corners.&lt;/p&gt;
&lt;p&gt;(c) If the feasible set \( M_N \) of a linear problem is non-empty and contains a corner, then it also contains infinitely many corners.&lt;/p&gt;
&lt;p&gt;(d) If an optimization problem has an optimal solution, it will be found by the Simplex method.&lt;/p&gt;
&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution a)&lt;/summary&gt;
 
 False, there exists only one corner \( z \in \arg \min(P_N) \), but it does not have to be unique (for example, an entire face of the polyhedron could be optimal).
 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution b)&lt;/summary&gt;
 
 True.
 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution c)&lt;/summary&gt;
 
 False, the set, if it is not empty, has at least one and at most finitely many corners.
 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution d)&lt;/summary&gt;
 
 False, for nonlinear (and thus unspecified) optimization problems, the optima do not necessarily lie at the corners of the feasible set, or there may be no corners at all. True, for linear optimization problems, provided there is an appropriate pivot strategy (without it, the method can get stuck in a cycle).
 
&lt;/details&gt;


&lt;h3 id="problem-40"&gt;Problem 40&lt;/h3&gt;
&lt;p&gt;Are the following statements true or false? Justify briefly.&lt;/p&gt;
&lt;p&gt;(a) Every optimization problem (P) can be rewritten into an equivalent problem \(P_N\) in standard form.&lt;/p&gt;
&lt;p&gt;(b) The two linear problems&lt;/p&gt;
\[
(P) \quad \text{min } c^T x \quad \text{subject to } x \in M_N, \quad M_N = \{x \in \mathbb{R}^n : Ax = b, \, x \geq 0\}
\]\[
(\overline{P}) \quad \text{min } c^T x + c_0 \quad \text{subject to } x \in M_N, \quad M_N = \{x \in \mathbb{R}^n : Ax = b, \, x \geq 0\}
\]&lt;p&gt;are equivalent for \( c_0 \in \mathbb{R} \).&lt;/p&gt;
&lt;p&gt;(c) The set \( M_N \) in the standard form of a linear optimization problem is always convex.&lt;/p&gt;
&lt;p&gt;(d) If the polyhedron \( M = \{x \in \mathbb{R}^n : Ax \leq b\} \) has vertices and is not empty, then it is free of lines (i.e., there is no line that lies completely within \( M \)).&lt;/p&gt;
&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution a)&lt;/summary&gt;
 
 Wrong, only linear problems.
 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution b)&lt;/summary&gt;
 
 &lt;strong&gt;True&lt;/strong&gt;, because the constant \( c_0 \) only shifts the values of the objective function affine, but does not change the optimal solutions of the problems*
 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution c)&lt;/summary&gt;
 
 &lt;p&gt;&lt;strong&gt;True&lt;/strong&gt;, because for \( x, y \in M_N = \{ x \in \mathbb{R}^n : Ax = b \} \) and \( \lambda \in [0, 1] \), we have:&lt;/p&gt;
\[
(1 - \lambda) x + \lambda y \geq 0
\]&lt;p&gt;and&lt;/p&gt;
\[
A((1 - \lambda)x + \lambda y) = (1 - \lambda) A x + \lambda A y = (1 - \lambda) b + \lambda b = b.
\]
 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution d)&lt;/summary&gt;
 
 Correct.
 
&lt;/details&gt;


&lt;h3 id="problem-41"&gt;Problem 41&lt;/h3&gt;
&lt;p&gt;The function \( f: \mathbb{R}^2 \to \mathbb{R} \) and the set \( M \subset \mathbb{R}^2 \) are given by:&lt;/p&gt;
\[
f(x,y) = x + y, \quad (x,y) \in \mathbb{R}^2, 
\]\[
M = \{(x,y) \in \mathbb{R}^2 \mid x^2 + e^y \leq 3\}.
\]&lt;p&gt;Determine all local minimum and maximum points of \( f \) on \( M \).&lt;/p&gt;
&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution&lt;/summary&gt;
 
 &lt;p&gt;The function \( f(x, y) \) and the constraint function \( g(x, y) = x^2 + e^y - 3 \) are convex, so this is a convex optimization problem.&lt;/p&gt;
&lt;p&gt;Slater&amp;rsquo;s condition is satisfied since \( g(0,0) &lt; 0 \).&lt;/p&gt;
&lt;p&gt;Now, we define the Lagrangian function:&lt;/p&gt;
\[
L(x, y, u) = x + y + u(x^2 + e^y - 3)
\]&lt;p&gt;The necessary conditions for the KKT points are:&lt;/p&gt;
\[
\begin{aligned}
0 &amp;= \nabla_x f = 1 + 2ux, \\
0 &amp;= \nabla_y f = 1 + ue^y, \\
0 &amp;= u(x^2 + e^y - 3).
\end{aligned}
\]&lt;p&gt;From (1), we obtain \( x = -\frac{1}{2u} \), and from (2), \( y = \ln(-\frac{1}{u}) \), which implies \( u &lt; 0 \). However, since \( u \) must be \( u \geq 0 \), no KKT points exist, meaning there is no maximum for \(F\) or minimum for \( f \).&lt;/p&gt;
&lt;p&gt;Substituting into (3) results in:&lt;/p&gt;
\[
0 = 12u^2 + 4u - 1.
\]&lt;p&gt;Using the quadratic formula:&lt;/p&gt;
\[
u = \frac{-4 \pm \sqrt{16 - 4 \cdot 12 \cdot (-1)}}{24}
= \frac{-4 \pm \sqrt{16 + 48}}{24}
= \frac{-4 \pm 8}{24}.
\]&lt;p&gt;This gives the two solutions:&lt;/p&gt;
\[
u_1 = \frac{4}{24} = \frac{1}{6}, \quad u_2 = \frac{-12}{24} = -\frac{1}{2}.
\]&lt;p&gt;For \( u_2 \), we get \( x_2 = 2 \), and with \( y = \ln(-1/2) \), this is not a valid point.&lt;/p&gt;
&lt;p&gt;For \( u_1 \), we obtain \( x = -3 \) and \( y = \ln(1/3) \), which is an extremal point of \( f \).&lt;/p&gt;
&lt;p&gt;Since \( M \) is bounded above and closed, the set \( M' = \{(x, y) \in M \mid f(x, y) &gt; 0\} \) is compact. Since \( f \) is continuous, there must be a maximum of \( f \) at \( (-3, \ln(1/3)) \).&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Warning:&lt;/strong&gt; There is a miscalculation here—the correct solution should be \( (1, \ln(2)) \), but the general principle is correct.&lt;/p&gt;

 
&lt;/details&gt;


&lt;h3 id="problem-42"&gt;Problem 42&lt;/h3&gt;
&lt;p&gt;Consider the following linear optimization problem:&lt;/p&gt;
\[
\min \ f(x) = 16x_1 + 6x_2 + 8x_3 + x_4
\]&lt;p&gt;subject to the constraints&lt;/p&gt;
\[
x_1 + 3x_2 + x_3 + 2x_4 = 1
\]\[
4x_1 - 2x_2 + x_3 - 3x_4 = 1
\]&lt;p&gt;and&lt;/p&gt;
\[
x_j \geq 0, \quad \text{for } j = 1,2,3,4.
\]&lt;p&gt;(a) Formulate the dual problem and solve it graphically.&lt;/p&gt;
&lt;p&gt;(b) Determine a solution for the primal problem.&lt;/p&gt;
&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution a)&lt;/summary&gt;
 
 &lt;p&gt;The dual problem is given by&lt;/p&gt;
$$
(D) \quad \max \ y_1 + y_2 
$$&lt;p&gt;subject to&lt;/p&gt;
$$
y_1 + 4y_2 \leq 16 \\
3y_1 - 2y_2 \leq 6 \\
y_1 + y_3 \leq 8 \\
2y_1 - 3y_4 \leq 1
$$&lt;p&gt;We plot the inequalities:&lt;/p&gt;
&lt;figure&gt;
 &lt;img style="display: block; margin-left: auto; margin-right: auto; width:60%" src="https://monkemanx.github.io/attachments/ws14_task_3.jpg"&gt;
&lt;/figure&gt;
&lt;p&gt;This gives us the solution \( (4,3) \) for the dual problem, with \( F(4,3) = 7 \).&lt;/p&gt;

 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution b)&lt;/summary&gt;
 
 &lt;p&gt;By the strong duality theorem, we have:&lt;/p&gt;
\[
\min(P) = \max(D) = 7
\]&lt;p&gt;Thus,&lt;/p&gt;
\[
c^T x^* = b^T y^* = 7.
\]&lt;p&gt;Furthermore, the equilibrium condition holds:&lt;/p&gt;
\[
(c + A^T y^*)^T x^* = 0.
\]&lt;p&gt;From this, we obtain \( x_3^* = x_4^* = 0 \). Using these values, we can determine \( x_1^* \) and \( x_2^* \) by solving the system of equations.&lt;/p&gt;
&lt;p&gt;The resulting solution is:&lt;/p&gt;
\[
\frac{1}{14} (5, 3, 0, 0).
\]
 
&lt;/details&gt;


&lt;h3 id="problem-43"&gt;Problem 43&lt;/h3&gt;
&lt;p&gt;Let \( K = \text{cone} \{ x^{(1)}, \dots, x^{(m)} \} \subset \mathbb{R}^n \) be a finitely generated convex cone. Then the &lt;strong&gt;polar cone&lt;/strong&gt; of \( K \) is defined as&lt;/p&gt;
\[
K^P = \{ y \in \mathbb{R}^n : y^\top x \leq 0 \text{ for all } x \in K \}.
\]&lt;p&gt;&lt;strong&gt;(a)&lt;/strong&gt;
Visualize the polar cone in the case \( n = 2 \) with the vectors&lt;/p&gt;
\[
x^{(1)} = \begin{pmatrix} 2 \\ 1 \end{pmatrix}, \quad
x^{(2)} = \begin{pmatrix} 1 \\ 3 \end{pmatrix}.
\]&lt;p&gt;&lt;strong&gt;(b)&lt;/strong&gt;
Show that&lt;/p&gt;
\[
K^P = \{ y \in \mathbb{R}^n : y^\top x^{(i)} \leq 0 \text{ for } i = 1, \dots, m \}.
\]&lt;p&gt;&lt;strong&gt;(c)&lt;/strong&gt;
Prove that&lt;/p&gt;
\[
(K^P)^P = K.
\]&lt;p&gt;&lt;strong&gt;Hint:&lt;/strong&gt; Use Farkas&amp;rsquo; Lemma.&lt;/p&gt;
&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution a)&lt;/summary&gt;
 
 &lt;figure&gt;
 &lt;img style="display: block; margin-left: auto; margin-right: auto; width:70%" src="https://monkemanx.github.io/attachments/polar_cone.png"&gt;
&lt;/figure&gt;

 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution b)&lt;/summary&gt;
 
 &lt;p&gt;&amp;ldquo;\( \subseteq \)&amp;rdquo;&lt;/p&gt;
&lt;p&gt;By the definition of the polar cone, we have:&lt;/p&gt;
\[
K^P = \{ y \in \mathbb{R}^n \mid y^\top x \leq 0 \text{ for all } x \in K \}.
\]&lt;p&gt;Since \( K = \text{cone} \{ x^{(1)}, \dots, x^{(m)} \} \), every element \( x \in K \) can be written as:&lt;/p&gt;
\[
x = \sum_{i=1}^{m} \lambda_i x^{(i)}, \quad \lambda_i \geq 0.
\]&lt;p&gt;Thus, if \( y \in K^P \), then for all such \( x \):&lt;/p&gt;
\[
y^\top x = y^\top \left( \sum_{i=1}^{m} \lambda_i x^{(i)} \right) = \sum_{i=1}^{m} \lambda_i (y^\top x^{(i)}) \leq 0.
\]&lt;p&gt;Since \( \lambda_i \geq 0 \), this implies \( y^\top x^{(i)} \leq 0 \) for all \( i \), proving:&lt;/p&gt;
\[
y \in \{ y \in \mathbb{R}^n \mid y^\top x^{(i)} \leq 0 \text{ for } i=1, \dots, m \}.
\]&lt;p&gt;&amp;ldquo;\( \supseteq \)&amp;rdquo;&lt;/p&gt;
&lt;p&gt;Now, assume \( y \in \mathbb{R}^n \) satisfies:&lt;/p&gt;
\[
y^\top x^{(i)} \leq 0 \quad \text{for all } i=1, \dots, m.
\]&lt;p&gt;For any \( x \in K \), we write \( x \) as a conic combination:&lt;/p&gt;
\[
x = \sum_{i=1}^{m} \lambda_i x^{(i)}, \quad \lambda_i \geq 0.
\]&lt;p&gt;Applying the given inequality:&lt;/p&gt;
\[
y^\top x = y^\top \left( \sum_{i=1}^{m} \lambda_i x^{(i)} \right) = \sum_{i=1}^{m} \lambda_i (y^\top x^{(i)}).
\]&lt;p&gt;Since each \( \lambda_i \geq 0 \) and \( y^\top x^{(i)} \leq 0 \), it follows that:&lt;/p&gt;
\[
y^\top x \leq 0 \quad \forall x \in K.
\]&lt;p&gt;Thus, \( y \in K^P \), completing the proof.&lt;/p&gt;

 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution c)&lt;/summary&gt;
 
 &lt;p&gt;&lt;strong&gt;Remember: Statement of Farkas&amp;rsquo; Lemma&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Farkas&amp;rsquo; Lemma states that for a matrix \( A \), exactly one of the following holds for any \( x \in \mathbb{R}^n \):&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;\( \exists \lambda \in \mathbb{R}^m, \lambda \geq 0 \) such that \( A \lambda = x \), or&lt;/li&gt;
&lt;li&gt;\( \exists y \in \mathbb{R}^n \) such that \( y^\top x \geq 0 \) and \( A^\top y \leq 0 \).&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Let \( x \in K \):&lt;/p&gt;
\[
\begin{aligned}
x \in K 
&amp;\iff \exists \lambda_i \geq 0 \text{ such that } x = \sum_{i=1}^{m} \lambda_i x^{(i)} \\ 
&amp;\iff \exists \lambda \geq 0 \text{ such that } A \lambda = x, \text{ where } A = \begin{bmatrix} x^{(1)} &amp; x^{(2)} &amp; \dots &amp; x^{(m)} \end{bmatrix} \\ 
&amp;\iff \forall y \in \mathbb{R}^n, \quad y^\top x \leq 0 \quad \text{(by Farkas' Lemma)} \\ 
&amp;\iff \forall y \in K^P, \quad y^\top x \leq 0 \\ 
&amp;\iff x \in (K^P)^P.
\end{aligned}
\]&lt;p&gt;Thus, we conclude that \( (K^P)^P = K \).&lt;/p&gt;

 
&lt;/details&gt;


&lt;h3 id="problem-44"&gt;Problem 44&lt;/h3&gt;
&lt;p&gt;Consider the extended version of the Rock-Paper-Scissors game that includes &lt;strong&gt;Lizard&lt;/strong&gt; and &lt;strong&gt;Spock&lt;/strong&gt;, with the following rules:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Scissors&lt;/strong&gt; beats &lt;strong&gt;Paper&lt;/strong&gt; and &lt;strong&gt;Lizard&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Rock&lt;/strong&gt; beats &lt;strong&gt;Scissors&lt;/strong&gt; and &lt;strong&gt;Lizard&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Paper&lt;/strong&gt; beats &lt;strong&gt;Rock&lt;/strong&gt; and &lt;strong&gt;Spock&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Spock&lt;/strong&gt; beats &lt;strong&gt;Scissors&lt;/strong&gt; and &lt;strong&gt;Rock&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Lizard&lt;/strong&gt; beats &lt;strong&gt;Paper&lt;/strong&gt; and &lt;strong&gt;Spock&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;(a)&lt;/strong&gt; Construct the &lt;strong&gt;payoff matrix&lt;/strong&gt; for this &lt;strong&gt;two-player&lt;/strong&gt; matrix game, where a &lt;strong&gt;loss incurs a cost of 1&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;(&lt;em&gt;Reminder: A matrix entry represents the payoff for Player 1 and Player 2.&lt;/em&gt;)&lt;/p&gt;
&lt;p&gt;Is the game &lt;em&gt;fair&lt;/em&gt;?&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;(b)&lt;/strong&gt; Show that the &lt;strong&gt;uniformly distributed strategies&lt;/strong&gt;&lt;/p&gt;
\[
x^* = \begin{pmatrix} \frac{1}{5}, \frac{1}{5}, \frac{1}{5}, \frac{1}{5}, \frac{1}{5} \end{pmatrix}^T = y^*
\]&lt;p&gt;for Player 1 and Player 2 form a &lt;em&gt;saddle point&lt;/em&gt; \((x^*, y^*)\).&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;(c)&lt;/strong&gt; Are there &lt;em&gt;optimal pure strategies&lt;/em&gt; for either Player 1 or Player 2?&lt;/p&gt;
&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution a)&lt;/summary&gt;
 
 &lt;p&gt;The &lt;strong&gt;payoff matrix&lt;/strong&gt; \( A \) is &lt;strong&gt;skew-symmetric&lt;/strong&gt;, meaning:&lt;/p&gt;
\[
A^\top = -A.
\]&lt;p&gt;Since in a &lt;strong&gt;two-player zero-sum game&lt;/strong&gt;, skew-symmetry implies that the expected payoff is always &lt;strong&gt;zero&lt;/strong&gt; for optimal mixed strategies, the game is &lt;strong&gt;fair&lt;/strong&gt;.&lt;/p&gt;

 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution b)&lt;/summary&gt;
 
 &lt;p&gt;We need to show that \( (x^*, y^*) \) is a &lt;strong&gt;saddle point&lt;/strong&gt; for the function:&lt;/p&gt;
\[
\phi(x, y) = y^\top A x, \quad \forall x, y \geq 0.
\]&lt;p&gt;That is, we must verify:&lt;/p&gt;
\[
\phi(x^*, y) \leq \phi(x^*, y^*) \leq \phi(x, y^*), \quad \forall x, y.
\]&lt;p&gt;Since the &lt;strong&gt;rows and columns of \( A \) sum to zero&lt;/strong&gt;, we have:&lt;/p&gt;
\[
(y^*)^\top A = 0^\top, \quad Ax^* = 0.
\]&lt;p&gt;This means:&lt;/p&gt;
\[
\phi(x^*, y) = y^\top A x^* = 0, \quad \text{and} \quad \phi(x, y^*) = (y^*)^\top A x = 0.
\]&lt;p&gt;Thus, the &lt;strong&gt;saddle point equation holds&lt;/strong&gt;, proving that \( (x^*, y^*) \) is indeed a saddle point.&lt;/p&gt;

 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution c)&lt;/summary&gt;
 
 &lt;p&gt;We show that &lt;strong&gt;no pure strategy&lt;/strong&gt; is optimal for either player.&lt;/p&gt;
&lt;p&gt;Suppose &lt;strong&gt;Player 1&lt;/strong&gt; chooses a pure strategy indexed by \( p \) (\( p \in \{1, \dots, 5\} \)).&lt;br&gt;
Then &lt;strong&gt;Player 2&lt;/strong&gt; can always find a &lt;strong&gt;pure counter-strategy&lt;/strong&gt; \( q = q(p) \) such that:&lt;/p&gt;
\[
 A_{p, q} = 1.
 \]&lt;p&gt;The same reasoning holds in reverse: &lt;strong&gt;Player 2&lt;/strong&gt; choosing a pure strategy allows &lt;strong&gt;Player 1&lt;/strong&gt; to counter with a pure strategy ensuring a win.&lt;/p&gt;
&lt;p&gt;Since both players can always counter any pure strategy of their opponent, &lt;strong&gt;no pure strategy is optimal&lt;/strong&gt;.&lt;/p&gt;

 
&lt;/details&gt;


&lt;h3 id="problem-45"&gt;Problem 45&lt;/h3&gt;
&lt;p&gt;Max and Mara want to camp in a Swedish national park. Mara prefers warmer locations, while Max prefers cooler ones, making it difficult to choose the right spot. The park contains \( m \in \mathbb{N} \) trails running &lt;strong&gt;east-west&lt;/strong&gt; and \( n \in \mathbb{N} \) streams running &lt;strong&gt;north-south&lt;/strong&gt;. They decide to camp at a &lt;strong&gt;ford&lt;/strong&gt;, and as a compromise, Mara gets to choose the &lt;strong&gt;trail&lt;/strong&gt;, while Max gets to choose the &lt;strong&gt;stream&lt;/strong&gt;. Additionally, they have access to a park guide that provides the &lt;strong&gt;average annual temperatures (in °C) at each ford&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;(a)&lt;/strong&gt; Formulate this situation as a two-person matrix game.
Mara aims to camp at a location with the &lt;strong&gt;highest possible average temperature&lt;/strong&gt;, while Max tries to camp at a location with the *&lt;em&gt;lowest possible average temperature&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;(b)&lt;/strong&gt; Consider what would generally be interpreted as a fair outcome of this matrix game for a given &amp;ldquo;temperature matrix&amp;rdquo;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;(c)&lt;/strong&gt; Consider the following example for \( m = n = 4 \), where the average annual temperatures at the fords are given in Table 1. Show that this results in a &lt;strong&gt;saddle-point game&lt;/strong&gt;. Determine the corresponding pure optimal strategies and indicate where Mara and Max will camp if they follow these strategies.&lt;/p&gt;
\[
\begin{array}{c|cccc}
\text{Trail} \backslash \text{Stream} &amp; \text{Forellenbach} &amp; \text{Froschbach} &amp; \text{Moskitobach} &amp; \text{Lachsbach} \\
\hline
\text{Hasenweg} &amp; -0.6 &amp; -2.6 &amp; -1.6 &amp; -0.6 \\
\text{Fuchsweg} &amp; -1.6 &amp; 1.4 &amp; -0.6 &amp; 3.4 \\
\text{Elchweg} &amp; -1.6 &amp; 5.0 &amp; -2.6 &amp; -1.6 \\
\text{Hirschweg} &amp; 1.4 &amp; 3.4 &amp; -0.6 &amp; -0.6 \\
\end{array}
\]&lt;p&gt;&lt;strong&gt;Table 1:&lt;/strong&gt; Average annual temperatures at the fords (in °C).&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;(d)&lt;/strong&gt; Verify whether the matrix game from (c) is fair in the sense of part (b).&lt;/p&gt;
&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution a)&lt;/summary&gt;
 
 &lt;p&gt;Let &lt;strong&gt;Max be Player 1&lt;/strong&gt; and &lt;strong&gt;Mara be Player 2&lt;/strong&gt;, and let the &lt;strong&gt;payoff matrix&lt;/strong&gt; \( A = (a_{ij}) \) represent the temperature at the intersection of the \(i\)-th trail and the \(j\)-th stream.&lt;/p&gt;
&lt;p&gt;Max wants to &lt;strong&gt;minimize&lt;/strong&gt; the maximum temperature across all streams, so the objective is:&lt;/p&gt;
\[
\text{minimize } \max_{y \geq 0} \, y^\top A x, \quad x \geq 0, \, e^\top x = 1
\]&lt;p&gt;Mara, on the other hand, wants to &lt;strong&gt;maximize&lt;/strong&gt; the minimum temperature across all trails, so the objective is:&lt;/p&gt;
\[
\text{maximize } \min_{x \geq 0} \, y^\top A x, \quad y \geq 0, \, e^\top y = 1
\]
 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution b)&lt;/summary&gt;
 
 &lt;p&gt;One could calculate the &lt;strong&gt;mean&lt;/strong&gt; or &lt;strong&gt;median&lt;/strong&gt; of the temperatures (from the matrix) as a fair outcome for the matrix game:&lt;/p&gt;
\[
(y^*)^\top A x^* = \bar{a} = \frac{1}{nm} \sum a_j
\]&lt;p&gt;Where \( \bar{a} \) represents the average temperature, and the sum \( \sum a_j \) is taken over all elements in the matrix \( A \).&lt;/p&gt;

 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution c)&lt;/summary&gt;
 
 &lt;p&gt;&lt;strong&gt;Saddle-Point Game:&lt;/strong&gt; A game with payoff matrix \( A \) is called a &lt;strong&gt;saddle-point game&lt;/strong&gt; if the smallest maximum column entry and the largest minimum row entry coincide. For every saddle-point game, there are optimal pure strategies \( x^* = e_j \) and \( y^* = e_i \) (see Theorem 4.12).&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Verification of the criterion:&lt;/strong&gt;
&lt;/p&gt;
\[
\min_j \max_i a_{ij} = \min_j \{1.4, 5, -0.6, 3.4\} = -0.6
\]&lt;p&gt;
&lt;/p&gt;
\[
\max_i \min_j a_{ij} = \max_i \{-2.6, -1.6, -2.6, -0.6\} = -0.6
\]&lt;p&gt;
This shows that it is indeed a &lt;strong&gt;saddle-point game&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;By &lt;strong&gt;Theorem 4.12&lt;/strong&gt;, Player 1 should choose the column \( j_0 \) where the maximum is minimized, and similarly for Player 2:
&lt;/p&gt;
\[
j_0 = \arg \min \max a_{ij} = 3
\]&lt;p&gt;
&lt;/p&gt;
\[
i_0 = \arg \min \min a_{ij} = 4
\]&lt;p&gt;Thus, the optimal strategies are \( x^* = e_3 \) and \( y^* = e_4 \). Therefore, &lt;strong&gt;Mara and Max should camp at the ford &amp;ldquo;Hirschung/Moskitobach.&amp;rdquo;&lt;/strong&gt;&lt;/p&gt;

 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution d)&lt;/summary&gt;
 
 The resulting &lt;strong&gt;annual average temperature&lt;/strong&gt; at the destination is \( -0.6^\circ \) Celsius. Since for this matrix, \( 0 = \bar{a} \neq 0.6 \), the matrix game is &lt;strong&gt;not fair&lt;/strong&gt; in terms of the mean value.
 
&lt;/details&gt;


&lt;h3 id="problem-46"&gt;Problem 46&lt;/h3&gt;
&lt;p&gt;Let \( A \in \mathbb{R}^{m \times n} \), \( b \in \mathbb{R}^m \), and the polyhedron \( M = \{ x \in \mathbb{R}^n : Ax \leq b \} \) be non-empty. We are looking for the radius \( r \geq 0 \) and the center \( z \in \mathbb{R}^n \) such that the ball \( B_r(z) \) lies entirely within \( M \) and has the largest possible radius.&lt;/p&gt;
&lt;p&gt;We want to show that this problem is equivalent to the following linear program:&lt;/p&gt;
\[
\text{Maximize } r \quad \text{subject to} \quad a_k^\top z + |a_k| r \leq b_k, \quad k = 1, \dots, m,
\]&lt;p&gt;
where \( a_k^\top \) denotes the \( k \)-th row of the matrix \( A \).&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Hint:&lt;/strong&gt; Inner products can be estimated using the &lt;strong&gt;Cauchy-Schwarz inequality&lt;/strong&gt;.&lt;/p&gt;
&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution&lt;/summary&gt;
 
 &lt;p&gt;We consider the problem:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Maximize&lt;/strong&gt; \( r \) subject to \( B_r(z) \subset M = \{x : Ax \leq b\} \).&lt;/p&gt;
&lt;p&gt;We now rewrite the constraints as follows:&lt;/p&gt;
\[
B_r(z) \subset M \iff Ax \leq b \quad \forall x \in \mathbb{R}^n : |x - z| \leq r
\]&lt;p&gt;
&lt;/p&gt;
\[
\iff a_k^\top x \leq b_k \quad \forall x : |x - z| \leq r
\]&lt;p&gt;
&lt;/p&gt;
\[
\iff a_k^\top (y + z) \leq b_k \quad \forall y : |y| \leq r \quad (y := x - z, \, x := y + z)
\]&lt;p&gt;
&lt;/p&gt;
\[
\iff a_k^\top z + a_k^\top y \leq b_k \quad \forall y : |y| \leq r
\]&lt;p&gt;
&lt;/p&gt;
\[
\iff a_k^\top z + \max\{ a_k^\top y : |y| \leq r \} \leq b_k
\]&lt;p&gt;Since \( a_k^\top y \leq |a_k| |y| \) and equality holds for \( y = a_k \frac{|y|}{|a_k|} \), we obtain:&lt;/p&gt;
\[
B_r(z) \subset M \iff a_k^\top z + \max\{|a_k| |y| : |y| \leq r\} \leq b_k
\]&lt;p&gt;
&lt;/p&gt;
\[
\iff a_k^\top z + |a_k| r \leq b_k
\]
 
&lt;/details&gt;


&lt;h3 id="problem-47"&gt;Problem 47&lt;/h3&gt;
&lt;p&gt;Let \( M \) be the triangle bounded by the positive \( x_1 \)- and \( x_2 \)-axes, as well as the line \( x_2 = -x_1 + 1 \). Determine the radius \( r^* \geq 0 \) and the center \( x^* \in \mathbb{R}^2 \) of the largest circle that fits entirely within \( M \) using the simplex method.&lt;/p&gt;
&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution&lt;/summary&gt;
 
 &lt;p&gt;We use the result from Task 46. To calculate the triangle as a polyhedron, we have:&lt;/p&gt;
$$
M = \{ x \in \mathbb{R}^2 : A x \leq b \}
$$&lt;p&gt;
with&lt;/p&gt;
$$
A = 
\begin{pmatrix}
-1 &amp; 0 \\
0 &amp; -1 \\
1 &amp; 1 \\
\end{pmatrix}, 
\quad b = \begin{pmatrix} 0 \\ 0 \\ 1 \end{pmatrix}
$$&lt;p&gt;The minimization problem is:&lt;/p&gt;
$$
\min -r
\quad 
\begin{pmatrix}
-1 &amp; 0 &amp; 1 \\
0 &amp; -1 &amp; 1 \\
1 &amp; 1 &amp; \sqrt{2}
\end{pmatrix}
(x_1 \ x_2 \ r)^T \leq \begin{pmatrix} 0 \\ 0 \\ 1 \end{pmatrix}, \quad x_1, x_2, r \geq 0
$$&lt;p&gt;Now we can apply Phase 2 directly:&lt;/p&gt;
$$
\begin{bmatrix}
0 &amp; 0 &amp; -1 &amp; 0 &amp; 0 &amp; 0 &amp; | 0 \\
\hline
-1 &amp; 0 &amp; 1 &amp; 1 &amp; 0 &amp; 0 &amp; | 0 \\
0 &amp; -1 &amp; 1 &amp; 0 &amp; 1 &amp; 0 &amp; | 0 \\
1 &amp; 1 &amp; \sqrt{2} &amp; 0 &amp; 0 &amp; 1 &amp; | 1
\end{bmatrix}
$$&lt;p&gt;We choose the pivot \( a_{13} = 1 \).&lt;/p&gt;
&lt;p&gt;Now we can continue the Simplex algorithm.&lt;/p&gt;
&lt;p&gt;The result is:&lt;/p&gt;
$$
r^* = \frac{1}{2 + \sqrt{2}}, \quad x^* = (r^*, r^*)^T
$$
 
&lt;/details&gt;


&lt;div style="margin-bottom: 200px;"&gt;&lt;/div&gt;

&lt;h2 id="problems-with-un-confirmed-solution"&gt;Problems with Un-confirmed Solution&lt;/h2&gt;
&lt;p&gt;Problems in this section do not have an official solution, this means the provided solution could be wrong.&lt;/p&gt;
&lt;h3 id="problem-48"&gt;Problem 48&lt;/h3&gt;
&lt;p&gt;a) Show that the following sets are polyhedral&lt;/p&gt;
&lt;p&gt;(i)
&lt;/p&gt;
$$
M_1 := \{(x,y) \in \mathbb{R}^2 \ : \ max\{|x|, |y| \leq 1\}\}
$$&lt;p&gt;(ii)
&lt;/p&gt;
$$
M_2 := \{(x,y) \in \mathbb{R}^2 \ : \ |x| + |y| \leq 1\}
$$&lt;p&gt;b) For \(\alpha, \beta \in \mathbb{R}\) is the following optimization problem given:&lt;/p&gt;
$$
(P) \quad \min \ \alpha x_1 + \beta x_2 \ \ \text{under} \ \ 
\begin{bmatrix}
1 &amp; 1 \\
2 &amp; 1
\end{bmatrix}
\begin{bmatrix}
x_1 \\
x_2 
\end{bmatrix}
\begin{bmatrix}
2 \\
1
\end{bmatrix}, \ \ x_1, x_2 \geq 0
$$&lt;p&gt;(i) Formulate the dual problem (D) to (P).&lt;/p&gt;
&lt;p&gt;(ii) Investigate with the strong dualitiy lemma, if the dual prolbem (D) is solvable.&lt;/p&gt;
&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution a)&lt;/summary&gt;
 
 &lt;p&gt;(i) We can visuliaze \(M_1\) as follows&lt;/p&gt;
&lt;figure&gt;
 &lt;img style="display: block; margin-left: auto; margin-right: auto; width:50%" src="https://monkemanx.github.io/attachments/m1_set_plot.png"&gt;
&lt;/figure&gt;
&lt;p&gt;From the picture we can see that we can express the set with the following linear ineqliaities&lt;/p&gt;
$$
x \leq 1, \ x \geq -1, \ y \leq 1, \ y \geq -1
$$&lt;p&gt;Hence we can write&lt;/p&gt;
$$
M_1 = \{(x,y) \in \mathbb{R}^2 \ : \ Az = b\}
$$&lt;p&gt;with&lt;/p&gt;
$$
A =
\begin{bmatrix}
1 &amp; 0 \\
-1 &amp; 0 \\
0 &amp; 1 \\
0 &amp; -1 
\end{bmatrix}, \
b = 
\begin{bmatrix}
1 \\
1 \\
1 \\ 
1 \\ 
\end{bmatrix}, \
z = 
\begin{bmatrix}
x \\
y
\end{bmatrix}
$$&lt;p&gt;We have written \(M_1\) as an intersection of finitely many linear inequation, thus \(M_1\) is a &lt;strong&gt;polyhedral&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;(ii) We can visuliaze \(M_1\) as follows&lt;/p&gt;
&lt;figure&gt;
 &lt;img style="display: block; margin-left: auto; margin-right: auto; width:50%" src="https://monkemanx.github.io/attachments/m2_set_plot.png"&gt;
&lt;/figure&gt;
&lt;p&gt;From the picture we can see that we can express the set with the following linear ineqliaities&lt;/p&gt;
$$
x + y \leq 1, \ x - y \leq 1, \ -x + y \leq 1, \ -x - y \leq 1
$$&lt;p&gt;Hence we can write&lt;/p&gt;
$$
M_2 = \{(x,y) \in \mathbb{R}^2 \ : \ Az = b\}
$$&lt;p&gt;with&lt;/p&gt;
$$
A =
\begin{bmatrix}
1 &amp; 1 \\
1 &amp; -1 \\
-1 &amp; 1 \\
-1 &amp; -1 
\end{bmatrix}, \
b = 
\begin{bmatrix}
1 \\
1 \\
1 \\ 
1 \\ 
\end{bmatrix}, \
z = 
\begin{bmatrix}
x \\
y
\end{bmatrix}
$$&lt;p&gt;We have written \(M_2\) as an intersection of finitely many linear inequation, thus \(M_2\) is a &lt;strong&gt;polyhedral&lt;/strong&gt;.&lt;/p&gt;

 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution b)&lt;/summary&gt;
 
 &lt;p&gt;(i) The dual problem is given by&lt;/p&gt;
$$
(D) \quad \max 2x_1 + x_2 \ \ \text{under} \ \
\begin{bmatrix}
1 &amp; 2 \\
1 &amp; 1
\end{bmatrix}
\begin{bmatrix}
y_1 \\
y_2 
\end{bmatrix}
\begin{bmatrix}
\alpha \\
\beta
\end{bmatrix}
$$&lt;p&gt;(ii) We use gaussian elimination on the restriction set of (P)&lt;/p&gt;
$$
\begin{bmatrix}
1 &amp; 1 &amp; | &amp; 2 \\
2 &amp; 1 &amp; | &amp; 1
\end{bmatrix}
\rightsquigarrow
\begin{bmatrix}
1 &amp; 1 &amp; | &amp; 2 \\
1 &amp; 0 &amp; | &amp; -1
\end{bmatrix}
\implies x_1 = -1, \quad x_2 = 3
$$&lt;p&gt;Thus we know that (P) is not feasible, because of the restriction \( x_1 \geq 0\).&lt;/p&gt;
&lt;p&gt;We use gaussian elimination on the restriction set of (D)&lt;/p&gt;
$$
\begin{bmatrix}
1 &amp; 2 &amp; | &amp; \alpha \\
1 &amp; 1 &amp; | &amp; \beta
\end{bmatrix}
\rightsquigarrow
\begin{bmatrix}
0 &amp; 1 &amp; | &amp; \alpha - \beta \\
1 &amp; 1 &amp; | &amp; \beta
\end{bmatrix}
\implies y_2 = \alpha - \beta, \quad y_1 = 2 \beta - \alpha
$$&lt;p&gt;Thus (D) is feasible.&lt;/p&gt;
&lt;p&gt;Because (P) is not feasible and (D) is feasible we can use the lemma of strong duality, which gives us \(\sup(P) = +\infty\).&lt;/p&gt;

 
&lt;/details&gt;


&lt;h3 id="problem-49"&gt;Problem 49&lt;/h3&gt;
&lt;p&gt;To earn some extra money, hobby baker Michi wants to sell his homemade cakes at the local weekly market. He offers a nut cake and a chocolate cake, both made from his secret cake mix, chocolate, and nuts. His recipes for each cake are as follows:&lt;/p&gt;
$$
\begin{array}{c|c|c}
 &amp; \text{Nut Cake} &amp; \text{Chocolate Cake} \\
\hline
\text{Baking mix} &amp; 0.8 &amp; 0.8 \\
\text{Chocolate} &amp; 0.1 &amp; 0.2 \\
\text{Nuts} &amp; 0.1 &amp; - \\
\end{array}
$$&lt;p&gt;He can sell his nut cake for 6 Talers per piece and his chocolate cake for 8 Talers per piece. For the production of his cakes for the next market day, he has 100 kg of cake mix, 20 kg of chocolate, and 10 kg of nuts available. More ingredients that meet his quality standards were simply unavailable. Michi&amp;rsquo;s goal is to maximize his earnings for the next market day with the ingredients at hand.&lt;/p&gt;
&lt;p&gt;a) Formulate the problem as an optimization problem using matrices.&lt;/p&gt;
&lt;p&gt;b) Solve the problem using the simplex algorithmus. How many cakes of which type need to be sold and what amount to maximize profit?&lt;/p&gt;
&lt;p&gt;c) Draw the restrictionset from (a) and mark all basis solutions from (b).&lt;/p&gt;
&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution a)&lt;/summary&gt;
 
 &lt;p&gt;The optimizaton problem is as follows&lt;/p&gt;
$$
\min \ c^Tx \ \ \text{under} \ \ Ax \leq b, x \geq 0, x \in \mathbb{R}^2
$$&lt;p&gt;where&lt;/p&gt;
$$
c = 
\begin{bmatrix}
-6 \\
-8 
\end{bmatrix}, \
A = 
\begin{bmatrix}
0.8 &amp; 0.8 \\
0.1 &amp; 0.2 \\
0.1 &amp; 0 
\end{bmatrix}, \
b = 
\begin{bmatrix}
100 \\
20 \\
10
\end{bmatrix}
$$&lt;p&gt;where \(x_1\) is the number of nut cakes and \(x_2\) is then umber of chocolate cakes.&lt;/p&gt;

 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution b)&lt;/summary&gt;
 
 &lt;p&gt;We formulate the tabular of the simplex algorithm and introduce the slackvariables \(s_1, s_2, s_3 \geq 0\)&lt;/p&gt;
$$
T_0 : \ \
\begin{array}{ccccc|c}
-6 &amp; -8 &amp; 0 &amp; 0 &amp; 0 &amp; \gamma \\
\hline
0.8 &amp; 0.8 &amp; 1 &amp; 0 &amp; 0 &amp; 100\\
0.1 &amp; 0.2 &amp; 0 &amp; 1 &amp; 0 &amp; 20 \\
\fbox{0.1} &amp; 0 &amp; 0 &amp; 0 &amp; 1 &amp; 10 
\end{array}
$$&lt;p&gt;We have the basis solution \((x_1, x_2, s_1, s_2, s_3) = (0, 0, 100, 20, 10)\), thus we can start with phase 2 of the ismplex algorithmn.&lt;/p&gt;
$$
T_1 : \ \
\begin{array}{ccccc|c}
0 &amp; -8 &amp; 0 &amp; 0 &amp; 0 &amp; \gamma + 600 \\
\hline
0 &amp; \fbox{0.8} &amp; 1 &amp; 0 &amp; -8 &amp; 20\\
0 &amp; 0.2 &amp; 0 &amp; 1 &amp; -1 &amp; 10 \\
1 &amp; 0 &amp; 0 &amp; 0 &amp; 10 &amp; 100 
\end{array}
$$&lt;p&gt;We have the basis solution \((x_1, x_2, s_1, s_2, s_3) = (100, 0, 20, 10, 0)\).&lt;/p&gt;
$$
T_2 : \ \ 
\begin{array}{ccccc|c}
0 &amp; 0 &amp; 10 &amp; 0 &amp; -20 &amp; \gamma + 800 \\
\hline
0 &amp; 1 &amp; 1.25 &amp; 0 &amp; -10 &amp; 25 \\
0 &amp; 0 &amp; -0.25 &amp; 1 &amp; \fbox{1} &amp; 5 \\
1 &amp; 0 &amp; 0 &amp; 0 &amp; 10 &amp; 100 
\end{array}
$$&lt;p&gt;We have the basis solution \((x_1, x_2, s_1, s_2, s_3) = (100, 25, 0, 5, 0)\).&lt;/p&gt;
$$
T_3 : \ \ 
\begin{array}{ccccc|c}
0 &amp; 0 &amp; 7.5 &amp; 20 &amp; 0 &amp; \gamma + 900 \\
\hline
0 &amp; 1 &amp; -1.25 &amp; 10 &amp; 0 &amp; 75 \\
0 &amp; 0 &amp; -0.25 &amp; 1 &amp; 1 &amp; 5 \\
1 &amp; 0 &amp; 2.5 &amp; 0 &amp; 0 &amp; 50 
\end{array}
$$&lt;p&gt;Since the first row is now entirely postive we are finished with the simplex algorithm our final solution being \((x_1, x_2) = (50, 75)\) with a profit of \(f(x^*) = 900\) euro.&lt;/p&gt;

 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution c)&lt;/summary&gt;
 
 &lt;figure&gt;
 &lt;img style="display: block; margin-left: auto; margin-right: auto; width:80%" src="https://monkemanx.github.io/attachments/feasible_and_basis_solution_exam_optimization.png"&gt;
&lt;/figure&gt;
&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;
&lt;details &gt;
 &lt;summary&gt;Python code for the diagram&lt;/summary&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;div class=&amp;quot;highlight&amp;quot;&amp;gt;&amp;lt;pre tabindex=&amp;quot;0&amp;quot; class=&amp;quot;chroma&amp;quot;&amp;gt;&amp;lt;code class=&amp;quot;language-python&amp;quot; data-lang=&amp;quot;python&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;line&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;ln&amp;quot;&amp;gt; 1&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;cl&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;kn&amp;quot;&amp;gt;import&amp;lt;/span&amp;gt; &amp;lt;span class=&amp;quot;nn&amp;quot;&amp;gt;numpy&amp;lt;/span&amp;gt; &amp;lt;span class=&amp;quot;k&amp;quot;&amp;gt;as&amp;lt;/span&amp;gt; &amp;lt;span class=&amp;quot;nn&amp;quot;&amp;gt;np&amp;lt;/span&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 2&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="nn"&gt;matplotlib.pyplot&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="nn"&gt;plt&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 3&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="nn"&gt;matplotlib.lines&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;Line2D&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 4&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="nn"&gt;matplotlib.patches&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="nn"&gt;mpatches&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 5&lt;/span&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 6&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;# Define the inequality constraints&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 7&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;A&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;np&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;array&lt;/span&gt;&lt;span class="p"&gt;([[&lt;/span&gt;&lt;span class="mf"&gt;0.8&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mf"&gt;0.8&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mf"&gt;0.1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mf"&gt;0.2&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mf"&gt;0.1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;]])&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 8&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;b&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;np&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;array&lt;/span&gt;&lt;span class="p"&gt;([&lt;/span&gt;&lt;span class="mi"&gt;100&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;20&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 9&lt;/span&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;10&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;# Define x1 and x2 ranges&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;11&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;x1&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;np&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;linspace&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;150&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;300&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;12&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;x2&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;np&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;linspace&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;150&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;300&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;13&lt;/span&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;14&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;# Create a grid of (x1, x2)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;15&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;X1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;X2&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;np&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;meshgrid&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;x1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;x2&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;16&lt;/span&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;17&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;# Calculate the values of the inequalities&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;18&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;ineq1&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;A&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;&lt;em&gt;&lt;/span&gt; &lt;span class="n"&gt;X1&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="n"&gt;A&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;&lt;/em&gt;&lt;/span&gt; &lt;span class="n"&gt;X2&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="n"&gt;b&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="c1"&gt;# 0.8x1 + 0.8x2 &amp;lt;= 100&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;19&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;ineq2&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;A&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;&lt;em&gt;&lt;/span&gt; &lt;span class="n"&gt;X1&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="n"&gt;A&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;&lt;/em&gt;&lt;/span&gt; &lt;span class="n"&gt;X2&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="n"&gt;b&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="c1"&gt;# 0.1x1 + 0.2x2 &amp;lt;= 20&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;20&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;ineq3&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;A&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;&lt;em&gt;&lt;/span&gt; &lt;span class="n"&gt;X1&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="n"&gt;A&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;&lt;/em&gt;&lt;/span&gt; &lt;span class="n"&gt;X2&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="n"&gt;b&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="c1"&gt;# 0.1x1 &amp;lt;= 10&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;21&lt;/span&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;22&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;# Create the plot&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;23&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;plt&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;figure&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;figsize&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;8&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;8&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;24&lt;/span&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;25&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;# Plot the constraints using contour&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;26&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;contour1&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;plt&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;contour&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;X1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;X2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;ineq1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;levels&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt; &lt;span class="n"&gt;colors&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;'blue'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;27&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;contour2&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;plt&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;contour&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;X1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;X2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;ineq2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;levels&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt; &lt;span class="n"&gt;colors&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;'green'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;28&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;contour3&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;plt&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;contour&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;X1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;X2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;ineq3&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;levels&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt; &lt;span class="n"&gt;colors&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;'red'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;29&lt;/span&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;30&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;# Create a boolean mask for the feasible region (flip the inequalities to &amp;gt;= 0 for below the lines)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;31&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;feasible_region&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;ineq1&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;ineq2&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;ineq3&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;X1&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;X2&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;32&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;inverted_feasible_region&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="o"&gt;~&lt;/span&gt;&lt;span class="n"&gt;feasible_region&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;33&lt;/span&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;34&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;# Plot the feasible region&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;35&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;plt&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;imshow&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;inverted_feasible_region&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;astype&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;int&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt; &lt;span class="n"&gt;extent&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;x1&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;min&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt; &lt;span class="n"&gt;x1&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;max&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt; &lt;span class="n"&gt;x2&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;min&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt; &lt;span class="n"&gt;x2&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;max&lt;/span&gt;&lt;span class="p"&gt;()],&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;36&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;origin&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;'lower'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;cmap&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;'gray'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;alpha&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mf"&gt;0.3&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;aspect&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;'auto'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;37&lt;/span&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;38&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;# Setup labels and axes&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;39&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;plt&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;xlim&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;150&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;40&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;plt&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;ylim&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;150&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;41&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;plt&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;axhline&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;color&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;'black'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;linewidth&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;42&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;plt&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;axvline&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;color&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;'black'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;linewidth&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;43&lt;/span&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;44&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;# Create the white rectangle for the feasible region&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;45&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;feasible_patch&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;mpatches&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Rectangle&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;color&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;'gray'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;ec&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;'black'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;lw&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;46&lt;/span&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;47&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;# Define the legend handles&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;48&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;legend_handles&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;49&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;Line2D&lt;/span&gt;&lt;span class="p"&gt;([&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt; &lt;span class="n"&gt;color&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;'blue'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;label&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sa"&gt;r&lt;/span&gt;&lt;span class="s1"&gt;'$0.8x_1 + 0.8x_2 \leq 100$'&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;50&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;Line2D&lt;/span&gt;&lt;span class="p"&gt;([&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt; &lt;span class="n"&gt;color&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;'green'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;label&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sa"&gt;r&lt;/span&gt;&lt;span class="s1"&gt;'$0.1x_1 + 0.2x_2 \leq 20$'&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;51&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;Line2D&lt;/span&gt;&lt;span class="p"&gt;([&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt; &lt;span class="n"&gt;color&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;'red'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;label&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sa"&gt;r&lt;/span&gt;&lt;span class="s1"&gt;'$0.1x_1 \leq 10$'&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;52&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;feasible_patch&lt;/span&gt; &lt;span class="c1"&gt;# Add the white rectangle to the legend handles&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;53&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;54&lt;/span&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;55&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;# Add the legend with the text for the feasible region&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;56&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;plt&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;legend&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;handles&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;legend_handles&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;labels&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;57&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="sa"&gt;r&lt;/span&gt;&lt;span class="s1"&gt;'$0.8x_1 + 0.8x_2 \leq 100$'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;58&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="sa"&gt;r&lt;/span&gt;&lt;span class="s1"&gt;'$0.1x_1 + 0.2x_2 \leq 20$'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;59&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="sa"&gt;r&lt;/span&gt;&lt;span class="s1"&gt;'$0.1x_1 \leq 10$'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;60&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="s1"&gt;'Feasible Region'&lt;/span&gt; &lt;span class="c1"&gt;# The text for the white rectangle&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;61&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="p"&gt;])&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;62&lt;/span&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;63&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;# Plot the labeled points&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;64&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;points&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;np&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;array&lt;/span&gt;&lt;span class="p"&gt;([[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;100&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;100&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;25&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;50&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;75&lt;/span&gt;&lt;span class="p"&gt;]])&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;65&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;labels&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s1"&gt;'Basis 1'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'Basis 2'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'Basis 3'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'Basis 4'&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;66&lt;/span&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;67&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;# Plot the filled circles first&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;68&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;plt&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;scatter&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;points&lt;/span&gt;&lt;span class="p"&gt;[:,&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt; &lt;span class="n"&gt;points&lt;/span&gt;&lt;span class="p"&gt;[:,&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt; &lt;span class="n"&gt;color&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;'black'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;marker&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;'o'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;s&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;75&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;edgecolor&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;'black'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="c1"&gt;# Circle&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;69&lt;/span&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;70&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;# Overlay the 'x' markers&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;71&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;plt&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;scatter&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;points&lt;/span&gt;&lt;span class="p"&gt;[:,&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt; &lt;span class="n"&gt;points&lt;/span&gt;&lt;span class="p"&gt;[:,&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt; &lt;span class="n"&gt;color&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;'black'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;marker&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;'x'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;s&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;150&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="c1"&gt;# 'x' on top&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;72&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;y&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="nb"&gt;enumerate&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;points&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;73&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;plt&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;text&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;x&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;y&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;labels&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt; &lt;span class="n"&gt;fontsize&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;12&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;color&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;'black'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="c1"&gt;# Label the points with a small offset&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;74&lt;/span&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;75&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;plt&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;title&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'Feasible Region and Constraints'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;76&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;plt&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;xlabel&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;r&lt;/span&gt;&lt;span class="s1"&gt;'$x_1$'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;77&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;plt&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;ylabel&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;r&lt;/span&gt;&lt;span class="s1"&gt;'$x_2$'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;78&lt;/span&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;79&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;plt&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;show&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/p&gt;
&lt;/details&gt;
 
&lt;/details&gt;


&lt;h3 id="problem-50"&gt;Problem 50&lt;/h3&gt;
&lt;p&gt;Let \(f: \mathbb{R}^n \to \mathbb{R}\) be convex with at least one minima.&lt;/p&gt;
&lt;p&gt;a) Show that the local minima from \(f\) is already a global minima from \(f\).&lt;/p&gt;
&lt;p&gt;b) Show that global minima from \(f\) is unambiguous, if \(f\) is strictly convex.&lt;/p&gt;
&lt;p&gt;c) Provide an example for a convex function with a global minima, that is not strict convex.&lt;/p&gt;
&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution a)&lt;/summary&gt;
 
 &lt;p&gt;&lt;strong&gt;Assumption:&lt;/strong&gt; Let \(x_0\) be a local minima from \(f\), but not a global minima.&lt;/p&gt;
&lt;p&gt;This means it exist \(x_1 : f(x_1) \le f(x_0)\), which is not in the neighbourhood of \(x_0\).
Further let \(\lambda \in (0,1)\) and \(x_2 := \lambda x_1 + (1- \lambda) x_0\).&lt;/p&gt;
&lt;p&gt;Because \(f\) is convex, we can write&lt;/p&gt;
$$
f(x_2) = f(\lambda x_1 + (1- \lambda) x_0) \leq \lambda f(x_1) + (1- \lambda) f(x_0) \leq \lambda f(x_0) + (1- \lambda) f(x_0) = f(x_0)
$$&lt;p&gt;This means we have found an \(x_2\) for that \(f(x_2) &lt; f(x_0)\). We now set \(\lambda\) to be small enough for \(x_2\) to be in the neighbourhood of \(x_0\), thus we have a contradiction, since \(x_0\) is supposed to be a local minima.&lt;/p&gt;
&lt;p&gt;From this follows, \(x_0\) is a global minima.&lt;/p&gt;

 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution b)&lt;/summary&gt;
 
 &lt;p&gt;&lt;strong&gt;Assumption:&lt;/strong&gt; Let \(x_0\) be a local minima from \(f\), but not unambiguous.&lt;/p&gt;
&lt;p&gt;This means, we have another global minima \(x_1\) with \(f(x_0) = f(x_1)\).&lt;/p&gt;
&lt;p&gt;Because \(f\) is strict covnex&lt;/p&gt;
$$
f(\lambda x_1 + (1- \lambda) x_0) &lt; \lambda f(x_1) + (1- \lambda) f(x_0) = \lambda f(x_1) + (1- \lambda) f(x_1) = f(x_1)
$$&lt;p&gt;But with that we have found an additional value \(\lambda x_1 + (1- \lambda) x_0\) that is smaller than \(f(x_1)\). But \(f(x_1)\) is supposed to be a global minima.&lt;/p&gt;
&lt;p&gt;Hence we have a contradiction, \(f\) is unambiguous.&lt;/p&gt;

 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution b) (Alternative: if f is differentiable)&lt;/summary&gt;
 
 &lt;p&gt;&lt;strong&gt;Assumption:&lt;/strong&gt; Let \(x_0\) be a local minima from \(f\), but not unambiguous.&lt;/p&gt;
&lt;p&gt;This means, we have another global minima \(x_1\).&lt;/p&gt;
&lt;p&gt;Because \(f\) is strictly convex the followung applies&lt;/p&gt;
$$
[\nabla f(x_0) - \nabla f(x_1)]^T(x_0 - x_1) &gt; 0
$$&lt;p&gt;But because \(x_0, x_1\) are global optima \(\implies \nabla f(x_0) = 0 \ \land \ \nabla f(x_1) = 0\). From this follows&lt;/p&gt;
$$
0 = [\nabla f(x_0) - \nabla f(x_1)]^T(x_0 - x_1) &gt; 0
$$&lt;p&gt;Which is a contradiction. Thus \(f\) is unambiguous.&lt;/p&gt;

 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution c)&lt;/summary&gt;
 
 &lt;p&gt;The function \(g = ||x||\) has with \(x = 0\) a global minima and is convex with&lt;/p&gt;
$$
||\lambda x_1 + (1 - \lambda) x_2 || \leq |\lambda| ||x_1|| + |(1 - \lambda)| ||x_2||
$$&lt;p&gt;But is not strictly covnex.&lt;/p&gt;

 
&lt;/details&gt;


&lt;h3 id="problem-51"&gt;Problem 51&lt;/h3&gt;
&lt;p&gt;Rudi and Carla enjoy camping together in nature. Rudi likes the hills, and Carla likes the valleys, which makes choosing a campsite difficult for them. The area where they want to camp is crossed by \( m \in \mathbb{N} \) paths in the east-west direction and \( n \in \mathbb{N} \) paths in the north-south direction. They decide to camp at an intersection and agree that Rudi may choose the east-west path and Carla the north-south path. Additionally, they already know the elevation levels of the intersections from previously acquired maps.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;(a)&lt;/strong&gt; Formulate the above scenario as a two-person matrix game. Rudi tries to camp as high as possible, while Carla aims for the lowest possible elevation.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;(b)&lt;/strong&gt; Consider the following example for \( m = n = 3 \): In the following table, the elevation meters of the intersections are given.&lt;/p&gt;
$$
\begin{array}{c|ccc}
\text{East-West} \backslash \text{North-South} &amp; \text{Path 1} &amp; \text{Path 2} &amp; \text{Path 3} \\ \hline
\text{Path 1} &amp; 400 &amp; 800 &amp; 400 \\
\text{Path 2} &amp; 600 &amp; 400 &amp; 300 \\
\text{Path 3} &amp; 500 &amp; 900 &amp; 200 \\
\end{array}
$$&lt;p&gt;Show that a saddle point game emerges in this area. Determine the corresponding pure strategies and find out at which elevation they will camp when choosing these strategies.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;(c)&lt;/strong&gt; Evaluate whether the game is fair based on the arithmetic mean of the elevations of all intersections.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;(d)&lt;/strong&gt; Evaluate whether the game is fair based on the median of the elevations of all intersections.&lt;/p&gt;
&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution a)&lt;/summary&gt;
 
 &lt;p&gt;Rudi is player 1 and Carla playa 2. For player 1 we optimize&lt;/p&gt;
$$
\min_x \max_{e^Ty=1} y^TAx
$$&lt;p&gt;For player 2 we optimize&lt;/p&gt;
$$
\max_y \min_{e^Tx =1} y^T A x
$$&lt;p&gt;With the payout matrix&lt;/p&gt;
$$
A =
\begin{pmatrix}
400 &amp; 800 &amp; 400 \\
600 &amp; 400 &amp; 300 \\
500 &amp; 900 &amp; 200
\end{pmatrix}^T
$$
 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution b)&lt;/summary&gt;
 
 &lt;p&gt;We check whether its a saddle game or not.&lt;/p&gt;
$$
\max_i \min_j a_{ij}= \max\{400, 300, 200\} = 400
$$&lt;p&gt;
&lt;/p&gt;
$$
\min_i \max_j a_{ij}= \min\{600, 900, 400\} = 400
$$&lt;p&gt;Because they values are the same, we have a saddlegame. With the following pure stretegies:&lt;/p&gt;
$$
x = (0, 1, 0), \ y = (0, 1, 0)
$$&lt;p&gt;Hence, their tent will be at the height of 400m.&lt;/p&gt;

 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution c)&lt;/summary&gt;
 
 The arithmetic mean is \(4500/9 &gt; 400\), thus the game is not fair.
 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution d)&lt;/summary&gt;
 
 The median is 400, with that the game would be fair.
 
&lt;/details&gt;


&lt;h3 id="problem-52"&gt;Problem 52&lt;/h3&gt;
&lt;p&gt;Given the optimization problem&lt;/p&gt;
$$
(P) \quad \min x + y^2 \ \ \text{under} \ \ x^2 + \gamma x y + y^2 \leq 1
$$&lt;p&gt;The slater condition is fullfilled.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;a)&lt;/strong&gt; Determine for all \(\gamma\), if the restriction \(g(x, y) = x^2 + \gamma x y + y^2\) is convex.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;b)&lt;/strong&gt; Determine for the case \(\gamma = 0 \) the dual problem (D) for (P) and solve it.&lt;/p&gt;
&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution a)&lt;/summary&gt;
 
 &lt;p&gt;We check the second derivative of \(g\)&lt;/p&gt;
$$
\nabla g(x,y) = (2x + \gamma y, \gamma x + 2y)
$$$$
\nabla^2 g(x,y) = 
\begin{pmatrix}
2 &amp; \gamma \\
\gamma &amp; 2
\end{pmatrix}
$$&lt;p&gt;We calculate the characteristic equation&lt;/p&gt;
$$
\begin{vmatrix}
2 - \lambda &amp; \gamma \\
\gamma &amp; 2 - \lambda
\end{vmatrix} = 0
$$&lt;p&gt;Thus get&lt;/p&gt;
$$
(2- \lambda)(2- \lambda) - \gamma^2 = 0 \iff
\lambda^2 - 4 \lambda + 4 - \gamma^2 = 0
$$&lt;p&gt;We can use the quadratic(abc) formula to solve this&lt;/p&gt;
$$
\lambda = \frac{4 \pm \sqrt{16 - 16+ 4 \gamma^2}}{2} \iff
\lambda = 2 \pm |\gamma|
$$&lt;p&gt;Hence, the matrix is positiv definit when \(|\gamma| &lt; 2\) and then convex.&lt;/p&gt;

 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution b)&lt;/summary&gt;
 
 &lt;p&gt;First, we form the Lagrange function:&lt;/p&gt;
$$
L(x, y, u) = x + y^2 + u(x^2 + y^2 - 1).
$$&lt;p&gt;From this, we obtain:&lt;/p&gt;
$$
F(u) = \inf L(x, y, u) = \inf_x (x + ux^2) + \inf_y (y^2 + uy^2) - u.
$$&lt;p&gt;Taking the derivatives and setting them to zero:&lt;/p&gt;
$$
\nabla_x (x + ux^2) = 1 + 2ux = 0, \quad \nabla_y (y^2 + uy^2) = 2y + 2uy = 0.
$$&lt;p&gt;Solving for \(x\) and \(y\):&lt;/p&gt;
$$
2ux = -1 \implies x = -\frac{1}{2u}.
$$$$
2y + 2uy = 0 \iff y + uy = 0 \implies u = -1 \lor y = 0.
$$&lt;p&gt;Since \( u \geq 0 \) (from the constraint), \( u \neq -1 \), which implies \( y = 0 \).&lt;/p&gt;
&lt;p&gt;The minimum is then:&lt;/p&gt;
$$
F(u) = x + y^2 + u(x^2 + y^2 - 1) 
= -\frac{1}{2u} + 0^2 + u \left(\frac{1}{4u^2} + 0 - 1\right) 
= -\frac{1}{4u} - u 
$$&lt;p&gt;Now, solving \((D)\):&lt;/p&gt;
$$
\max F(u) = F(1/2) = -1.
$$&lt;p&gt;Since the Slater condition is satisfied, we conclude:&lt;/p&gt;
$$
-1 = \max(D) = \min(D).
$$
 
&lt;/details&gt;


&lt;h3 id="problem-53"&gt;Problem 53&lt;/h3&gt;
&lt;p&gt;Given the optimization problem&lt;/p&gt;
$$
(P) \quad \min \frac{1}{2}(x - 5)^2 \ \ \text{under} \ \ x \geq 0, \ sin(x) \geq 0, \ xsin(x) = 0
$$&lt;p&gt;And the associated lagrange function&lt;/p&gt;
$$
L(x, u_1, u_2, v) = \frac{1}{2} (x - 5)^2 - u_1 x - u_2 sin(x) + vx sin(x)
$$&lt;p&gt;&lt;strong&gt;a)&lt;/strong&gt; Formulate the KKT-Conditions for (P).&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;b)&lt;/strong&gt; Determine for \(x^* = \pi\) all lagrane multiplicator \(u_1^*, u_2^*, v^*\), so that the vector \((\pi, u_1^*, u_2^*, v^*)^T\) is a KKT point of (P).&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;c)&lt;/strong&gt; Check if \(x^* = \pi\) fullfills (CQ1).&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;d)&lt;/strong&gt; Check if \(x^* = \pi\) fullfills (CQ2).&lt;/p&gt;
&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution a)&lt;/summary&gt;
 
 &lt;p&gt;The KKT conditions are:&lt;/p&gt;
$$
\begin{align}
(1) \quad 0 &amp;= \nabla_x L = x - 5 - u_1 - u_2 cos(x) + v sin(x) + v x cos(x) \\
(2) \quad 0 &amp;= - u_1 x \\
(3) \quad 0 &amp;= -u_2 sin(x) \\
(4) \quad 0 &amp;= xsin(x) \\
(5) \quad 0 &amp;\leq u_1, u_2 \\
(6) \quad 0 &amp;\leq x \\
(7) \quad 0 &amp;\leq sin(x)
\end{align}
$$
 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution b)&lt;/summary&gt;
 
 &lt;p&gt;We have \(x^* = \pi\). Inserting this into (6) and (7), we see that the associated constraints are fulfilled.&lt;/p&gt;
&lt;p&gt;Further, inserting \(x^* = \pi\) into (2), we obtain&lt;/p&gt;
\[
0 = - u_1 \pi \implies u_1 = 0.
\]&lt;p&gt;Inserting it into (3) gives&lt;/p&gt;
\[
0 = - u_2 \sin(\pi) = 0.
\]&lt;p&gt;Inserting it into (4) yields&lt;/p&gt;
\[
0 = \pi \sin(\pi) = 0.
\]&lt;p&gt;Finally, inserting \(x^* = \pi\) and \(u_1 = 0\) into (1), we get&lt;/p&gt;
\[
0 = \pi - 5 - u_2 \cos(\pi) + v \sin(\pi) + v \pi \cos(\pi).
\]&lt;p&gt;Since \(\cos(\pi) = -1\) and \(\sin(\pi) = 0\), this simplifies to&lt;/p&gt;
\[
0 = \pi - 5 + u_2 - \pi v.
\]&lt;p&gt;Solving for \(u_2\), we obtain&lt;/p&gt;
\[
u_2 = - \pi + 5 + \pi v.
\]&lt;p&gt;From (5), we get the condition&lt;/p&gt;
\[
\frac{\pi - 5}{\pi} \leq v.
\]&lt;p&gt;Thus, all points of the form&lt;/p&gt;
\[
(\pi, 0, -\pi + 5 + \pi v, v^*)
\]&lt;p&gt;are KKT points, where \(v^* \in \mathbb{R}\) and \(\frac{\pi - 5}{\pi} \leq v\).&lt;/p&gt;

 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution c)&lt;/summary&gt;
 
 &lt;p&gt;We now check if the condition (CQ1) is fulfilled. To do so, we first compute the derivative of \(h\):&lt;/p&gt;
$$
h'(x) = \sin(x) + x \cos(x) \quad \implies \quad h'(\pi) = - \pi
$$&lt;p&gt;The result is one-dimensional, so the rank condition is fulfilled.&lt;/p&gt;
&lt;p&gt;Next, we compute the derivative of \(g\):&lt;/p&gt;
$$
g_1'(x) = -1 \quad \implies \quad g_1'(\pi) = -1
$$$$
g_2'(x) = -\cos(x) \quad \implies \quad g_2'(\pi) = 1
$$&lt;p&gt;We now check the second part of the CQ1 condition. For this to be valid, the following inequalities must hold:&lt;/p&gt;
$$
g_1(\pi) + g_1'(\pi)z_1 &lt; 0 \quad \text{and} \quad h'(\pi)z_1 = 0
$$&lt;p&gt;and&lt;/p&gt;
$$
g_2(\pi) + g_2'(\pi)z_2 &lt; 0 \quad \text{and} \quad h'(\pi)z_2 = 0
$$&lt;p&gt;These are satisfied for \(z_1 = 0\), but not for \(z_2\). Therefore, condition (CQ1) is not fulfilled.&lt;/p&gt;

 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution d)&lt;/summary&gt;
 
 CQ1 is weaker than CQ2 and if the weaker version is not fullfilled than CQ2 can&amp;rsquo;t be fullfilled either.
 
&lt;/details&gt;


&lt;h3 id="problem-54"&gt;Problem 54&lt;/h3&gt;
&lt;p&gt;Are the following statement true or fals? Prove it.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;a)&lt;/strong&gt; Every Cone is convex or finitely created.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;b)&lt;/strong&gt; Exist for a matrix game an optimal pure strategy, so is the game fair.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;c)&lt;/strong&gt; A cycle can only occur in the simplex-algorithm on a degenerate corner.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;d)&lt;/strong&gt; Is a convex optimization problem solvable over a convex set \(M\) and \(M\) has corners, so exists a solution that is a corner.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;e)&lt;/strong&gt; Polyhedrals are always convex.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;f&lt;/strong&gt; Is \(x\) a solution of a linear optimization problem over a polytope \(K\), so is \(x\) a corner of \(K\).&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;g)&lt;/strong&gt; The helper problem from phase 1 of the simplex-algorithm is always solvable.&lt;/p&gt;
&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution a)&lt;/summary&gt;
 
 &lt;p&gt;&lt;strong&gt;False&lt;/strong&gt;. The cone&lt;/p&gt;
$$
K = \{(x,y) \ | \ y \in \mathbb{R}_{\geq}, \ x \in \mathbb{N}_+\}
$$&lt;p&gt;is not convex nor finitely created.&lt;/p&gt;

 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution b)&lt;/summary&gt;
 
 &lt;p&gt;&lt;strong&gt;False&lt;/strong&gt;. Lets look at the matrix game with the following payout matrix&lt;/p&gt;
$$
A = 
\begin{pmatrix}
0 &amp; 2 \\
1 &amp; 0 
\end{pmatrix}
$$&lt;p&gt;This matrix has a pure strategy for both player but one player always gets a bigger payout then the other, thus not fair.&lt;/p&gt;

 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution c)&lt;/summary&gt;
 
 &lt;strong&gt;True&lt;/strong&gt;. Because the corner is not degenerate, we have exactly \(m\) positive basisvariables, this means there is no case where multiple basis solution can represent the same point. This means in every step when we choose a new pivot, we also switch to a point that is different from our basis solution until now. This means wedo not go in a circle.
 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution d)&lt;/summary&gt;
 
 &lt;p&gt;&lt;strong&gt;False&lt;/strong&gt;. Lets look at the following optimization problem&lt;/p&gt;
$$
f(x) = e^x \quad M = \{ \max\{|x|,|y| \leq 1\} \}
$$&lt;p&gt;\(f\) is convex and \(M\) has corners, but the solution is not a corner.&lt;/p&gt;

 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution e)&lt;/summary&gt;
 
 &lt;strong&gt;True&lt;/strong&gt;. Polyhedrals are always convex, because they are made up of the intersection of half-spaces, that are convex.
 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution f)&lt;/summary&gt;
 
 &lt;strong&gt;Wrong&lt;/strong&gt;. It can also happen that an entrie subset of \(K\) is a solution e.g. one side of an triangle.
 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution g)&lt;/summary&gt;
 
 &lt;strong&gt;True&lt;/strong&gt;. The helper problem is constructed in such a way that it always has a solution. If the restriction set from the original problem was empty then in phase 1 of the simplex-algorithm the sum of the atrifical variables will not be 0.
 
&lt;/details&gt;


&lt;h2 id="conclusion"&gt;Conclusion&lt;/h2&gt;


&lt;figure&gt;
 &lt;img style="display: block; margin-left: auto; margin-right: auto; width:50%" src="https://monkemanx.github.io/attachments/man_who_lost_it.jpg"&gt;
 &lt;figcaption style="margin-top: 20px"&gt;
 My pain is constant and sharp and I do not hope for a better world for anyone, in fact I want my pain to be inflicted on others. I want no one to escape.
 &lt;/figcaption&gt;
&lt;/figure&gt;

</description></item><item><title>Virtue Ethics from First Principles</title><link>https://monkemanx.github.io/articles/aristotele_virtue_ethics/</link><pubDate>Sun, 26 Jan 2025 00:00:00 +0000</pubDate><author>monkeman@cock.li (MonkeMan)</author><guid>https://monkemanx.github.io/articles/aristotele_virtue_ethics/</guid><description>&lt;style&gt;
 .warning {
 background-color: #ffe4e1; 
 padding: 15px; 
 border-radius: 5px; 
 margin-bottom: 15px; 
 }

 .warning-title {
 font-size: 20px; 
 margin-bottom: 10px; 
 color: #8b0000; 
 font-weight: bold; 
 }
&lt;/style&gt;

&lt;div class="warning"&gt;
 &lt;div class="warning-title"&gt;Warning&lt;/div&gt;
 &lt;p&gt;I’m unhappy with this article. As such, the text needs to be reworked. Please keep this in mind while reading.&lt;/p&gt;
&lt;/div&gt;

&lt;p&gt;In this article, based on the book Nicomachean Ethics by Aristotle and the
companion book from Cambridge, I aim to reconstruct the argument for virtue
ethics from first principles, meaning from basic axioms, into a single, cohesive
argument structure, which I failed to do so.&lt;/p&gt;
&lt;p&gt;The central thesis of this article is that by cultivating virtues, one attains a
state of eudaimonia, a deep sense of happiness, which is equivalent to being
good.&lt;/p&gt;
&lt;h2 id="is-there-an-ultimate-goal"&gt;Is There an Ultimate Goal?&lt;/h2&gt;
&lt;p&gt;The first step is to establish some definitions that will be used in the
argument that follows.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Motivational Observation:&lt;/strong&gt; Every method of production and every type of
inquiry, similarly, every action and purpose, seems to aim at some good.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Definition of &amp;ldquo;good&amp;rdquo;:&lt;/strong&gt; We define &amp;ldquo;good&amp;rdquo; as &amp;ldquo;that which is aimed at&amp;rdquo;; to be
good is to be a goal.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;For example, if I trim my fingernails, my goal is to make the nails shorter
and orderly. Thus, the good of trimming my nails is that goal.&lt;/li&gt;
&lt;li&gt;Similarly, if I make myself a coffee, my goal is to prepare a coffee that
tastes good and serves the function of waking me up. This goal is the good of
making coffee.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Definition of &amp;ldquo;better&amp;rdquo;:&lt;/strong&gt; When X and Y are goals, and X is for the sake of Y,
then Y is better than X.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;For instance, a carpenter will build a better house than a non, carpenter. Why?
Because while building the house, the carpenter performs actions and movements
&lt;em&gt;for the sake of the house&lt;/em&gt;. They understand the effects of their actions and
choose them accordingly. It is because their actions are guided by the goal of
the house that the results are better.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Now we can proceed to the argument structure:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Each discipline has a goal (or good) at which it aims.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;em&gt;(Explanation: Nothing could be called a discipline unless there were some
good it reliably sought.)&lt;/em&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The higher the discipline, the better its goal (or good).&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;em&gt;(Explanation: This premise follows from the definition of &amp;ldquo;better.&amp;rdquo;)&lt;/em&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;If there is a highest discipline, then it has a goal (or good), which we call
the &amp;ldquo;highest good.&amp;rdquo;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;em&gt;(Explanation: This should be understood as the definition of &amp;ldquo;highest
good,&amp;rdquo; rather than requiring further proof.)&lt;/em&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;There is a highest discipline.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;em&gt;(Explanation: Aristotle argues that the highest discipline is
&amp;ldquo;governing/statecraft/politics,&amp;rdquo; since it directs all other disciplines.)&lt;/em&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;strong&gt;Conclusion:&lt;/strong&gt;&lt;/p&gt;
&lt;ol start="5"&gt;
&lt;li&gt;Thus, there is a best goal (or good).&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;In other words, if a discipline is performed for the sake of another discipline,
we call the second discipline &amp;ldquo;better.&amp;rdquo; By following this chain of &amp;ldquo;better&amp;rdquo;
relationships to its final element, we arrive at the good of this ultimate
discipline, which we call the &amp;ldquo;best&amp;rdquo; or &amp;ldquo;highest good.&amp;rdquo;&lt;/p&gt;
&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details open&gt;
 &lt;summary&gt;Goals and Human Actions&lt;/summary&gt;
 
 &lt;p&gt;The idea that everything has a goal might initially seem controversial,
especially if interpreted in a universal, unchanging, and objective sense.
However, from a cognitive perspective, this statement holds significant
validity.&lt;/p&gt;
&lt;p&gt;All actions we take, including our engagement in disciplines, are carried out
and interpreted by us as humans. Fundamentally, humans are goal, seeking agents,
as understood in the framework of reinforcement learning. Every action we
perform has an underlying goal, no matter how trivial it may seem.&lt;/p&gt;
&lt;p&gt;You might think that you do something &amp;ldquo;randomly&amp;rdquo; or &amp;ldquo;without a goal,&amp;rdquo; but this
is, by definition, impossible. Every action, even one performed in protest to
disprove this point, would still have the goal of protest.&lt;/p&gt;
&lt;p&gt;Even reflexes and habits are not performed without a goal; their goals may
simply be less immediate or direct. For example, the fight-or-flight response
was shaped by evolution with the ultimate goal of ensuring survival.&lt;/p&gt;

 
&lt;/details&gt;


&lt;p&gt;With this, we have established that there is some kind of ultimate goal, though
we have not yet identified what it is or whether we should pursue it.&lt;/p&gt;
&lt;h2 id="criteria-of-goodness"&gt;Criteria of Goodness&lt;/h2&gt;
&lt;p&gt;Looking back, we defined the highest good as:&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&amp;ldquo;A kind of thing or activity that is acquired or achieved at intervals, with
respect to which everything else that one seeks may reasonably be taken as
directed, and which one may, in turn, reasonably regard as not directed to
anything beyond it.&amp;rdquo;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;To determine what exactly the ultimate good is, we need criteria that
characterize it. From our previous argument regarding the ultimate goal, we can
identify the following key properties:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Ultimacy:&lt;/strong&gt; The highest good is that for the sake of which we seek
everything else, and it is not itself sought for anything further.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;We can distinguish between different types of goals:&lt;br&gt;
(i) Goals sought only for the sake of something else.&lt;br&gt;
(ii) Goals sought both for their own sake and for the sake of something
else.&lt;br&gt;
(iii) Goals sought only for their own sake and not for the sake of anything
else.&lt;/li&gt;
&lt;li&gt;Goals of type (iii) are at the top of the &amp;ldquo;for the sake of&amp;rdquo; hierarchy,
making them the highest and most desirable goals.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Self-sufficiency:&lt;/strong&gt; The highest good is one that implies no further need.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The intuitive idea of self-sufficiency includes the notion of &lt;em&gt;rest&lt;/em&gt;—a
state where no further pursuit is necessary and there is an absence of
ongoing dependence, meaning one is not constantly chasing after something
else.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id="the-function-argument"&gt;The Function Argument&lt;/h2&gt;
&lt;p&gt;Having established the criteria for the highest good, we can now apply the
&lt;em&gt;function argument&lt;/em&gt; to identify it.&lt;/p&gt;
&lt;p&gt;The function argument consists of four distinct steps:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Establishing that human beings have a function.&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Identifying the human function as rational activity.&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Qualifying that the function is performed well by a good human being.&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Concluding that the ultimate good of a human being is found in virtuous
activity.&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;It is important to clarify that this argument concerning the highest good
applies only to humans who meet the following qualifications:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Chronologically:&lt;/strong&gt; The person must have lived a sufficiently long life.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Developmentally:&lt;/strong&gt; The person must have reached maturity.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;With these qualifications in place, we can begin the argument.&lt;/p&gt;
&lt;p&gt;Step (i) has already been addressed in the previous section. Aristotle assumes
that everything has a function. However, if one remains unconvinced, this idea
can also be approached through a cognitive perspective. Humans naturally
perceive functions to make sense of the world, for example:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The function of a plant is to grow.&lt;/li&gt;
&lt;li&gt;The function of a cook is to prepare food.&lt;/li&gt;
&lt;li&gt;The function of a coffee maker is to brew coffee.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Similarly, human beings must also have a function.&lt;/p&gt;
&lt;p&gt;For step (ii), we will explore it in the next section of this article.&lt;/p&gt;
&lt;p&gt;Step (iii) can be considered through the following argument:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;A good human being—someone who possesses virtues—carries out the human
function well.&lt;/li&gt;
&lt;li&gt;To carry out a function well is to achieve what is good for that being.&lt;/li&gt;
&lt;li&gt;Therefore, a good human being attains what is good for them.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;In simpler terms, we call something &amp;ldquo;good&amp;rdquo; when it performs its function well.
For example, a good knife is one that cuts well, whereas a bad knife fails to do
so. Similarly, for a person to be good, they must possess the qualities that
enable them to fulfill their function effectively.&lt;/p&gt;
&lt;h2 id="parts-of-the-soul-and-virtue"&gt;Parts of the Soul and Virtue&lt;/h2&gt;
&lt;p&gt;We can now define virtue as follows:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Virtue&lt;/strong&gt; is &lt;em&gt;that which enables something to perform its function well.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;To make this concept more tangible, let&amp;rsquo;s consider an example. An electric
coffee maker has the function of &lt;em&gt;brewing coffee.&lt;/em&gt; The virtue of the coffee
maker is whatever allows it to brew coffee well. For instance, we might say:&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&amp;ldquo;This excellent coffee maker brews a great cup of coffee because it has the
‘virtue’ one looks for in a coffee maker.&amp;rdquo;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;We can further specify this by analyzing the job of a coffee maker as &lt;em&gt;sending
very hot water through ground coffee,&lt;/em&gt; which consists of several steps, each of
which can be done well or poorly. If the coffee maker performs a particular step
very well, such as filtering the water effectively or grinding the coffee beans
consistently, then we can say it possesses a virtue related to that step.&lt;/p&gt;
&lt;p&gt;However, not every physical part of the coffee maker contributes to its virtue.
For example:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The &lt;strong&gt;electrical cord&lt;/strong&gt; plays no direct role in brewing coffee. A faulty cord
does not necessarily make it a &lt;em&gt;bad coffee maker,&lt;/em&gt; though it might make it a
bad electrical appliance.&lt;/li&gt;
&lt;li&gt;Similarly, if the coffee maker has a scratch or some dust on it, it can still
be considered a good coffee maker if it brews coffee well.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Thus, only some parts of the coffee maker contribute to its virtue, while others
do not.&lt;/p&gt;
&lt;h3 id="applying-this-to-humans"&gt;Applying This to Humans&lt;/h3&gt;
&lt;p&gt;We can now apply the same reasoning to humans and ask: &lt;strong&gt;What are the relevant
parts of a human being for their function?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Upon analysis, we can categorize the human being into three main parts:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;The physical part&lt;/strong&gt; (the body)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;The higher-level thinking part&lt;/strong&gt; (rational thought and intellect)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;The lower-level thinking part&lt;/strong&gt; (instincts, emotions, and desires)&lt;/li&gt;
&lt;/ol&gt;
&lt;h4 id="1-the-physical-part"&gt;1. The Physical Part&lt;/h4&gt;
&lt;p&gt;The physical aspects of a human being, while important for survival, do not
determine moral goodness. We would not call someone a good person simply because
they have a strong heart. For example:&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&amp;ldquo;That crook may be the worst criminal in history, but his heart is as healthy
as it can be.&amp;rdquo;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Similarly, sleeping well at night may contribute to overall well-being, but it
does not make someone &lt;em&gt;good&lt;/em&gt; in the moral sense.&lt;/p&gt;
&lt;p&gt;In other words, the state of the human body does not contribute to the goodness
of a &lt;em&gt;human being&lt;/em&gt; in a moral or ethical sense.&lt;/p&gt;
&lt;h4 id="2-the-higher-level-thinking-part"&gt;2. The Higher-Level Thinking Part&lt;/h4&gt;
&lt;p&gt;The capacity for rational thought—intelligence, logic, and analysis—is another
key part of human nature. However, mere intelligence does not determine moral
goodness. For example, we can imagine a highly intelligent criminal who uses
their intellect for wrongdoing.&lt;/p&gt;
&lt;p&gt;Thus, intelligence alone does not equate to being a good person. However,
certain aspects of higher-level thinking, such as &lt;em&gt;good judgment, insight, and
wisdom,&lt;/em&gt; do play a role in moral goodness.&lt;/p&gt;
&lt;h4 id="3-the-lower-level-thinking-part"&gt;3. The Lower-Level Thinking Part&lt;/h4&gt;
&lt;p&gt;This aspect of human nature includes emotions, instincts, and impulses. At first
glance, we might think that experiencing emotions or having strong instincts
does not determine moral goodness. However, the part of our lower nature that
&lt;em&gt;listens to and responds to reason&lt;/em&gt; is crucial.&lt;/p&gt;
&lt;p&gt;For example, imagine a person who lacks self-control—they want to do the right
thing but fail to act accordingly. We often describe such situations as if they
stem from two conflicting parts within the person. A morally good person should
not experience such internal conflict; rather, their desires should align with
what they rationally believe to be right.&lt;/p&gt;
&lt;h3 id="overview-of-human-parts-and-their-corresponding-virtues"&gt;Overview of Human Parts and Their Corresponding Virtues&lt;/h3&gt;
&lt;p&gt;Based on this analysis, we can categorize the parts of the human soul and their
corresponding virtues as follows:&lt;/p&gt;
&lt;table&gt;
	&lt;thead&gt;
			&lt;tr&gt;
					&lt;th&gt;&lt;strong&gt;Part of the Human Soul&lt;/strong&gt;&lt;/th&gt;
					&lt;th&gt;&lt;strong&gt;Part of Human Virtue&lt;/strong&gt;&lt;/th&gt;
			&lt;/tr&gt;
	&lt;/thead&gt;
	&lt;tbody&gt;
			&lt;tr&gt;
					&lt;td&gt;The part that has reason&lt;/td&gt;
					&lt;td&gt;Thinking-related or ‘‘intellectual’’ virtue&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;The part that lacks reason but can listen and respond to it&lt;/td&gt;
					&lt;td&gt;Character-related virtue&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;The part that lacks reason and cannot respond to it&lt;/td&gt;
					&lt;td&gt;&lt;em&gt;Not relevant to moral goodness&lt;/em&gt;&lt;/td&gt;
			&lt;/tr&gt;
	&lt;/tbody&gt;
&lt;/table&gt;
&lt;h2 id="acquisition-of-character-related-virtue"&gt;Acquisition of Character-Related Virtue&lt;/h2&gt;
&lt;p&gt;Now that we know what virtues are, we need to understand how one can acquire
them. Aristotle himself did not present the following points as an argument but
rather as established facts. I&amp;rsquo;ve listed them here because I believe they offer
interesting insights.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;We acquire character-related virtues by performing actions similar to those
of people who possess that virtue.&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Just like learning any skill (e.g., playing the guitar), we imitate skilled
individuals to learn how to perform effectively. Similarly, we can acquire
virtues by observing and mimicking virtuous people.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;We acquire character-related virtues not just by performing certain
actions, but by performing them in a certain way.&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;It is not enough to practice the same easy song over and over in a bad way.
If we practice poorly, we will only reinforce bad habits and end up playing
the song badly. The same holds true for ethics—if we perform an action
poorly, we develop bad habits (vices), but if we perform it well, we
cultivate virtue.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Acting well in a given domain initially requires avoiding contrary
extremes.&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;For example, if one wants to become more courageous, it is unwise to jump
into dangerous situations right away. Instead, one should start by avoiding
excessive fear or rashness, gradually finding a balanced approach.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;There is momentum in action: to the extent that someone acts well or poorly
in a given domain, they become more disposed to act in that way.&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;If someone lifts heavy weights regularly, they will improve their strength
and ability to lift even more. Similarly, by avoiding indulgence, we
gradually become more moderate, and once we’ve developed this self-control,
it becomes easier to maintain.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;When someone regularly performs actions similar to those of people with a
particular virtue, and if they genuinely enjoy acting in that way, we can be
confident that they possess that virtue.&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The first step in acquiring a virtue is to perform the actions that
virtuous people do, according to a set of rules. But the second step is to
do so independently of the rules—acting virtuously because one enjoys it,
rather than merely following external instructions. When this happens, we
can be sure that the virtue has fully developed.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id="definition-of-character-related-virtue"&gt;Definition of Character-Related Virtue&lt;/h2&gt;
&lt;p&gt;We’ve already discussed what virtues are in a general sense, but we haven’t yet
provided a formal definition. Let&amp;rsquo;s remedy that now with a more precise
formulation:&lt;/p&gt;
&lt;p&gt;Character-related virtue is defined as:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;A state involving deliberative purpose&lt;/strong&gt;: It is tied to rational
decision-making and purposeful action.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Occupying an intermediate position&lt;/strong&gt;: Virtue is the balance between
extremes, avoiding both excess and deficiency.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Determined by reason&lt;/strong&gt;: It is shaped and guided by rational thought.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;As a person with practical wisdom would determine it&lt;/strong&gt;: The virtuous
individual, possessing practical wisdom, determines what is appropriate in any
given situation.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Aristotle conceives of a virtue of character in all three of these ways:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;It is a stable trait&lt;/strong&gt;: Virtue is not a fleeting quality; it is a lasting
and dependable characteristic of a person.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;It is developed and established through practice&lt;/strong&gt;: Like any skill, virtue
is built up over time through consistent practice and experience.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;It is analogous to a skill&lt;/strong&gt;: Just as one practices a skill to improve at
it, one develops virtues by repeatedly acting in accordance with them.&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id="the-doctrine-of-the-mean"&gt;The Doctrine of the Mean&lt;/h2&gt;
&lt;p&gt;The Doctrine of the Mean has two key components:&lt;br&gt;
(i) Each virtue, as a state, is an intermediate position between two vices—one
of excess and one of deficiency.&lt;br&gt;
(ii) Any correctly felt emotion or properly carried out action lies between
those that would go astray due to some excess and those that would go astray due
to some deficiency.&lt;/p&gt;
&lt;p&gt;This doctrine can be used both as a classification tool to identify virtues and
as a practical rule for guiding behavior.&lt;/p&gt;
&lt;p&gt;When understood as a practical rule, it should not be seen as merely a call for
moderation. For example, an egregious violation of justice deserves a harsh
response, not a moderate one. The Doctrine of the Mean is better understood as
offering general advice: it encourages finding balance and avoiding extremes,
but it recognizes that some situations may require more than just moderate
action.&lt;/p&gt;
&lt;h2 id="classification-virtues"&gt;Classification virtues&lt;/h2&gt;
&lt;p&gt;We can use the Doctrine of the Golden Mean to identify different kinds of
virtues, their respective vices, and the &amp;ldquo;golden mean&amp;rdquo; between the extremes.&lt;/p&gt;



&lt;figure&gt;
&lt;img style="display: block; margin-left: auto; margin-right: auto; width: 60%" src="https://monkemanx.github.io/attachments/Aristotelian-Virtues.png"&gt;
&lt;/figcaption&gt;
&lt;/figure&gt;


&lt;h2 id="conclusion"&gt;Conclusion&lt;/h2&gt;
&lt;p&gt;There is much more that is left to be said, but these are some of the essentials
of constructing virtue ethics.&lt;/p&gt;
&lt;p&gt;One can summarize it as follows:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Something is good if it fulfills its functions well.&lt;/li&gt;
&lt;li&gt;The properties that make it good are called virtues, and those that make it
bad are called vices.&lt;/li&gt;
&lt;li&gt;A human is made up of three parts, each corresponding to different virtues
that help the human fulfill its function.&lt;/li&gt;
&lt;li&gt;A human is good if they are virtuous with respect to the identified virtues.&lt;/li&gt;
&lt;li&gt;A good human does good deeds.&lt;/li&gt;
&lt;li&gt;An action is good if it is performed by someone with virtues, follows the
practical wisdom required for the situation, adheres to the doctrine of the
mean, and is chosen freely.&lt;/li&gt;
&lt;/ol&gt;</description></item><item><title>Optimization Theory</title><link>https://monkemanx.github.io/articles/optimization_theory/</link><pubDate>Thu, 23 Jan 2025 16:00:00 +0000</pubDate><author>monkeman@cock.li (MonkeMan)</author><guid>https://monkemanx.github.io/articles/optimization_theory/</guid><description>&lt;style&gt;
 .warning {
 background-color: #ffe4e1; 
 padding: 15px; 
 border-radius: 5px; 
 margin-bottom: 15px; 
 }

 .warning-title {
 font-size: 20px; 
 margin-bottom: 10px; 
 color: #8b0000; 
 font-weight: bold; 
 }
&lt;/style&gt;

&lt;div class="warning"&gt;
 &lt;div class="warning-title"&gt;Info&lt;/div&gt;
 &lt;p&gt;The terms I use in this article may not be the standard mathematical terms, as I originally learned about this topic by listening to and reading articles in German. As such, the terms were translated into English.&lt;/p&gt;
&lt;/div&gt;


 &lt;div class="toc"&gt;
 &lt;h2&gt;Table of Contents&lt;/h2&gt;
 &lt;nav id="TableOfContents"&gt;
 &lt;ul&gt;
 &lt;li&gt;&lt;a href="#0-motivation"&gt;0. Motivation&lt;/a&gt;&lt;/li&gt;
 &lt;li&gt;&lt;a href="#1-introduction"&gt;1. Introduction&lt;/a&gt;
 &lt;ul&gt;
 &lt;li&gt;&lt;a href="#11-example-problems"&gt;1.1 Example Problems&lt;/a&gt;&lt;/li&gt;
 &lt;li&gt;&lt;a href="#12-from-the-model-to-the-solution"&gt;1.2 From the Model to the Solution&lt;/a&gt;&lt;/li&gt;
 &lt;/ul&gt;
 &lt;/li&gt;
 &lt;li&gt;&lt;a href="#2-geometry-of-linear-programs"&gt;2. Geometry of Linear Programs&lt;/a&gt;
 &lt;ul&gt;
 &lt;li&gt;&lt;a href="#21-the-canonical-form-of-linear-programming"&gt;2.1 The Canonical Form of Linear Programming&lt;/a&gt;&lt;/li&gt;
 &lt;li&gt;&lt;a href="#22-transformation-into-canonical-form"&gt;2.2 Transformation into Canonical Form&lt;/a&gt;&lt;/li&gt;
 &lt;li&gt;&lt;a href="#23-linear-function-lines-half-spaces-and-polyhedral-spaces"&gt;2.3 Linear Function, Lines, Half-Spaces, and Polyhedral Spaces&lt;/a&gt;&lt;/li&gt;
 &lt;li&gt;&lt;a href="#24-geometrical-depiction-of-two-variables"&gt;2.4 Geometrical Depiction of Two Variables&lt;/a&gt;&lt;/li&gt;
 &lt;li&gt;&lt;a href="#25-weyl-and-farkas-lemma"&gt;2.5 Weyl and Farkas Lemma&lt;/a&gt;&lt;/li&gt;
 &lt;li&gt;&lt;a href="#26-the-main-theorem-of-linear-programming"&gt;2.6 The Main Theorem of Linear Programming&lt;/a&gt;&lt;/li&gt;
 &lt;li&gt;&lt;a href="#27-set-of-problems-and-solutions"&gt;2.7 Set of Problems and Solutions&lt;/a&gt;&lt;/li&gt;
 &lt;/ul&gt;
 &lt;/li&gt;
 &lt;li&gt;&lt;a href="#3-existence-theory-and-duality-theory-for-linear-optimization-problems"&gt;3. Existence Theory and Duality Theory for Linear Optimization Problems&lt;/a&gt;
 &lt;ul&gt;
 &lt;li&gt;&lt;a href="#31-existence-lemma"&gt;3.1 Existence Lemma&lt;/a&gt;&lt;/li&gt;
 &lt;li&gt;&lt;a href="#32-the-dual-problem"&gt;3.2 The Dual Problem&lt;/a&gt;&lt;/li&gt;
 &lt;li&gt;&lt;a href="#33-set-of-problems-and-solutions"&gt;3.3 Set of Problems and Solutions&lt;/a&gt;&lt;/li&gt;
 &lt;/ul&gt;
 &lt;/li&gt;
 &lt;li&gt;&lt;a href="#4-application-of-graph-theory-and-game-theory"&gt;4. Application of Graph Theory and Game Theory&lt;/a&gt;
 &lt;ul&gt;
 &lt;li&gt;&lt;a href="#41-flow-maximization"&gt;4.1 Flow Maximization&lt;/a&gt;&lt;/li&gt;
 &lt;li&gt;&lt;a href="#42-game-theory"&gt;4.2 Game Theory&lt;/a&gt;&lt;/li&gt;
 &lt;li&gt;&lt;a href="#43-set-of-problems-and-solutions"&gt;4.3 Set of Problems and Solutions&lt;/a&gt;&lt;/li&gt;
 &lt;/ul&gt;
 &lt;/li&gt;
 &lt;li&gt;&lt;a href="#5-the-generic-simplex-method"&gt;5. The Generic Simplex Method&lt;/a&gt;
 &lt;ul&gt;
 &lt;li&gt;&lt;a href="#51-idea-of-simplex-algorithm-on-an-example"&gt;5.1 Idea of Simplex Algorithm on an Example&lt;/a&gt;&lt;/li&gt;
 &lt;li&gt;&lt;a href="#52-the-simplex-algorithm"&gt;5.2 The Simplex Algorithm&lt;/a&gt;&lt;/li&gt;
 &lt;li&gt;&lt;a href="#53-interpretation-of-the-simplex-algorithm"&gt;5.3 Interpretation of the Simplex Algorithm&lt;/a&gt;&lt;/li&gt;
 &lt;li&gt;&lt;a href="#54-set-of-problems-and-solutions"&gt;5.4 Set of Problems and Solutions&lt;/a&gt;&lt;/li&gt;
 &lt;/ul&gt;
 &lt;/li&gt;
 &lt;li&gt;&lt;a href="#6-convex-optimization"&gt;6. Convex Optimization&lt;/a&gt;
 &lt;ul&gt;
 &lt;li&gt;&lt;a href="#61-convex-functions"&gt;6.1 Convex Functions&lt;/a&gt;&lt;/li&gt;
 &lt;li&gt;&lt;a href="#62-existence-and-unambiguity"&gt;6.2 Existence and Unambiguity&lt;/a&gt;&lt;/li&gt;
 &lt;li&gt;&lt;a href="#63-the-dual-problem-and-duality-lemmas"&gt;6.3 The Dual Problem and Duality Lemmas&lt;/a&gt;&lt;/li&gt;
 &lt;li&gt;&lt;a href="#64-set-of-problems-and-solutions"&gt;6.4 Set of Problems and Solutions&lt;/a&gt;&lt;/li&gt;
 &lt;/ul&gt;
 &lt;/li&gt;
 &lt;li&gt;&lt;a href="#7-the-quadratic-problem"&gt;7. The Quadratic Problem&lt;/a&gt;
 &lt;ul&gt;
 &lt;li&gt;&lt;a href="#71-existence-lemma-and-kuhn-tucker"&gt;7.1 Existence Lemma and Kuhn-Tucker&lt;/a&gt;&lt;/li&gt;
 &lt;li&gt;&lt;a href="#72-set-of-problems-and-solutions"&gt;7.2 Set of Problems and Solutions&lt;/a&gt;&lt;/li&gt;
 &lt;/ul&gt;
 &lt;/li&gt;
 &lt;li&gt;&lt;a href="#8-differentiable-problems"&gt;8. Differentiable Problems&lt;/a&gt;
 &lt;ul&gt;
 &lt;li&gt;&lt;a href="#81-lemma-of-lyusternik"&gt;8.1 Lemma of Lyusternik&lt;/a&gt;&lt;/li&gt;
 &lt;li&gt;&lt;a href="#82-lagrange-multiplication-rule"&gt;8.2 Lagrange Multiplication Rule&lt;/a&gt;&lt;/li&gt;
 &lt;li&gt;&lt;a href="#83-necessary-and-sufficient-conditions"&gt;8.3 Necessary and Sufficient Conditions&lt;/a&gt;&lt;/li&gt;
 &lt;li&gt;&lt;a href="#84-further-optimality-criteria"&gt;8.4 Further Optimality Criteria&lt;/a&gt;&lt;/li&gt;
 &lt;li&gt;&lt;a href="#85-set-of-problems-and-solutions"&gt;8.5 Set of Problems and Solutions&lt;/a&gt;&lt;/li&gt;
 &lt;/ul&gt;
 &lt;/li&gt;
 &lt;li&gt;&lt;a href="#9-conclusion"&gt;9. Conclusion&lt;/a&gt;&lt;/li&gt;
 &lt;/ul&gt;
&lt;/nav&gt;
 &lt;/div&gt;


&lt;h2 id="0-motivation"&gt;0. Motivation&lt;/h2&gt;
&lt;p&gt;I am currently studying computer science in Germany. In addition to the mandatory and elective courses that each student must complete, one is also required to choose a supplementary subject. This subject is unrelated to one&amp;rsquo;s major and can be anything from electrical engineering, mathematics, philosophy, psychology, or any other field. It can be compared to a minor in the American university system, with the key difference being that only a minimum of 10 &lt;a href="https://en.wikipedia.org/wiki/European_Credit_Transfer_and_Accumulation_System"&gt;ECTS&lt;/a&gt; credits are required, compared to the 30 ECTS typically required in the U.S.&lt;/p&gt;
&lt;p&gt;When it came time to choose my supplementary subject, I chose mathematics with the idea of strengthening my foundation and gaining a deeper understanding of my passion for cognitive systems. The first course I took was &lt;em&gt;Introduction to Algebra and Number Theory&lt;/em&gt;, which, despite the enormous effort and time I invested, I failed miserably. Consequently, I decided to select easier courses for my next attempts—one of which was &lt;em&gt;Markov Chains&lt;/em&gt;, which I am embarrassed to say I barely passed, and &lt;em&gt;Optimization Theory&lt;/em&gt;, which I unfortunately failed as well.&lt;/p&gt;
&lt;p&gt;I have to retake &lt;em&gt;Optimization Theory&lt;/em&gt; this semester, so I thought it would be a good opportunity to write an article about its content.&lt;/p&gt;
&lt;p&gt;For a broader motivation as to why this subject might be interesting, look no further than today’s biggest trend: &lt;strong&gt;AI&lt;/strong&gt;. But what exactly is AI? If you ask a dozen people, you might get two dozen answers. But broadly speaking, AI refers to creating systems that exhibit intelligent behavior. At the forefront of this field are deep learning models, which process vast amounts of data to generate models that can accurately predict outcomes within specific capabilities—for example, models such as &lt;a href="https://www.llama.com/"&gt;Llama&lt;/a&gt;, &lt;a href="https://www.deepseek.com/"&gt;DeepSeek&lt;/a&gt;, or &lt;a href="https://blackforestlabs.ai/ultra-home/"&gt;Flux&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;All of these AI models can, in a very strict sense, be considered optimization-theoretical problems. Given the vast amount of data, the challenge is to design a model that produces outputs aligned with the input data. Although I will not specifically cover the methodology of &lt;a href="https://en.wikipedia.org/wiki/Gradient_descent"&gt;gradient descent&lt;/a&gt;, which is commonly used in such models, gaining a solid foundation in optimization theory will provide deeper insights into topics like gradient descent in the future.&lt;/p&gt;


&lt;figure&gt;
&lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width: 50%" src="https://monkemanx.github.io/attachments/stop_math.png"&gt;
 &lt;figcaption style="margin-top: 10px;text-align:center"&gt;
 Someone create one of these memes, but for optimization theory and send it to me.
 &lt;/figcaption&gt;
&lt;/figure&gt;


&lt;div style="margin-bottom: 40px;"&gt;&lt;/div&gt;

&lt;h2 id="1-introduction"&gt;1. Introduction&lt;/h2&gt;
&lt;h3 id="11-example-problems"&gt;1.1 Example Problems&lt;/h3&gt;
&lt;h4 id="example-1-machine-occupancy-problem"&gt;Example 1: Machine Occupancy Problem&lt;/h4&gt;
&lt;p&gt;In a workshop, we have two types of workpieces that can be produced on three types of machines. The running time for machines \(M_1, M_2, M_3\) for the workpieces \(E_1, E_2\) is known. What is the maximum number of workpieces that we can produce?&lt;/p&gt;



 



&lt;table class="data-table"&gt;
	&lt;thead&gt;
			&lt;tr&gt;
					&lt;th&gt;Machines&lt;/th&gt;
					&lt;th&gt;\(E_1\) h/piece&lt;/th&gt;
					&lt;th&gt;\(E_2\) h/piece&lt;/th&gt;
					&lt;th&gt;Running Time&lt;/th&gt;
			&lt;/tr&gt;
	&lt;/thead&gt;
	&lt;tbody&gt;
			&lt;tr&gt;
					&lt;td&gt;\(M_1\)&lt;/td&gt;
					&lt;td&gt;10&lt;/td&gt;
					&lt;td&gt;10&lt;/td&gt;
					&lt;td&gt;8000&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;\(M_2\)&lt;/td&gt;
					&lt;td&gt;10&lt;/td&gt;
					&lt;td&gt;30&lt;/td&gt;
					&lt;td&gt;18000&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;\(M_3\)&lt;/td&gt;
					&lt;td&gt;20&lt;/td&gt;
					&lt;td&gt;10&lt;/td&gt;
					&lt;td&gt;14000&lt;/td&gt;
			&lt;/tr&gt;
	&lt;/tbody&gt;
&lt;/table&gt;



&lt;p&gt;We want to create a mathematical model that describes the different constraints. For example, for workpieces \(E_1\) and \(E_2\), we derive the following constraint for machine \(M_2\):&lt;/p&gt;
$$ 
10 E_1 + 30 E_2 \leq 18000 
$$&lt;p&gt;We also need to ensure that \(E_1, E_2 \geq 0 \) since we cannot have a negative number of workpieces. With that, our complete model is:&lt;/p&gt;
$$ 
\begin{align} 
10 E_1 + 10 E_2 &amp;\leq 8000 \\ 
10 E_1 + 30 E_2 &amp;\leq 18000 \\ 
20 E_1 + 10 E_2 &amp;\leq 14000 \\ 
E_1, E_2 &amp;\geq 0 
\end{align} 
$$&lt;p&gt;We can summarize a possible solution for \(E_1, E_2\) using a vector:&lt;/p&gt;
$$ 
x = \begin{pmatrix} E_1 \\ E_2 \end{pmatrix} 
$$&lt;p&gt;Some possible solutions for the problem above include:&lt;/p&gt;
$$ 
x^1 = \begin{pmatrix} 700 \\ 0 \end{pmatrix}, \quad 
x^2 = \begin{pmatrix} 0 \\ 600 \end{pmatrix}, \quad 
x^3 = \begin{pmatrix} 300 \\ 500 \end{pmatrix} 
$$&lt;p&gt;These are valid solutions because we can substitute them into our model and verify that all inequalities are satisfied.&lt;/p&gt;
&lt;p&gt;We want to refine our model further. Let&amp;rsquo;s say the manufacturing times for the workpieces are different, with \(E_1\) taking 40 hours and \(E_2\) taking 50 hours. Then, we can ask the question: what is the best possible solution under all given constraints? Formally, we can write this as:&lt;/p&gt;
$$ 
\begin{aligned} 
\max \quad &amp; 40 E_1 + 50 E_2 \\ 
\text{subject to} \quad &amp; 10 E_1 + 10 E_2 \leq 8000 \\ 
&amp; 10 E_1 + 30 E_2 \leq 18000 \\ 
&amp; 20 E_1 + 10 E_2 \leq 14000 \\ 
&amp; E_1, E_2 \geq 0 
\end{aligned} 
$$&lt;p&gt;This means that among all possible solutions \(x\), we want to find the one that maximizes \( Z(x) := 40 E_1 + 50 E_2 \). We call \(Z(x)\) the &lt;strong&gt;objective function&lt;/strong&gt;, and the inequalities represent the &lt;strong&gt;set of constraints&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;We can now substitute our possible solutions into \(Z(x)\). For example:&lt;/p&gt;
$$ 
Z(x^1) = 40 \times 700 + 50 \times 0 = 28000 
$$&lt;p&gt;This means that if we produce 700 workpieces of \(E_1\) and 0 workpieces of \(E_2\), the total running time required for our machines would be 28,000 hours. By inserting our other possible solutions into \(Z(x)\), we find that \(x^3\) is the best solution from the given set. It is, in fact, the most optimal solution, which we will confirm later.&lt;/p&gt;
&lt;h4 id="example-2-paint-production"&gt;Example 2: Paint Production&lt;/h4&gt;
&lt;p&gt;A company produces four different types of paint: \(P_1, P_2, P_3,\) and \(P_4\). The respective profits per kilogram are 1.50€, 1€, 2€, and 1.40€. The company can produce a maximum of 1300 kg of paints \(L_1\) and \(L_2\), and a total of 2000 kg of \(L_1, L_3,\) and \(L_4\). Additionally, they must produce at least 800 kg of \(L_3\), and they know that they will never need more than 500 kg of \(L_4\).&lt;/p&gt;
&lt;p&gt;The goal is to determine the optimal production quantities for each type of paint to achieve the highest possible profit.&lt;/p&gt;
&lt;p&gt;The objective function to maximize profit is:&lt;/p&gt;
$$ 
z = 1.5 l_1 + l_2 + 2 l_3 + 1.4 l_4 
$$&lt;p&gt;Subject to the following constraints:&lt;/p&gt;
$$ 
\begin{aligned} 
l_1 + l_2 &amp;\leq 1300 \\ 
l_1 + l_3 + l_4 &amp;\leq 2000 \\ 
l_3 &amp;\geq 800 \\ 
l_4 &amp;\leq 500 
\end{aligned} 
$$&lt;p&gt;Additionally, the production amounts cannot be negative:&lt;/p&gt;
$$ 
l_i \geq 0, \quad (i = 1,2,3,4) 
$$&lt;h4 id="example-3-stiglers-nutrition-model"&gt;Example 3: Stigler&amp;rsquo;s Nutrition Model&lt;/h4&gt;
&lt;p&gt;In &lt;a href="https://onlinelibrary.wiley.com/doi/10.2307/1231810"&gt;1945, Stigler&lt;/a&gt; focused on the problem of minimizing the cost of an average man&amp;rsquo;s daily diet while meeting the required nutritional needs. For his study, he analyzed 77 different foods, examining their nutritional content and costs. The table below presents a selection of the foods and their corresponding nutrient values.&lt;/p&gt;



 



&lt;table class="data-table"&gt;
	&lt;thead&gt;
			&lt;tr&gt;
					&lt;th&gt;Food Item&lt;/th&gt;
					&lt;th&gt;Calories (1000)&lt;/th&gt;
					&lt;th&gt;Protein (g)&lt;/th&gt;
					&lt;th&gt;Calcium (g)&lt;/th&gt;
					&lt;th&gt;Iron (mg)&lt;/th&gt;
					&lt;th&gt;Vitamin-A (1000 iu)&lt;/th&gt;
					&lt;th&gt;Vitamin-B1 (mg)&lt;/th&gt;
					&lt;th&gt;Vitamin-B2 (mg)&lt;/th&gt;
					&lt;th&gt;Niacin (mg)&lt;/th&gt;
					&lt;th&gt;Vitamin-C (mg)&lt;/th&gt;
			&lt;/tr&gt;
	&lt;/thead&gt;
	&lt;tbody&gt;
			&lt;tr&gt;
					&lt;td&gt;Wheat&lt;/td&gt;
					&lt;td&gt;44.7&lt;/td&gt;
					&lt;td&gt;1411&lt;/td&gt;
					&lt;td&gt;2.0&lt;/td&gt;
					&lt;td&gt;365&lt;/td&gt;
					&lt;td&gt;55.4&lt;/td&gt;
					&lt;td&gt;33.3&lt;/td&gt;
					&lt;td&gt;441&lt;/td&gt;
					&lt;td&gt;&lt;/td&gt;
					&lt;td&gt;&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;Cornmeal&lt;/td&gt;
					&lt;td&gt;36&lt;/td&gt;
					&lt;td&gt;897&lt;/td&gt;
					&lt;td&gt;1.7&lt;/td&gt;
					&lt;td&gt;99&lt;/td&gt;
					&lt;td&gt;30.9&lt;/td&gt;
					&lt;td&gt;17.4&lt;/td&gt;
					&lt;td&gt;7.9&lt;/td&gt;
					&lt;td&gt;106&lt;/td&gt;
					&lt;td&gt;&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;Canned Milk&lt;/td&gt;
					&lt;td&gt;8.4&lt;/td&gt;
					&lt;td&gt;422&lt;/td&gt;
					&lt;td&gt;15.1&lt;/td&gt;
					&lt;td&gt;9&lt;/td&gt;
					&lt;td&gt;26&lt;/td&gt;
					&lt;td&gt;3&lt;/td&gt;
					&lt;td&gt;23.5&lt;/td&gt;
					&lt;td&gt;11&lt;/td&gt;
					&lt;td&gt;60&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;Margarine&lt;/td&gt;
					&lt;td&gt;20.6&lt;/td&gt;
					&lt;td&gt;17&lt;/td&gt;
					&lt;td&gt;0.6&lt;/td&gt;
					&lt;td&gt;6&lt;/td&gt;
					&lt;td&gt;55.8&lt;/td&gt;
					&lt;td&gt;0.2&lt;/td&gt;
					&lt;td&gt;&lt;/td&gt;
					&lt;td&gt;&lt;/td&gt;
					&lt;td&gt;&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;Cheese&lt;/td&gt;
					&lt;td&gt;7.4&lt;/td&gt;
					&lt;td&gt;448&lt;/td&gt;
					&lt;td&gt;16.4&lt;/td&gt;
					&lt;td&gt;19&lt;/td&gt;
					&lt;td&gt;28.1&lt;/td&gt;
					&lt;td&gt;0.8&lt;/td&gt;
					&lt;td&gt;10.3&lt;/td&gt;
					&lt;td&gt;4&lt;/td&gt;
					&lt;td&gt;&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;Peanut-B&lt;/td&gt;
					&lt;td&gt;15.7&lt;/td&gt;
					&lt;td&gt;661&lt;/td&gt;
					&lt;td&gt;1&lt;/td&gt;
					&lt;td&gt;48&lt;/td&gt;
					&lt;td&gt;9.6&lt;/td&gt;
					&lt;td&gt;8.1&lt;/td&gt;
					&lt;td&gt;471&lt;/td&gt;
					&lt;td&gt;&lt;/td&gt;
					&lt;td&gt;&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;Lard&lt;/td&gt;
					&lt;td&gt;41.7&lt;/td&gt;
					&lt;td&gt;&lt;/td&gt;
					&lt;td&gt;&lt;/td&gt;
					&lt;td&gt;0.2&lt;/td&gt;
					&lt;td&gt;&lt;/td&gt;
					&lt;td&gt;0.5&lt;/td&gt;
					&lt;td&gt;5&lt;/td&gt;
					&lt;td&gt;&lt;/td&gt;
					&lt;td&gt;&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;Liver&lt;/td&gt;
					&lt;td&gt;2.2&lt;/td&gt;
					&lt;td&gt;333&lt;/td&gt;
					&lt;td&gt;0.2&lt;/td&gt;
					&lt;td&gt;139&lt;/td&gt;
					&lt;td&gt;169.2&lt;/td&gt;
					&lt;td&gt;6.4&lt;/td&gt;
					&lt;td&gt;50.8&lt;/td&gt;
					&lt;td&gt;316&lt;/td&gt;
					&lt;td&gt;525&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;Pork Roast&lt;/td&gt;
					&lt;td&gt;4.4&lt;/td&gt;
					&lt;td&gt;249&lt;/td&gt;
					&lt;td&gt;0.3&lt;/td&gt;
					&lt;td&gt;37&lt;/td&gt;
					&lt;td&gt;18.2&lt;/td&gt;
					&lt;td&gt;3.6&lt;/td&gt;
					&lt;td&gt;79&lt;/td&gt;
					&lt;td&gt;&lt;/td&gt;
					&lt;td&gt;&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;Salmon&lt;/td&gt;
					&lt;td&gt;5.8&lt;/td&gt;
					&lt;td&gt;705&lt;/td&gt;
					&lt;td&gt;6.8&lt;/td&gt;
					&lt;td&gt;45&lt;/td&gt;
					&lt;td&gt;3.5&lt;/td&gt;
					&lt;td&gt;1&lt;/td&gt;
					&lt;td&gt;4.9&lt;/td&gt;
					&lt;td&gt;209&lt;/td&gt;
					&lt;td&gt;&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;Green Beans&lt;/td&gt;
					&lt;td&gt;2.4&lt;/td&gt;
					&lt;td&gt;138&lt;/td&gt;
					&lt;td&gt;3.7&lt;/td&gt;
					&lt;td&gt;80&lt;/td&gt;
					&lt;td&gt;69&lt;/td&gt;
					&lt;td&gt;4.3&lt;/td&gt;
					&lt;td&gt;5.8&lt;/td&gt;
					&lt;td&gt;37&lt;/td&gt;
					&lt;td&gt;862&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;Cabbage&lt;/td&gt;
					&lt;td&gt;2.6&lt;/td&gt;
					&lt;td&gt;125&lt;/td&gt;
					&lt;td&gt;4.0&lt;/td&gt;
					&lt;td&gt;36&lt;/td&gt;
					&lt;td&gt;7.2&lt;/td&gt;
					&lt;td&gt;9.0&lt;/td&gt;
					&lt;td&gt;4.5&lt;/td&gt;
					&lt;td&gt;26&lt;/td&gt;
					&lt;td&gt;5369&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;Onions&lt;/td&gt;
					&lt;td&gt;5.8&lt;/td&gt;
					&lt;td&gt;166&lt;/td&gt;
					&lt;td&gt;3.8&lt;/td&gt;
					&lt;td&gt;59&lt;/td&gt;
					&lt;td&gt;16.6&lt;/td&gt;
					&lt;td&gt;4.7&lt;/td&gt;
					&lt;td&gt;5.9&lt;/td&gt;
					&lt;td&gt;21&lt;/td&gt;
					&lt;td&gt;1184&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;Potatoes&lt;/td&gt;
					&lt;td&gt;14.3&lt;/td&gt;
					&lt;td&gt;336&lt;/td&gt;
					&lt;td&gt;1.8&lt;/td&gt;
					&lt;td&gt;118&lt;/td&gt;
					&lt;td&gt;6.7&lt;/td&gt;
					&lt;td&gt;29.4&lt;/td&gt;
					&lt;td&gt;7.1&lt;/td&gt;
					&lt;td&gt;198&lt;/td&gt;
					&lt;td&gt;2522&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;Spinach&lt;/td&gt;
					&lt;td&gt;1.1&lt;/td&gt;
					&lt;td&gt;106&lt;/td&gt;
					&lt;td&gt;&lt;/td&gt;
					&lt;td&gt;138&lt;/td&gt;
					&lt;td&gt;918.4&lt;/td&gt;
					&lt;td&gt;5.7&lt;/td&gt;
					&lt;td&gt;13.8&lt;/td&gt;
					&lt;td&gt;33&lt;/td&gt;
					&lt;td&gt;2755&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;Sweet Potatoes&lt;/td&gt;
					&lt;td&gt;9.6&lt;/td&gt;
					&lt;td&gt;138&lt;/td&gt;
					&lt;td&gt;2.7&lt;/td&gt;
					&lt;td&gt;54&lt;/td&gt;
					&lt;td&gt;290.7&lt;/td&gt;
					&lt;td&gt;8.4&lt;/td&gt;
					&lt;td&gt;5.4&lt;/td&gt;
					&lt;td&gt;83&lt;/td&gt;
					&lt;td&gt;1912&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;Peaches&lt;/td&gt;
					&lt;td&gt;8.5&lt;/td&gt;
					&lt;td&gt;87&lt;/td&gt;
					&lt;td&gt;1.7&lt;/td&gt;
					&lt;td&gt;173&lt;/td&gt;
					&lt;td&gt;86.8&lt;/td&gt;
					&lt;td&gt;1.2&lt;/td&gt;
					&lt;td&gt;4.3&lt;/td&gt;
					&lt;td&gt;55&lt;/td&gt;
					&lt;td&gt;57&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;Prunes&lt;/td&gt;
					&lt;td&gt;12.8&lt;/td&gt;
					&lt;td&gt;99&lt;/td&gt;
					&lt;td&gt;2.5&lt;/td&gt;
					&lt;td&gt;154&lt;/td&gt;
					&lt;td&gt;85.7&lt;/td&gt;
					&lt;td&gt;3.9&lt;/td&gt;
					&lt;td&gt;4.3&lt;/td&gt;
					&lt;td&gt;65&lt;/td&gt;
					&lt;td&gt;257&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;Lima Beans&lt;/td&gt;
					&lt;td&gt;17.4&lt;/td&gt;
					&lt;td&gt;1055&lt;/td&gt;
					&lt;td&gt;3.7&lt;/td&gt;
					&lt;td&gt;459&lt;/td&gt;
					&lt;td&gt;5.1&lt;/td&gt;
					&lt;td&gt;26.9&lt;/td&gt;
					&lt;td&gt;38.2&lt;/td&gt;
					&lt;td&gt;93&lt;/td&gt;
					&lt;td&gt;&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;Navy Beans&lt;/td&gt;
					&lt;td&gt;26.9&lt;/td&gt;
					&lt;td&gt;1691&lt;/td&gt;
					&lt;td&gt;11.4&lt;/td&gt;
					&lt;td&gt;792&lt;/td&gt;
					&lt;td&gt;&lt;/td&gt;
					&lt;td&gt;38.4&lt;/td&gt;
					&lt;td&gt;24.6&lt;/td&gt;
					&lt;td&gt;217&lt;/td&gt;
					&lt;td&gt;&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;Requirements&lt;/td&gt;
					&lt;td&gt;3000&lt;/td&gt;
					&lt;td&gt;70&lt;/td&gt;
					&lt;td&gt;0.8&lt;/td&gt;
					&lt;td&gt;12&lt;/td&gt;
					&lt;td&gt;5000&lt;/td&gt;
					&lt;td&gt;1.8&lt;/td&gt;
					&lt;td&gt;2.7&lt;/td&gt;
					&lt;td&gt;18&lt;/td&gt;
					&lt;td&gt;75&lt;/td&gt;
			&lt;/tr&gt;
	&lt;/tbody&gt;
&lt;/table&gt;


 &lt;p class="source"&gt;Source: diet.gms : Stigler&amp;#39;s Nutrition Model&lt;/p&gt;


&lt;p&gt;The nutritional requirements in the last row correspond to a man weighing 70 kg with an average level of activity. The table is normalized so that each unit of measurement costs exactly $1. Thus, the problem can be solved by minimizing the total cost of the selected food items.&lt;/p&gt;
&lt;p&gt;Stigler found that an optimal diet cost only $39.90 per year, which amounts to less than 11 cents per day. Remarkably, the optimal solution required only 10 different types of food.&lt;/p&gt;
&lt;h3 id="12-from-the-model-to-the-solution"&gt;1.2 From the Model to the Solution&lt;/h3&gt;
&lt;p&gt;All the problems we have seen so far have one thing in common: we have a &lt;em&gt;linear function&lt;/em&gt; that we want to minimize, subject to a set of &lt;em&gt;linear&lt;/em&gt; constraints. Such problems are called &lt;em&gt;linear optimization problems&lt;/em&gt; or &lt;em&gt;linear programs&lt;/em&gt; (short &lt;em&gt;LP&lt;/em&gt;).&lt;/p&gt;
&lt;p&gt;Every optimization problem consists of five distinct phases:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Find an appropriate mathematical optimization model for the task at hand.&lt;/li&gt;
&lt;li&gt;Simplify the mathematical model as much as possible.&lt;/li&gt;
&lt;li&gt;Collect data that accurately describes the concrete task.&lt;/li&gt;
&lt;li&gt;Apply a suitable method to find a solution.&lt;/li&gt;
&lt;li&gt;Interpret the solution.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;In practice, this is an &lt;strong&gt;iterative process.&lt;/strong&gt;&lt;/p&gt;
&lt;h2 id="2-geometry-of-linear-programs"&gt;2. Geometry of Linear Programs&lt;/h2&gt;
&lt;p&gt;The set of solutions for an optimization problem has important characteristics, which can significantly simplify the search for the optimal solution.&lt;/p&gt;
&lt;h3 id="21-the-canonical-form-of-linear-programming"&gt;2.1 The Canonical Form of Linear Programming&lt;/h3&gt;
&lt;p&gt;We can represent a solution to an optimization problem as a vector \(x \in \mathbb{R}^n\) with \(n\) components. The objective function \(z(x)\) can be described using the coefficients \(c_0, c_1, c_2, ..., c_n \in \mathbb{R}\):&lt;/p&gt;
$$
z(x) = c_0 + c_1 x_1 + c_2 x_2 + \dots + c_n x_n
$$&lt;p&gt;We can represent the column vector as a row vector \(c\) through transposition:&lt;/p&gt;
$$
c^T := (c_1, c_2, ..., c_n)
$$&lt;p&gt;Using matrix multiplication, we can then calculate the value of \(z(x)\) as:&lt;/p&gt;
$$
z(x) = c_0 + c^T x
$$&lt;p&gt;A system of inequalities, like our constraint set, can be written as:&lt;/p&gt;
$$
\begin{aligned}
a_{11} x_1 + a_{12} x_2 + \dots + a_{1n} x_n &amp;\leq b_1 \\
a_{21} x_1 + a_{22} x_2 + \dots + a_{2n} x_n &amp;\leq b_2 \\
\vdots \\
a_{m1} x_1 + a_{m2} x_2 + \dots + a_{mn} x_n &amp;\leq b_m \\
x_1, x_2, \dots, x_n &amp;\geq 0
\end{aligned}
$$&lt;p&gt;This can be described by a matrix \(A\) for the coefficients of the inequalities and a column vector \(b\):&lt;/p&gt;
$$
A = 
\begin{pmatrix} 
a_{11} &amp; a_{12} &amp; \cdots &amp; a_{1n} \\
a_{21} &amp; a_{22} &amp; \cdots &amp; a_{2n} \\
\vdots &amp; \vdots &amp; \ddots &amp; \vdots \\
a_{m1} &amp; a_{m2} &amp; \cdots &amp; a_{mn} \\
\end{pmatrix}, 
\quad
b = 
\begin{pmatrix}
b_1 \\
b_2 \\
\vdots \\
b_m
\end{pmatrix}.
$$&lt;p&gt;In summary, we can describe the constraint set of our linear program as:&lt;/p&gt;
$$
Ax \leq b, \quad x \geq 0
$$&lt;p&gt;This is also called the &lt;strong&gt;valid/feasible solution set&lt;/strong&gt;. Furthermore, we can describe our optimization problem as:&lt;/p&gt;
$$
\max\{ c_0 + c^T x \ | \ Ax \leq b, x \geq 0 \}
$$&lt;p&gt;We can omit the constant \(c_0\) since it does not affect the result of the solution. This formulation is called the &lt;em&gt;canonical form&lt;/em&gt;. The set&lt;/p&gt;
$$
M = \{ x \in \mathbb{R}^n \ | \ Ax \leq b, x \geq 0 \}
$$&lt;p&gt;is called the set of &lt;em&gt;possible valid/feasible solutions&lt;/em&gt;, or simply the &lt;em&gt;valid/feasible set&lt;/em&gt;.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Lemma&lt;/strong&gt; Existence of Solution&lt;/p&gt;
&lt;p&gt;Let \(K \neq \emptyset\) be &lt;em&gt;compact&lt;/em&gt; and \(f : K \to \mathbb{R}\) &lt;em&gt;continuous&lt;/em&gt;. Then has the the following optimization problem a global solution&lt;/p&gt;
$$
(P) \quad \min f(x) \ \ \text{on} \ \ x \in K
$$&lt;/blockquote&gt;
&lt;p&gt;A set is &lt;em&gt;compact&lt;/em&gt;, if it is &lt;em&gt;closed&lt;/em&gt; (i.e. it contains all of its limits points) and &lt;em&gt;bounded&lt;/em&gt; (i.e. it has a boundary).&lt;/p&gt;
&lt;p&gt;A function is &lt;em&gt;continuous&lt;/em&gt;, if the function is a single unbroken curve. A function is continious if it is a composition of continious functions.&lt;/p&gt;
&lt;h3 id="22-transformation-into-canonical-form"&gt;2.2 Transformation into Canonical Form&lt;/h3&gt;
&lt;p&gt;Not all optimization problems are initially in canonical form. Some problems may look different, and we first need to transform them into the canonical form.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Minimizing \(c^T x\) is equivalent to maximizing \((-c)^T x\).&lt;/li&gt;
&lt;li&gt;An inequality \(a^T x \geq b\) can be replaced by \((-a)^T x \leq -b\).&lt;/li&gt;
&lt;li&gt;An equality \(a^T x = b\) can be replaced by two inequalities: \(a^T x \geq b\) and \(a^T x \leq b\).&lt;/li&gt;
&lt;li&gt;If we have a variable \(x_j\) that is not necessarily positive, we can replace it with a pair of positive variables: \(x_j = x_j^+ - x_j^-\), where both \(x_j^+\) and \(x_j^-\) are non-negative.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;By applying these transformations, any linear programming problem can be converted into canonical form.&lt;/p&gt;
&lt;h3 id="23-linear-function-lines-half-spaces-and-polyhedral-spaces"&gt;2.3 Linear Function, Lines, Half-Spaces, and Polyhedral Spaces&lt;/h3&gt;
&lt;p&gt;The linear objective function and the set of valid/feasible solutions in an optimization problem have many important properties. This section examines a few of these properties.&lt;/p&gt;
&lt;p&gt;Two points \(u, v\) define a &lt;em&gt;line&lt;/em&gt;:&lt;/p&gt;
$$
L := \{u + \lambda (u - v) \ | \ \lambda \in \mathbb{R} \}
$$&lt;p&gt;The linear objective function \(z(x) := z_0 + c^T x\) can be described as \(z(x) = z_0 + c^T(u + \lambda (x))(u - v)\).&lt;/p&gt;
&lt;p&gt;We call a set \(K\) a &lt;em&gt;cone&lt;/em&gt; if for every \(x \in K\) and \(\lambda \geq 0\), the following holds: \(\lambda x \in K\). A &lt;em&gt;conic hull&lt;/em&gt;, denoted by \(cone(S)\), for a set \(S\) is the set of all conic combinations of the points in \(S\), i.e.,&lt;/p&gt;
$$
cone(S) = \left\{\sum_i \alpha_i x_i \ \middle| \ \alpha_i \geq 0, x_i \in S \right\}
$$

&lt;figure&gt;
&lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width: 50%" src="https://monkemanx.github.io/attachments/cone_hull.jpg"&gt;
&lt;figcaption style="margin-top: 10px; text-align:center"&gt;
 Illustration of conic hull.
&lt;/figcaption&gt;
&lt;/figure&gt;


&lt;p&gt;The sets of solutions:&lt;/p&gt;
$$
H_1 := \{x \ | \ a^T x \leq b \}, \quad H_2 := \{x \ | \ a^T x &lt; b \}
$$&lt;p&gt;\(H_1\) is called a &lt;em&gt;closed half-space&lt;/em&gt;, and \(H_2\) is called an &lt;em&gt;open half-space&lt;/em&gt;. Both are limited by the &lt;em&gt;hyperplane&lt;/em&gt;:&lt;/p&gt;
$$
H_3 = \{x \ | \ a^T x = b \}
$$

&lt;figure&gt;
&lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width: 60%" src="https://monkemanx.github.io/attachments/hyprplane_halfspace.jpg"&gt;
&lt;/figure&gt;


&lt;p&gt;The intersection of a finite number of half-spaces is called a &lt;em&gt;polyhedral space&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;Importantly, the valid solutions of a linear program form a &lt;em&gt;polyhedral space&lt;/em&gt;.&lt;/p&gt;
&lt;h3 id="24-geometrical-depiction-of-two-variables"&gt;2.4 Geometrical Depiction of Two Variables&lt;/h3&gt;
&lt;p&gt;Let&amp;rsquo;s consider the following optimization problem in two dimensions:&lt;/p&gt;
$$
\begin{aligned}
\max \quad &amp; c_1 x_1 + c_2 x_2 \\
\text{subject to} \quad &amp; a_{i1} x_1 + a_{i2} x_2 \leq b_i, \quad (1 \leq i \leq m) \\
&amp; x_1, x_2 \geq 0
\end{aligned}
$$&lt;p&gt;The set of solutions that satisfy the inequalities forms a polyhedral space \(P\). A given inequality \(\{x \ | \ a_1 x_1 + a_2 x_2 \leq b\}\) represents a closed half-space, which is referred to as a half-plane in two dimensions. The intersection of these half-planes forms the set \(P\).&lt;/p&gt;
&lt;p&gt;The intersection of half-spaces can be either empty or unrestricted, as shown below:&lt;/p&gt;


&lt;figure&gt;
 &lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width: 80%" src="https://monkemanx.github.io/attachments/option_intersection_lines.jpg"&gt;
&lt;/figure&gt;
 &lt;figcaption style="margin-top: 10px;text-align:center"&gt;
 On the left, the intersection is empty. In the middle, the intersection produces a half-plane. On the right, the intersection produces a cone.
 &lt;/figcaption&gt;


&lt;p&gt;Furthermore, \(P\) can either be empty, unrestricted, or restricted, as seen below:&lt;/p&gt;


&lt;figure&gt;
 &lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width: 80%" src="https://monkemanx.github.io/attachments/limited_vs_unlimited.jpg"&gt;
 &lt;figcaption style="margin-top: 10px;text-align:center"&gt;
 On the left, \(P\) is formed by the intersection of five half-spaces. On the right, \(P\) is unrestricted and formed by the intersection of four half-spaces.
 &lt;/figcaption&gt;
&lt;/figure&gt;


&lt;p&gt;The objective function can be thought of as a shear between lines \(\{ x \ | \ c_1 x_1 + c_2 x_2 = z\}\), where \(z \in \mathbb{R}\). The goal of an optimization problem is to find where \(z\) achieves its maximum value, while still being within the region \(P\); in other words, the intersection between the objective function and the feasible region should not be empty.&lt;/p&gt;


&lt;figure&gt;
 &lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width: 80%" src="https://monkemanx.github.io/attachments/optimization_problem_graphical.jpg"&gt;
 &lt;figcaption style="margin-top: 10px;text-align:center"&gt;
 On the left, the objective function \(Z\) has a finite optimum. On the right, the objective function \(Z\) can take any arbitrary value.
 &lt;/figcaption&gt;
&lt;/figure&gt;


&lt;p&gt;Thus, we can solve a linear program graphically in two dimensions. However, this method of solution finding does not work in higher dimensions. Therefore, we need a method that works in higher dimensions as well.&lt;/p&gt;


&lt;figure&gt;
 &lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width: 70%" src="https://monkemanx.github.io/attachments/machine_occupancy_problem_graphical.jpg"&gt;
 &lt;figcaption style="margin-top: 10px;text-align:center"&gt;
 This is a graphical representation of the &lt;i&gt;Machine Occupancy Problem&lt;/i&gt; from the beginning of this article.
 &lt;/figcaption&gt;
&lt;/figure&gt;


&lt;h3 id="25-weyl-and-farkas-lemma"&gt;2.5 Weyl and Farkas Lemma&lt;/h3&gt;
&lt;p&gt;The following are famous lemmas in the theory of polyhedra.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Lemma: Weyl&lt;/strong&gt;&lt;br&gt;
Every finite convex cone is polyhedral, and can be written in the form \( \{x \in \mathbb{R}^n : Ax \leq 0\} \). Therefore, finite convex cones are closed.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Lemma: Separation&lt;/strong&gt;&lt;br&gt;
Let \(C \subset \mathbb{R}^n\) be a convex, closed set, with \(C \neq \emptyset \), and let \(x \notin C\). Then, there exists a hyperplane that separates \(x\) and \(C\). In other words, there exists a vector \(a \in \mathbb{R}^n\), \(a \neq 0\), and a scalar \(\gamma \in \mathbb{R}\) such that:&lt;/p&gt;
$$
a^T z \leq \gamma \leq a^T x
$$&lt;p&gt;If \(C\) is a convex cone, then \(\gamma = 0\) can be chosen.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;This lemma means that if we have a closed set, we can always find a hyperplane that separates the convex set from the points outside the set.&lt;/p&gt;


&lt;figure&gt;
 &lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width: 60%" src="https://monkemanx.github.io/attachments/seperation_lemma.jpg"&gt;
&lt;/figure&gt;


&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Lemma: Farkas&lt;/strong&gt;&lt;br&gt;
Let \(A \in \mathbb{R}^{m \times n}, b \in \mathbb{R}^m\). Then, one of the following statements is true, and the other false:&lt;br&gt;
(i) The equation \(Ax = b, \ x \geq 0\) has a solution \(x \in \mathbb{R}^n\).&lt;br&gt;
(ii) The system \(A^Ty \leq 0, \ b^Ty &gt; 0\) has a solution \(y \in \mathbb{R}^m\).&lt;/p&gt;
&lt;/blockquote&gt;


&lt;figure&gt;
 &lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width: 80%" src="https://monkemanx.github.io/attachments/farkas_lemma.jpg"&gt;
 &lt;figcaption style="margin-top: 10px;text-align:center"&gt;
 Illustration of the Farkas Lemma: the left side visualizes the first case, and the right side visualizes the second case.
 &lt;/figcaption&gt;
&lt;/figure&gt;


&lt;h3 id="26-the-main-theorem-of-linear-programming"&gt;2.6 The Main Theorem of Linear Programming&lt;/h3&gt;
&lt;p&gt;Now, let&amp;rsquo;s think about what points are optimal in a linear function on a non-empty polyhedral space.&lt;/p&gt;
&lt;p&gt;The first claim is that every line-free polyhedron is the convex hull of its corners and extremal directions.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Definition&lt;/strong&gt;&lt;br&gt;
\(x \in M\) is called a &lt;strong&gt;corner&lt;/strong&gt; or &lt;strong&gt;extremal point&lt;/strong&gt; of \(M\) if \(x\) cannot be represented as a convex combination of two different points from \(M\). In other words:&lt;/p&gt;
$$
y, z \in M, \quad \lambda \in (0,1), \quad x = \lambda y + (1- \lambda) z \implies y = z
$$&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Definition&lt;/strong&gt;&lt;br&gt;
A vector \(u \in \mathbb{R}^n\) is called an &lt;strong&gt;extremal direction&lt;/strong&gt; of \(M\) if the set \(\{ x + t u : t \geq 0 \} \subset M\) holds. Furthermore, \(u\) cannot be represented as a convex combination of two independent directions. In other words:&lt;/p&gt;
$$
\begin{aligned}
v, w \text{ directions}, \quad \lambda \in (0,1), \quad u = \lambda v + (1-\lambda) w \\
\implies v, w \text{ are linearly independent}.
\end{aligned}
$$&lt;/blockquote&gt;
&lt;p&gt;Next, we state a result that characterizes the corners and extremal directions of a polyhedron.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Lemma&lt;/strong&gt;&lt;br&gt;
Let \( M = \{Ax \leq b\} \), and define the set of &lt;strong&gt;active indices&lt;/strong&gt; \(I(x) := \{ i \in \{1, \dots, m\} : (Ax)_i = b_i \}\) for \(x \in M\). Then the following hold:&lt;/p&gt;
&lt;p&gt;(a) \(x \in M\) is a &lt;strong&gt;corner&lt;/strong&gt; of \(M\) if and only if \( \text{span}\{A_i^T : i \in I(x)\} = \mathbb{R}^n \), where \(A_i^T\) is the \(i\)-th row of \(A\).&lt;/p&gt;
&lt;p&gt;(b) \(M\) has a finite number of corners.&lt;/p&gt;
&lt;p&gt;(c) \(u \in \mathbb{R}^n\) is an &lt;strong&gt;extremal direction&lt;/strong&gt; of \(M\) if and only if \(Au \leq 0\) and there are no other linearly independent directions \(v \in \mathbb{R}^n\) such that \(u = \lambda v + (1-\lambda) w\).&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;This lemma gives us important information: the set of valid solutions to our optimization problem has a finite number of corners, and we can find these corners by checking whether the active indices of a point form a span that equals \(\mathbb{R}^n\).&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Lemma&lt;/strong&gt;&lt;br&gt;
Let \( M = \{Ax \leq b\} \) be a polyhedron and \(S \subset M\) be a side of \(M\). Then:&lt;/p&gt;
&lt;p&gt;(a) Every corner of \(S\) is also a corner of \(M\).&lt;/p&gt;
&lt;p&gt;(b) Every corner of \(S\) is an extremal direction of \(M\).&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Finally, we can formulate the main theorem of linear programming:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Main Theorem&lt;/strong&gt;&lt;br&gt;
Let \(M \subset \mathbb{R}^n\) be a line-free polyhedron. Then:&lt;/p&gt;
$$
M = \text{conv} \{ \text{extr}(M) \cup \text{extr directions}(M) \}
$$&lt;/blockquote&gt;
&lt;p&gt;In other words, \(M\) is the convex hull of its corners and extremal directions.&lt;/p&gt;
&lt;p&gt;From this, we deduce:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Corollary&lt;/strong&gt;&lt;br&gt;
Let \(M \subset \mathbb{R}^n\) be a line-free polyhedron. Then \(M\) has exactly as many corners as it has no lines.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h3 id="27-set-of-problems-and-solutions"&gt;2.7 Set of Problems and Solutions&lt;/h3&gt;
&lt;h4 id="271-transforming-the-problem-into-canonical-form"&gt;2.7.1 Transforming the Problem into Canonical Form&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Task:&lt;/strong&gt; Given the optimization problem:&lt;/p&gt;
\[
\text{maximize} \quad 5x_1 + x_2 - 2x_3
\]&lt;p&gt;
under the constraints:
&lt;/p&gt;
\[
x_1 \geq 0, \quad x_2 \leq 0, \quad x_3 \geq 0, \quad x_1 + 2x_2 + 3x_3 = 6,
\]&lt;p&gt;
bring it into the canonical form:&lt;/p&gt;
\[
(P) \quad \min \ c^T x, \quad M = \{ A x \leq b \}
\]&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution&lt;/summary&gt;
 
 &lt;p&gt;We start by rewriting the constraints:&lt;/p&gt;
\[
\begin{aligned}
-x_1 &amp;\leq 0 \\
x_2 &amp;\leq 0 \\
-x_3 &amp;\leq 0 \\
x_1 + 2x_2 + 3x_3 &amp;\leq 6 \\
-x_1 - 2x_2 - 3x_3 &amp;\leq -6
\end{aligned}
\]&lt;p&gt;Next, we rewrite the objective function \( 5x_1 + x_2 - 2x_3 \) as a minimization problem. To convert a maximization problem into a minimization problem, we negate the coefficients of the objective function, giving us:&lt;/p&gt;
\[
c = (-5, -1, 2)^T
\]&lt;p&gt;Now, we have the canonical form:&lt;/p&gt;
\[
\min \ (-5, -1, 2)^T \begin{pmatrix} x_1 \\ x_2 \\ x_3 \end{pmatrix}
\]&lt;p&gt;under the constraints:&lt;/p&gt;
\[
\begin{pmatrix}
1 &amp; 0 &amp; 0 \\
0 &amp; 1 &amp; 0 \\
0 &amp; 0 &amp; -1 \\
1 &amp; 2 &amp; 3 \\
-1 &amp; -2 &amp; -3
\end{pmatrix}
\begin{pmatrix} x_1 \\ x_2 \\ x_3 \end{pmatrix}
\leq
\begin{pmatrix} 0 \\ 0 \\ 0 \\ 6 \\ -6 \end{pmatrix}
\]
 
&lt;/details&gt;


&lt;h4 id="272-transforming-the-problem-into-canonical-form"&gt;2.7.2 Transforming the Problem into Canonical Form&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Task:&lt;/strong&gt; Given the optimization problem:&lt;/p&gt;
\[
\text{minimize} \quad x_1 - 2x_2 + 3x_3
\]&lt;p&gt;
under the constraints:&lt;/p&gt;
\[
x_1 - x_2 \leq 1, \quad 3x_2 - 4x_3 \leq 5,
\]&lt;p&gt;
bring it into the canonical form:&lt;/p&gt;
\[
(P) \quad \min \ c^T x, \quad M = \{ A y = b, \, y \geq 0 \}
\]&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution&lt;/summary&gt;
 
 &lt;p&gt;To ensure that all variables are non-negative, we introduce new variables \( u_i \) and \( v_i \) for each of \( x_1, x_2, x_3 \), such that:&lt;/p&gt;
\[
x_1 = u_1 - v_1, \quad x_2 = u_2 - v_2, \quad x_3 = u_3 - v_3,
\]&lt;p&gt;
where \( u_i, v_i \geq 0 \). With this, all variables are now non-negative. We can then rewrite the constraints as:&lt;/p&gt;
\[
\begin{aligned}
u_1 - v_1 - u_2 - v_2 &amp;\leq 1, \\
3(u_2 - v_2) - 4(u_3 - v_3) &amp;\leq 5.
\end{aligned}
\]&lt;p&gt;Next, we introduce slack variables \( y_1, y_2 \geq 0 \) to turn the inequalities into equalities:&lt;/p&gt;
\[
\begin{aligned}
u_1 - v_1 - u_2 - v_2 + y_1 &amp;= 1, \\
3(u_2 - v_2) - 4(u_3 - v_3) + y_2 &amp;= 5.
\end{aligned}
\]&lt;p&gt;The objective function needs to be transformed as well. The new objective function becomes:&lt;/p&gt;
\[
c = (1, -1, -2, 2, 3, -3, 0, 0).
\]&lt;p&gt;Finally, we express the problem in canonical form as:&lt;/p&gt;
\[
\begin{pmatrix}
1 &amp; -1 &amp; -1 &amp; -1 &amp; 0 &amp; 0 &amp; 1 &amp; 0 \\
0 &amp; 0 &amp; 3 &amp; -3 &amp; -4 &amp; 4 &amp; 0 &amp; 1
\end{pmatrix}
y = 
\begin{pmatrix}
1 \\
5
\end{pmatrix}
\]
 
&lt;/details&gt;


&lt;h4 id="273-feasibility"&gt;2.7.3 Feasibility&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Task:&lt;/strong&gt; Construct a linear problem with the form:&lt;/p&gt;
\[
(P) \quad \text{Minimize} \ \ c^T \ \text{subject to} \ Ax \leq b
\]&lt;p&gt;So that:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;(a) (P) has no feasible points&lt;/li&gt;
&lt;li&gt;(b) (P) has exactly one feasible point&lt;/li&gt;
&lt;li&gt;(c) (P) is feasible, but \(\inf(P) = - \infty\)&lt;/li&gt;
&lt;/ul&gt;
&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution (a)&lt;/summary&gt;
 
 &lt;p&gt;In order to have no feasible points, the constraint set needs to be empty. This can be achieved by having one inequality that allows all points before \(-1\) and another inequality that allows all points after \(1\), which results in an empty intersection.&lt;/p&gt;
&lt;p&gt;Constraints:&lt;/p&gt;
\[
\begin{aligned}
x_1 &amp;\leq -1 \\
x_1 &amp;\geq 1 
\end{aligned}
\]&lt;p&gt;This can be represented in matrix form as:&lt;/p&gt;
\[
\begin{pmatrix}
1 &amp; 0 \\
-1 &amp; 0 \\
\end{pmatrix}
x 
\ = \ 
\begin{pmatrix}
-1 \\
1
\end{pmatrix}
\]&lt;p&gt;The intersection of these inequalities is empty, as shown in the illustration below:&lt;/p&gt;
&lt;figure&gt;
 &lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width:80%" src="https://monkemanx.github.io/attachments/no_feasibility.jpg"&gt;
&lt;/figure&gt;

 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution (b)&lt;/summary&gt;
 
 &lt;p&gt;To have exactly one feasible point, we need three inequalities. With two inequalities, we can have the x-axis in the feasible set, and by adding a third inequality, we can target a specific point, such as \((0,0)\).&lt;/p&gt;
&lt;p&gt;Constraints:&lt;/p&gt;
\[
\begin{aligned}
x_2 &amp;\leq 0 \\
x_2 &amp;\geq 0 \\
x_1 + x_2 &amp;\geq 0 
\end{aligned}
\]&lt;p&gt;This can be represented in matrix form as:&lt;/p&gt;
\[
\begin{pmatrix}
0 &amp; 1 \\
0 &amp; -1 \\
-1 &amp; -1 
\end{pmatrix}
x 
\ = \ 
\begin{pmatrix}
0 \\
0 \\
0
\end{pmatrix}
\]&lt;p&gt;The feasible set in this case consists of exactly one point, as shown in the illustration below:&lt;/p&gt;
&lt;figure&gt;
 &lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width:80%" src="https://monkemanx.github.io/attachments/feasibility_one_point.jpg"&gt;
&lt;/figure&gt;

 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution (c)&lt;/summary&gt;
 
 &lt;p&gt;To make the objective function unbounded, the feasibility set needs to be a line, and the objective function should optimize only one of the variables (e.g., \(x_2\)).&lt;/p&gt;
&lt;p&gt;Constraints:&lt;/p&gt;
\[
\begin{aligned}
x_1 &amp;\leq 1 \\
x_1 &amp;\geq 1 \\
\end{aligned}
\]&lt;p&gt;This can be represented in matrix form as:&lt;/p&gt;
\[
\begin{pmatrix}
1 &amp; 0 \\
-1 &amp; 0 \\
\end{pmatrix}
x 
\ = \
\begin{pmatrix}
1 \\
1
\end{pmatrix}
, \quad C =
\begin{pmatrix}
0 \\
1
\end{pmatrix}
\]&lt;p&gt;The feasibility set in this case is a line, as shown in the illustration below:&lt;/p&gt;
&lt;figure&gt;
 &lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width:80%" src="https://monkemanx.github.io/attachments/feasibility_line.jpg"&gt;
&lt;/figure&gt;

 
&lt;/details&gt;


&lt;h4 id="274-feasibility-without-corners"&gt;2.7.4 Feasibility without Corners&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Task:&lt;/strong&gt; Construct an optimization problem of the form&lt;/p&gt;
\[
\text{Minimize} \ \ c^T \ \ \text{under} \ \ M = \{x \in \mathbb{R}^n : Ax \leq b\}
\]&lt;p&gt;that has a solution, but where the feasibility set \(M\) has &lt;strong&gt;no corners&lt;/strong&gt;.&lt;/p&gt;
&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution&lt;/summary&gt;
 
 &lt;p&gt;One such problem is to use only one inequality as a restriction. The constraints will not define a polyhedron with corners, and the feasible set will form a region without any extreme points.&lt;/p&gt;
&lt;p&gt;The problem is:&lt;/p&gt;
\[
\min \ x_2 \quad \text{under} \quad M = \{(x_1, x_2) \in \mathbb{R}^2 : -x_2 \leq 1\}
\]&lt;p&gt;In this case, the feasible set \(M\) is a half-plane, which has no corners. The feasible points form a continuous region, and the optimization problem will have a solution at the boundary of the feasible set.&lt;/p&gt;

 
&lt;/details&gt;


&lt;h2 id="3-existence-theory-and-duality-theory-for-linear-optimization-problems"&gt;3. Existence Theory and Duality Theory for Linear Optimization Problems&lt;/h2&gt;
&lt;h3 id="31-existence-lemma"&gt;3.1 Existence Lemma&lt;/h3&gt;
&lt;p&gt;Let us assume our optimization problem is in the following canonical form:&lt;/p&gt;
$$
(P) \quad \min c^T x \quad \text{subject to} \ M = \{Ax = b, x \geq 0\}
$$&lt;p&gt;Note that \(M\) is polyhedral. Furthermore, it does not contain any lines, since \(M \subset \{x \geq 0\}\), which has no lines. This means we can use the main theorem of linear programming.&lt;/p&gt;
&lt;p&gt;Does this problem always have a solution? No, but if the problem is restricted, then we will always find a solution.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Lemma&lt;/strong&gt;&lt;br&gt;
Let (P) be a given problem, and&lt;/p&gt;
$$
 u^* := \inf\{c^T x\} &gt; - \infty
 $$&lt;p&gt;(a) If (P) is valid, meaning \(M \neq \emptyset\), then (P) has a solution, meaning there exists \(x^* \in M\) with \(c^T x^* = u^*\), so for all other \(x\), \(c^T x^* \leq c^T x\).&lt;/p&gt;
&lt;p&gt;(b) If (P) has a solution, then this solution is a &lt;strong&gt;corner&lt;/strong&gt;.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;This simplifies the search for the optimal solution enormously. Instead of trying all possible values, we only need to identify the corners of the optimization problem and evaluate them.&lt;/p&gt;
&lt;h3 id="32-the-dual-problem"&gt;3.2 The Dual Problem&lt;/h3&gt;
&lt;p&gt;Let (P) be given as:&lt;/p&gt;
$$
(P) \quad \min c^T x \quad \text{subject to} \ M = \{Ax = b, x \geq 0\}
$$&lt;p&gt;We call (P) the &lt;strong&gt;primal problem&lt;/strong&gt;. For every primal problem, there is a corresponding dual problem:&lt;/p&gt;
$$
(D) \quad \max b^T y \quad \text{subject to} \ N = \{A^T y \leq c\}
$$&lt;p&gt;For this dual problem, two important lemmas exist:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Lemma&lt;/strong&gt; (Weak Duality Lemma)&lt;br&gt;
Let (P) and (D) both have valid solutions, i.e., \(M \neq \emptyset\) and \(N \neq \emptyset\).&lt;/p&gt;
&lt;p&gt;(a) The value of the objective function of the dual problem is always smaller than or equal to that of the primal problem.&lt;/p&gt;
&lt;p&gt;(b) Both problem (P) and (D) have solutions.&lt;/p&gt;
&lt;p&gt;(c) If \(x^* \in M\) and \(y^* \in N\), then the following holds: \(b^T y^* = c^T x^*\).&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Lemma&lt;/strong&gt; (Strong Duality Lemma)&lt;br&gt;
Let (P) and (D) be given.&lt;/p&gt;
&lt;p&gt;(a) If (P) and (D) are both valid, then (P) and (D) have solutions, and \(\min(P) = \max(D)\).&lt;/p&gt;
&lt;p&gt;(b) If (P) is valid and (D) is not, then \(\inf(P) = -\infty\).&lt;/p&gt;
&lt;p&gt;(c) If (D) is valid and (P) is not, then \(\sup(D) = +\infty\).&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;This lemma has the consequence that if we want to solve an optimization problem, we can decide whether to solve its primal or its dual problem, since both will give us the same solution.&lt;/p&gt;
&lt;h3 id="33-set-of-problems-and-solutions"&gt;3.3 Set of Problems and Solutions&lt;/h3&gt;
&lt;p&gt;Some problems may require knowledge of the simplex algorithm.&lt;/p&gt;
&lt;h4 id="331-simplex-duality-and-number-of-steps"&gt;3.3.1 Simplex, Duality, and Number of Steps&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Task:&lt;/strong&gt; We have a linear problem&lt;/p&gt;
$$
(P) \quad \text{minimize} \ c^T x \quad \text{subject to} \ 0 \leq x_i \leq 1
$$&lt;p&gt;(a) Show that Phase 2 of the simplex algorithm takes a maximum of \(n\) steps to find the final solution.&lt;br&gt;
(b) Formulate the dual problem and check whether your findings from (a) are applicable to the dual problem.&lt;/p&gt;
&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution (a)&lt;/summary&gt;
 
 &lt;p&gt;We first introduce slack variables and bring the problem into canonical form:&lt;/p&gt;
$$
(P) \quad \text{minimize} \ c^T x \quad \text{subject to} \ 
\begin{bmatrix}
I &amp; I 
\end{bmatrix}
\begin{bmatrix}
x \\
z
\end{bmatrix}
= e, \quad x, z \geq 0 
$$&lt;p&gt;We can write the first tableau as:&lt;/p&gt;
$$
\begin{array}{ccccccc|c}
c_1 &amp; c_2 &amp; \dots &amp; c_n &amp; 0 &amp; \dots &amp; 0 &amp; 0 \\
\hline 
1 &amp; 0 &amp; \dots &amp; 0 &amp; 1 &amp; 0 &amp; \dots &amp; 0 &amp; 1 \\
0 &amp; 1 &amp; \dots &amp; 0 &amp; 0 &amp; 1 &amp; \dots &amp; 0 &amp; 1 \\
\vdots &amp; \vdots &amp; &amp; \vdots &amp; \vdots &amp; &amp; \vdots \\
0 &amp; 0 &amp; \dots &amp; 1 &amp; 0 &amp; 0 &amp; \dots &amp; 1 &amp; 1
\end{array}
$$&lt;p&gt;This tableau has exactly one non-zero entry in every column (except for the cost vector). This means that in each step, only the cost vector changes. Since a column only becomes a pivot when its cost vector entry is negative, each column can only become a pivot once. Therefore, we can have a maximum of \(n\) steps, or more precisely, as many steps as there are negative entries in the cost vector \(c_i\).&lt;/p&gt;

 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution (b)&lt;/summary&gt;
 
 &lt;p&gt;We have two restrictions in our primal problem (P):&lt;/p&gt;
$$
x_i \leq 1, \quad -x_i \leq 0
$$&lt;p&gt;Thus, the dual problem is:&lt;/p&gt;
$$
(D) \quad \text{maximize} \ b^T y' \quad \text{subject to} \ y' \leq c, \ y' \geq 0
$$&lt;p&gt;With \(y = -y'\) and introducing slack variables \(w\), we get:&lt;/p&gt;
$$
\text{minimize} \ e^T y \quad \text{subject to} \ 
\begin{bmatrix}
-I &amp; I
\end{bmatrix}
\begin{bmatrix}
y &amp; w 
\end{bmatrix}
= c, \quad y, w \geq 0
$$&lt;p&gt;The form of (D) is very similar to the primal problem. Since \(c \geq 0\) must be satisfied, we need to multiply all rows with \(-1\) where the entries were negative in (a). However, because each row has exactly one \(1\) and one \(-1\), with the rest being zeros, we can still formulate a basic solution. But it won’t necessarily satisfy all conditions (e.g., the cost vector can be negative), so we cannot immediately apply Phase 2 of the simplex algorithm.&lt;/p&gt;

 
&lt;/details&gt;


&lt;h4 id="332-duality"&gt;3.3.2 Duality&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Task:&lt;/strong&gt; Transform the following primal program into its dual program:&lt;/p&gt;
$$
\max \ x_1 + 2x_2 + 3x_3
$$&lt;p&gt;Subject to the constraints: \(x_1 - x_2 - x_3 = -2\), \(x_1 + x_2 \leq 5\), \(x_3 \geq 0\).&lt;/p&gt;
&lt;p&gt;What can we say about the primal program using the dual program?&lt;/p&gt;
&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution&lt;/summary&gt;
 
 &lt;p&gt;We first introduce variables so that all variables are positive:
\(x_1 = x_1^+ - x_1^-, \, x_2 = x_2^+ - x_2^- \). Then we introduce a slack variable \(s_1 \geq 0\). We can then write the primal problem as:&lt;/p&gt;
$$
\begin{aligned}
x_1^+ - x_1^- - x_2^+ - x_2^- - x_3 &amp;= -2 \\
x_1^+ - x_1^- + x_2^+ - x_2^- + s_1 &amp;= 5
\end{aligned}
$$&lt;p&gt;So, for the primal problem, we have:&lt;/p&gt;
$$
A = 
\begin{pmatrix}
-1 &amp; 1 &amp; 1 &amp; -1 &amp; 1 &amp; 0 \\
1 &amp; -1 &amp; 1 &amp; -1 &amp; 0 &amp; 1
\end{pmatrix}, \quad c = (-1, 1, 2, -2, -3, 0), \quad b = (2, 5)
$$&lt;p&gt;We can now write the dual problem:&lt;/p&gt;
$$
\max 2y_1 + 5y_2
$$&lt;p&gt;Subject to the restrictions:&lt;/p&gt;
$$
N = \{y \in \mathbb{R}^2 : A^T y \leq b\}
$$&lt;p&gt;This problem is not feasible. We can see that by looking at the first two constraints: \(-y_1 + y_2 \leq -1\) and \(y_1 - y_2 \leq 1\), which imply \(y_1 - y_2 = 2\). However, when we look at the third and fourth constraints, we get \(y_1 + y_2 = 2\). The only solution that satisfies both constraints is \(y_1 = \frac{3}{2}, \ y_2 = \frac{1}{2}\).&lt;/p&gt;
&lt;p&gt;But this solution does not satisfy the inequality \(y_2 \leq 0\).&lt;/p&gt;
&lt;p&gt;Thus, with the help of the strong duality lemma, we can conclude that the primal problem (P) also has no solution. In other words:&lt;/p&gt;
$$
\sup(P) = \infty
$$
 
&lt;/details&gt;


&lt;h4 id="333-duality"&gt;3.3.3 Duality&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Task:&lt;/strong&gt; Given the problem:&lt;/p&gt;
$$
(P) \quad \text{Minimize} \ c^T x \quad \text{subject to} \ M = \{Ax = b, -s \leq x \leq s \}
$$&lt;p&gt;Show that the dual problem is given by:&lt;/p&gt;
$$
(D) \quad \text{Maximize} \ (b + A s)^T y + 2s^T z \quad \text{subject to} \ M = \{A^T y + z \leq c, z \leq 0\}
$$&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution&lt;/summary&gt;
 
 &lt;p&gt;We first formulate (P) in its canonical form. We can transform \(-s \leq x \leq s\) into \(0 \leq u \leq 2s\) by setting \(u := x + s\). With this, we get for our restriction set \(Ax = b \implies A(u - s) = b \implies A u = b + A s\).&lt;/p&gt;
&lt;p&gt;Next, we need to introduce slack variables to convert the inequality \(0 \leq u \leq 2s\) into an equality. Thus, we set \(2s := u + v\) with slack variable \(v \geq 0\).&lt;/p&gt;
&lt;p&gt;This transforms our problem into:&lt;/p&gt;
$$
(P') \quad \text{Minimize} \ c'^T x' \quad \text{subject to} \ M = \{A' x' = b', x' \geq 0\}
$$&lt;p&gt;where:&lt;/p&gt;
$$
x' = 
\begin{pmatrix}
u \\
v
\end{pmatrix}
, \quad 
c' = 
\begin{pmatrix}
c \\
0
\end{pmatrix}
, \quad 
A' = 
\begin{pmatrix}
A &amp; 0 \\
I &amp; I
\end{pmatrix}
, \quad 
b' = 
\begin{pmatrix}
b + A s \\
2s
\end{pmatrix}
$$&lt;p&gt;The dual problem corresponding to this is:&lt;/p&gt;
$$
(D) \quad \text{Maximize} \ (b + A s)^T y + 2s^T z \quad \text{subject to} \ M = \{A^T y + z \leq c, z \leq 0\}
$$
 
&lt;/details&gt;


&lt;h4 id="334-self-duality"&gt;3.3.4 Self-Duality&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Task:&lt;/strong&gt; Given a skew-symmetric matrix \(A = -A^T\) and \(b = -c\), we have the following optimization problem:&lt;/p&gt;
$$
(P') \quad \text{Minimize} \ c^T x \quad \text{subject to} \ M = \{Ax \geq b, x \geq 0 \}
$$&lt;p&gt;Show that:&lt;/p&gt;
&lt;p&gt;a) (P&amp;rsquo;) is self-dual, meaning the dual problem of (P&amp;rsquo;) is the same as (P&amp;rsquo;).&lt;br&gt;
b) If \(M \neq \emptyset\), then (P&amp;rsquo;) has an optimal solution and \(x^T x^* = 0\).&lt;br&gt;
c) What is a primal-dual pair of linear programs that has no feasible solution?&lt;/p&gt;
&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution (a)&lt;/summary&gt;
 
 &lt;p&gt;We transform our problem into canonical form by writing \(b = -c\) and introducing slack variables \(z = Ax + c\). Then,&lt;/p&gt;
$$
(P) \iff (P) \quad \min \ c^T x + 0^T z \quad \text{subject to} \quad
\begin{bmatrix}
A &amp; -I
\end{bmatrix}
\begin{bmatrix}
x \\
z
\end{bmatrix}
= -c
$$&lt;p&gt;The dual problem is then:&lt;/p&gt;
$$
(D) \quad \max \ -c^T y \quad \text{subject to} \quad
\begin{bmatrix}
A^T \\
-I
\end{bmatrix}
y \leq
\begin{bmatrix}
c \\
0
\end{bmatrix}
$$&lt;p&gt;This simplifies to:&lt;/p&gt;
$$
\iff - \min \ c^T y \quad \text{subject to} \quad A y \geq -c, \quad y \geq 0
$$
 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution (b)&lt;/summary&gt;
 
 &lt;p&gt;With \(M \neq \emptyset\) (from part a), the constraint set of the dual problem is \(N \neq \emptyset\). The strong duality lemma tells us that (P) has a solution, and for (P) and (D) to have optimal solutions, the following must hold:&lt;/p&gt;
$$
-c^T y^* = c^T x^*
$$&lt;p&gt;Because the problems are identical except for the sign, they have the same optimal solution \(x^* = y^*\). Thus,&lt;/p&gt;
$$
c^T x^* = 0
$$
 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution (c)&lt;/summary&gt;
 
 &lt;p&gt;If we have a skew-symmetric matrix \(A\), then the dual problem is identical. If the primal solution is not feasible, then the dual problem will not be feasible either.&lt;/p&gt;
&lt;p&gt;Choose:&lt;/p&gt;
$$
A = \begin{bmatrix}
0 &amp; -1 &amp; 0 \\
1 &amp; 0 &amp; -1 \\
0 &amp; 1 &amp; 0
\end{bmatrix}, 
\quad c = (-1, \ldots, -1)^T
$$&lt;p&gt;This matrix is skew-symmetric, and \(Ax \geq -c\) is not satisfied for any \(x \geq 0\) because \(-x_2 \geq 0 \iff x_2 \leq -1\), which contradicts \(x \geq 0\).&lt;/p&gt;

 
&lt;/details&gt;


&lt;h2 id="4-application-of-graph-theory-and-game-theory"&gt;4. Application of Graph Theory and Game Theory&lt;/h2&gt;
&lt;h3 id="41-flow-maximization"&gt;4.1 Flow Maximization&lt;/h3&gt;
&lt;p&gt;Let’s look at &lt;em&gt;directed&lt;/em&gt; graphs with &lt;em&gt;metrics&lt;/em&gt;. Imagine the edges as oil pipelines that connect at some point and branch out again later. We have a source \(Q\) that pumps oil and a sink \(S\) that consumes the oil. We need to take into account the capacity limitations of the pipelines. Below is an example:&lt;/p&gt;


&lt;figure&gt;
 &lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width: 80%" src="https://monkemanx.github.io/attachments/oil_transportation.jpg"&gt;
&lt;/figure&gt;


&lt;p&gt;This graph can be described using a capacity matrix \(C\), where each entry in the matrix represents the maximum capacity a given pipeline has to transport oil. The matrix has the following constraints:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;\(c_{ij} \geq 0\); we can&amp;rsquo;t have negative flow of oil.
&lt;ul&gt;
&lt;li&gt;\(c_{ij} = 0\) means there is no pipeline between nodes \(i\) and \(j\).&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;\(i = 1\) is the source and \(i = n\) is the sink.&lt;/li&gt;
&lt;li&gt;No edge goes into the source, and no edge goes out of the source, i.e., \(c_{i1} = c_{ni} = 0\).&lt;/li&gt;
&lt;li&gt;There is only one source and one sink.&lt;/li&gt;
&lt;li&gt;\(c_{ij}c_{ji} = 0\), meaning that on each edge, the oil can flow only in one direction.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If all these restrictions are fulfilled, we can call the matrix \(C\) a &lt;strong&gt;capacity matrix&lt;/strong&gt;.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Definition&lt;/strong&gt;&lt;br&gt;
Let \(C\) be a capacity matrix. A &lt;strong&gt;flow&lt;/strong&gt; is a matrix \(X = (x_{ij})\) with&lt;/p&gt;
$$
\sum x_{ij} = \sum x_{jk}
$$&lt;/blockquote&gt;
&lt;p&gt;This means that everything that flows into node \(j\) must also flow out again.&lt;/p&gt;
&lt;p&gt;Thus, we have two matrices: the &lt;em&gt;capacity matrix&lt;/em&gt;, which gives us the maximum capacity of our pipeline network, and the &lt;em&gt;flow matrix&lt;/em&gt;, which gives us the current flow of oil in the pipeline network.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Definition&lt;/strong&gt;&lt;/p&gt;
$$
\sum x_{1j} = \sum x_{kn}
$$&lt;p&gt;
This metric is called the &lt;strong&gt;Value&lt;/strong&gt; of the Flow \(X\) and is denoted by \(W(X)\).&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;This is essentially the amount of oil we have pumped through our network, which must be the same as the amount of oil that will reach the sink.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Definition&lt;/strong&gt;&lt;br&gt;
Let \(C\) be a capacity matrix. A &lt;strong&gt;cut&lt;/strong&gt; \(J^-, J^+\) is a decomposition of the graph such that \(J^+ \cup J^- = \{1, \dots, n\}\) and \(J^+ \cap J^- = \emptyset\), with \(1 \in J^-\) and \(n \in J^+\). The capacity of a cut is:&lt;/p&gt;
$$
K(J^-, J^+) := \sum_{i \in J^-, j \in J^+} C_{ij}
$$&lt;/blockquote&gt;
&lt;p&gt;In other words, to find the capacity of a cut, we sum the capacities of all edges that lie between \(J^-\) and \(J^+\).&lt;/p&gt;


&lt;figure&gt;
 &lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width: 80%" src="https://monkemanx.github.io/attachments/cut_flow_graph.jpg"&gt;
&lt;/figure&gt;


&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Lemma&lt;/strong&gt;&lt;br&gt;
Let \(C\) be a capacity matrix. For every possible cut \(J^-, J^+\) and flow \(X\):&lt;/p&gt;
$$
W(X) \leq K(J^-, J^+)
$$&lt;/blockquote&gt;
&lt;p&gt;This is the weak duality lemma. Maximizing the flow is the primal problem, while minimizing the capacity of the cut is the dual problem.&lt;/p&gt;
&lt;p&gt;Next, we can state the strong duality lemma.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Lemma&lt;/strong&gt;&lt;br&gt;
The following is true:&lt;/p&gt;
$$
\max\{W(X) : X\} = \min\{K(J^+, J^-) : (J^+, J^-)\}
$$&lt;/blockquote&gt;
&lt;h3 id="42-game-theory"&gt;4.2 Game Theory&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;Game Situation&lt;/strong&gt;: We have two players in a zero-sum game. Player 1 (\(P_1\)) has the option to choose any of the strategies \(a_1, \dots, a_n\), and Player 2 (\(P_2\)) can choose any of the alternative strategies \(b_1, \dots, b_n\). If \(P_1\) chooses the action \(a_i\) and \(P_2\) chooses the option \(b_j\), the resulting payout is \(a_{ij}\). Thus, the whole game and its payouts can be described in a matrix:&lt;/p&gt;
$$
A =
\begin{pmatrix}
a_{11} &amp; a_{12} &amp; \dots &amp; a_{1n} \\
\vdots &amp; \vdots &amp; \ddots &amp; \vdots \\
a_{m1} &amp; \dots &amp; \dots &amp; a_{mn}
\end{pmatrix}
$$&lt;p&gt;For example, the game &amp;ldquo;rock-paper-scissors&amp;rdquo; can be written like this:&lt;/p&gt;
$$
A =
\begin{pmatrix}
0 &amp; 1 &amp; -1 \\
-1 &amp; 0 &amp; 1 \\
1 &amp; -1 &amp; 0
\end{pmatrix}
$$&lt;p&gt;Game theory is interesting for modeling how economic players act in the long term. The central question is: How should a player act to be reasonable/optimal?&lt;/p&gt;
&lt;p&gt;For this, players choose their strategies:&lt;/p&gt;
$$
x = (x_1, \dots, x_n)^T, \quad y = (y_1, \dots, y_n)^T
$$&lt;p&gt;The strategies should sum to 1, i.e. \(\sum x_j = 1\), and each \(x_j\) gives the probability that Player 1 will choose strategy \(j\).&lt;/p&gt;
&lt;p&gt;We call a strategy &lt;strong&gt;pure&lt;/strong&gt; if \(x\) is a unit vector, meaning the player always chooses the same action. If this is not the case, the strategy is called &lt;strong&gt;mixed&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;The expected payout for the game can be calculated as:&lt;/p&gt;
$$
\phi(x, y) := y^T A x
$$&lt;p&gt;For Player 1 to act optimally, they should:&lt;/p&gt;
$$
\max_{x^T e = 1} y^T A x
$$&lt;p&gt;But Player 2 should do the opposite. Thus, we have the following two optimization problems:&lt;/p&gt;
$$
\begin{aligned}
&amp; (P_1) \quad \min \max y^T A x, \quad x \geq 0, \, x^T e = 1 \\
&amp; (P_2) \quad \max \min y^T A x, \quad y \geq 0, \, y^T e = 1
\end{aligned}
$$&lt;p&gt;We can formalize this as a linear optimization problem:&lt;/p&gt;
$$
\begin{aligned}
&amp; (P^*_1) \quad \min x_0, \quad x \geq 0, \, x^T e = 1, \, A x \leq x_0 e \\
&amp; (P^*_2) \quad \max y_0, \quad y \geq 0, \, y^T e = 1, \, A y \geq y_0 e
\end{aligned}
$$&lt;p&gt;These two problems are dual to each other, which is evident in the following lemma.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Lemma&lt;/strong&gt; &lt;em&gt;Main Theorem of Matrix Games&lt;/em&gt;&lt;br&gt;
Let \(x^*, y^* \in \mathbb{R}\) with \(e^T x^* = 1\) and \(e^T y^* = 1\), then&lt;/p&gt;
$$
y^* A x^* = \min_x \max_y y^T A x = \max_y \min_x y^T A x =: v
$$&lt;p&gt;The metric \(v\) is called the &lt;strong&gt;value&lt;/strong&gt; of the matrix game.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Definition&lt;/strong&gt;&lt;br&gt;
A matrix game is called &lt;strong&gt;fair&lt;/strong&gt; if the value is zero.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Lemma&lt;/strong&gt;&lt;br&gt;
If a matrix game \(A\) is skew-symmetric, i.e. \(A^T = -A\), then the value of the game is 0, and the game is fair.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Definition&lt;/strong&gt;&lt;br&gt;
A game described by the matrix \(A\) is called a &lt;strong&gt;saddle-point game&lt;/strong&gt; if&lt;/p&gt;
$$
\min_j \max_i a_{ij} = \max_i \min_j a_{ij}
$$&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Lemma&lt;/strong&gt;&lt;br&gt;
Every saddle-point game has a solution consisting of pure strategies.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h3 id="43-set-of-problems-and-solutions"&gt;4.3 Set of Problems and Solutions&lt;/h3&gt;
&lt;h4 id="431-matrix-game"&gt;4.3.1 Matrix Game&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Task:&lt;/strong&gt; Rudy and Carla like to camp on a mountain. Rudy likes hills, and Carla likes valleys. The mountain on which they camp has \(n\) intersecting paths. They decide to camp at one of these intersections. As a compromise, Rudy is allowed to choose the first path, and Carla chooses the path that intersects with Rudy&amp;rsquo;s first choice. They further know the attitude of all the paths.&lt;/p&gt;
&lt;p&gt;(a) Formulate this as a two-person matrix game, where Rudy tries to camp at a location as high as possible, and Carla tries to camp at a location as low as possible.&lt;br&gt;
(b) What does &amp;ldquo;fair&amp;rdquo; mean in this context?&lt;br&gt;
(c) Use the following table of attitudes to show that the game is a saddle-point game. Then, find the best strategies for the players and determine whether the game is fair or not.&lt;/p&gt;
$$
\begin{array}{|c|c|c|c|c|}
\hline
\text{} &amp; \text{Path 1} &amp; \text{Path 2} &amp; \text{Path 3} &amp; \text{Path 4} \\
\hline
\text{Path 1} &amp; 3500 &amp; 1000 &amp; 2500 &amp; 500 \\
\text{Path 2} &amp; 1000 &amp; 1000 &amp; 1500 &amp; 2000 \\
\text{Path 3} &amp; 2500 &amp; 1500 &amp; 2000 &amp; 2000 \\
\text{Path 4} &amp; 1500 &amp; 1000 &amp; 500 &amp; 3000 \\
\hline
\end{array}
$$&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution (a)&lt;/summary&gt;
 
 &lt;p&gt;The payout matrix \(A = (a_{ik})\) represents the attitude of the intersections between the two paths. Carla is Player 1 (P1), and Rudy is Player 2 (P2).&lt;/p&gt;
&lt;p&gt;Carla tries to minimize the attitude:&lt;/p&gt;
$$
\text{Maximize} \ \ x_0 \ \ \text{subject to} \ \ A x \leq x_0 e_n, \, x \geq 0
$$&lt;p&gt;Rudy tries to maximize the attitude:&lt;/p&gt;
$$
\text{Minimize} \ \ y_0 \ \ \text{subject to} \ \ A y \leq y_0 e_n, \, y \geq 0
$$
 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution (b)&lt;/summary&gt;
 
 Since the attitude values are greater than 0, we can&amp;rsquo;t use 0 as a criterion for determining whether the matrix game is fair. Instead, we should calculate the average attitude \(h\) and look at the modified payout matrix \(A - h e_n e_m^T\).
 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution (c)&lt;/summary&gt;
 
 &lt;p&gt;To determine whether the matrix game is a saddle-point game, we need to check if the following condition is satisfied:&lt;/p&gt;
$$
\min_j \max_i a_{ij} = \max_i \min_j a_{ij}
$$&lt;p&gt;We can see that:&lt;/p&gt;
$$
\begin{aligned}
\min_j \max_i a_{ij} &amp;= \min \{3500, 1500, 2500, 3000\} = 1500 \\
\max_i \min_j a_{ij} &amp;= \max \{500, 1000, 1500, 500\} = 1500
\end{aligned}
$$&lt;p&gt;Thus, the matrix game is a saddle-point game. Therefore, the optimal strategy is a pure strategy: Way 3 for Rudy and Way 2 for Carla.&lt;/p&gt;
&lt;p&gt;Calculating the average attitude, we get \(h = 1687.5\). Hence, the game is not fair because Carla would win.&lt;/p&gt;

 
&lt;/details&gt;


&lt;h2 id="5-the-generic-simplex-method"&gt;5. The Generic Simplex Method&lt;/h2&gt;
&lt;p&gt;The simplex algorithm is based on the idea that for linear optimization problems, it is enough to find an optimal corner to solve the problem. We can start at an arbitrary corner of the polyhedron and walk along its sides to the next corner, looking for a better value of the objective function. Since a polyhedron has a finite number of corners, the algorithm stops after a finite number of steps when it no longer finds a corner that improves the objective function.&lt;/p&gt;
&lt;p&gt;The simplex algorithm takes as input a problem in the following canonical form:&lt;/p&gt;
$$
(P) \quad \text{Minimize} \ \ f(x) := c^T x \ \ \text{subject to} \ \ M = \{x \in \mathbb{R}^n : Ax = b, x \geq 0\}
$$&lt;p&gt;If our optimization problem is not in this form, we need to transform it first by introducing slack variables to transform inequalities into equalities, and by introducing non-negative variables to ensure all variables are positive.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;For example:&lt;/strong&gt;&lt;/p&gt;
$$
\begin{aligned}
 &amp; \text{Maximize } x_1 + 2x_2 \\
 &amp; \text{subject to:} \\
 &amp; x_1 + 2x_2 \leq 4, \\
 &amp; 2x_1 + x_2 \leq 3, \\
 &amp; x_2 \geq 1, \\
 &amp; x_j \geq 0, \quad j = 1, 2.
\end{aligned}
$$&lt;p&gt;This can be transformed into:&lt;/p&gt;
$$
\begin{aligned}
 &amp; \text{Maximize } x_1 + 2x_2 \\
 &amp; \text{subject to:} \\
 &amp; x_1 + 2x_2 + x_3 = 4, \\
 &amp; 2x_1 + x_2 + x_4 = 3, \\
 &amp; x_2 + x_5 = 1, \\
 &amp; x_j \geq 0, \quad j = 1, \dots, 5.
\end{aligned}
$$&lt;h3 id="51-idea-of-simplex-algorithm-on-an-example"&gt;5.1 Idea of Simplex Algorithm on an Example&lt;/h3&gt;
&lt;p&gt;Maximize \( 20x_1 + 60x_2 \) under the constraints:&lt;/p&gt;
$$
\begin{pmatrix}
1 &amp; 1 \\
5 &amp; 10 \\
2 &amp; 10
\end{pmatrix}
\begin{pmatrix}
x_1 \\
x_2
\end{pmatrix}
\leq
\begin{pmatrix}
120 \\
700 \\
520
\end{pmatrix},
\quad x_1, x_2 \geq 0
$$&lt;p&gt;The first step is to bring the problem into the desired canonical form by introducing slack variables. Furthermore, we need to minimize \( - 20x_1 - 60x_2 \) under the following constraints:&lt;/p&gt;
$$
\begin{pmatrix}
1 &amp; 1 &amp; 1 &amp; 0 &amp; 0 \\
5 &amp; 10 &amp; 0 &amp; 1 &amp; 0 \\
2 &amp; 10 &amp; 0 &amp; 0 &amp; 1
\end{pmatrix}
\cdot
\begin{pmatrix}
x_1 \\
x_2 \\
x_3 \\
x_4 \\
x_5
\end{pmatrix}
\ = \
\begin{pmatrix}
120 \\
700 \\
520
\end{pmatrix}
$$&lt;p&gt;This system of equations is in the form for Gaussian elimination. The variables \(x_1, x_2\) are free variables, while \(x_3, x_4, x_5\) are dependent variables. By setting the free variables to zero, we obtain the basic solution \( Z = (0, 0, 120, 700, 520)^T \), which is the first corner of our polyhedron.&lt;/p&gt;
&lt;p&gt;We can now represent this in the form of a table, where the first row contains the function we want to minimize, followed by the constraints. The pivot entry is the one from which we perform the Gaussian elimination:&lt;/p&gt;
$$
\begin{array}{ccccc|c}
-20 &amp; -60 &amp; 0 &amp; 0 &amp; 0 &amp; 0 \\
\hline
1 &amp; 1 &amp; 1 &amp; 0 &amp; 0 &amp; 120 \\
5 &amp; 10 &amp; 0 &amp; 1 &amp; 0 &amp; 700 \\
2 &amp; \fbox{10} &amp; 0 &amp; 0 &amp; 1 &amp; 520 \\
\end{array}
$$&lt;p&gt;Since \( b \geq 0 \), our basis solution is valid. We can continue to the next table through Gaussian elimination:&lt;/p&gt;
$$
\begin{array}{ccccc|c}
-8 &amp; 0 &amp; 0 &amp; 0 &amp; 6 &amp; 3120 \\
\hline
4/5 &amp; 0 &amp; 1 &amp; 0 &amp; 1/-10 &amp; 68 \\
3 &amp; 0 &amp; 0 &amp; 1 &amp; -1 &amp; 180 \\
1/5 &amp; 1 &amp; 0 &amp; 0 &amp; 1/10 &amp; 52 \\
\end{array}
$$&lt;p&gt;Now \( x_1, x_5 \) are free variables, and \( x_2, x_3, x_4 \) are dependent. The associated basic solution, obtained by setting the free variables to zero, is \( Z = (0, 52, 68, 180, 0)^T \).&lt;/p&gt;
&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details open&gt;
 &lt;summary&gt;Interlude&lt;/summary&gt;
 
 &lt;p&gt;If we had used \( a_{12} \) as the pivot instead of \( a_{32} \), we would have gotten the following matrix:&lt;/p&gt;
$$
\begin{array}{ccccc|c}
40 &amp; 0 &amp; 60 &amp; 0 &amp; 0 &amp; 60 \cdot 120 \\
\hline
1 &amp; 1 &amp; 1 &amp; 0 &amp; 0 &amp; 120 \\
-5 &amp; 0 &amp; -10 &amp; 1 &amp; 0 &amp; -500 \\
-8 &amp; 0 &amp; -10 &amp; 0 &amp; 1 &amp; -680 \\
\end{array}
$$&lt;p&gt;And we would have the basis solution \( (0, 120, 0, -500, -680)^T \). This is not a valid solution, since some components are negative.&lt;/p&gt;

 
&lt;/details&gt;


&lt;p&gt;Continuing the example, we choose the pivot entry that is in the first column with a negative entry, and from the column where \( \frac{b_r}{a_{rs}} \) is minimal:&lt;/p&gt;
$$
\begin{array}{ccccc|c}
−8 &amp; 0 &amp; 0 &amp; 0 &amp; 6 &amp; 3120 \\
\hline
4/5 &amp; 0 &amp; 1 &amp; 0 &amp; −1/10 &amp; 68 \\
\fbox{3} &amp; 0 &amp; 0 &amp; 1 &amp; −1 &amp; 180 \\
1/5 &amp; 1 &amp; 0 &amp; 0 &amp; 1/10 &amp; 52
\end{array}
$$&lt;p&gt;After performing the necessary Gaussian elimination steps:&lt;/p&gt;
$$
\begin{array}{ccccc|c}
0 &amp; 0 &amp; 0 &amp; 8/3 &amp; 10/3 &amp; 3600 \\
\hline
0 &amp; 0 &amp; 1 &amp; −4/15 &amp; 1/6 &amp; 20 \\
1 &amp; 0 &amp; 0 &amp; 1/3 &amp; −1/3 &amp; 60 \\
0 &amp; 1 &amp; 0 &amp; −1/15 &amp; 1/6 &amp; 40
\end{array}
$$&lt;p&gt;The basic solution at this point is \( x^* = (60, 40, 20, 0, 0)^T \) with \( f(x^*) = -3600 \). The first row of the table represents the cost vector. Since all entries in the cost vector are now positive, the simplex algorithm is finished, and we have found the optimal solution.&lt;/p&gt;
&lt;p&gt;We can now disregard the slack variables \( x_3, x_4, x_5 \) and have the optimal solution vector \( (60, 40)^T \).&lt;/p&gt;
&lt;p&gt;The process you just saw is called &lt;strong&gt;Phase 2&lt;/strong&gt; of the simplex algorithm, where, starting from a basis solution, the algorithm iterates through the corners of the polyhedron to find the optimal solution. &lt;strong&gt;Phase 1&lt;/strong&gt; is used when we need to transform our problem into canonical form so that it can be used for Phase 2. Phase 1 is necessary if the problem does not yet have a basis solution.&lt;/p&gt;
&lt;h3 id="52-the-simplex-algorithm"&gt;5.2 The Simplex Algorithm&lt;/h3&gt;
&lt;p&gt;The simplex algorithm consists of two phases:&lt;/p&gt;
&lt;h4 id="521-phase-1"&gt;5.2.1 Phase 1&lt;/h4&gt;
&lt;p&gt;The goal of Phase 1 is to construct a basic solution \( z \) for the system \( Ax = b \). It does this by solving a helper problem:&lt;/p&gt;
$$
\min e^T(b - Ax)
$$&lt;p&gt;on the feasible region&lt;/p&gt;
$$
M_H = \{x \in \mathbb{R}^n : Ax \leq b\}
$$&lt;p&gt;The simplex tableau for Phase 1 is represented as follows:&lt;/p&gt;
$$
\begin{array}{cccccc|c}
-\sum a_{i1} &amp; \dots &amp; -\sum a_{in} &amp; 0 &amp; \dots &amp; 0 &amp; -\sum b_i \\
\hline
c_1 &amp; \dots &amp; c_n &amp; 0 &amp; \dots &amp; 0 &amp; 0 \\
\hline
a_{11} &amp; \dots &amp; a_{1n} &amp; 1 &amp; \dots &amp; 0 &amp; b_1 \\
\vdots &amp; &amp; \vdots &amp; \vdots &amp; &amp; \vdots &amp; \vdots \\
a_{m1} &amp; \dots &amp; a_{mn} &amp; 0 &amp; \dots &amp; 1 &amp; b_m \\
\end{array}
$$&lt;p&gt;After solving the Phase 1 problem, we proceed with &lt;strong&gt;Phase 2&lt;/strong&gt; of the simplex algorithm, which continues until the first row is entirely positive. There are two possible outcomes:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Case 1&lt;/strong&gt;: \( e^T(b - Az) = 0 \) – In this case, a valid basic solution has been found, and we can remove the row and columns added in Phase 1 and proceed with Phase 2.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Case 2&lt;/strong&gt;: \( e^T(b - Az) &gt; 0 \) – This means that the feasible region \( M_H \) is empty, and the problem is invalid (no solution exists).&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h4 id="522-phase-2"&gt;5.2.2 Phase 2&lt;/h4&gt;
&lt;p&gt;After Phase 1, we proceed with Phase 2. At this stage, the tableau is as follows:&lt;/p&gt;
$$
\begin{array}{c|c}
c^T &amp; 0 \\
\hline
A &amp; b
\end{array}
$$&lt;p&gt;In Phase 2, we iteratively construct a new basic solution, improving the objective function value (the top right corner) at each step, until the minimum is reached.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;If \( c \ge 0 \)&lt;/strong&gt;: The current basic solution \( z \) is optimal, and the value in the top right corner of the tableau represents the optimal value of the objective function.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Pivot Rule (Bland’s Rule)&lt;/strong&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Pivot column&lt;/strong&gt;: Choose \( s = \min\{n : c_n \leq 0\} \), i.e., the first column where the entry is negative.&lt;/li&gt;
&lt;li&gt;If \( a_{rs} \leq 0 \) for all \( r \), then the problem has an unbounded objective value and the minimum is \( -\infty \).&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Pivot row&lt;/strong&gt;: Choose the row \( r \) where \( \frac{b_r}{a_{rs}} \) is minimal, subject to \( a_{rs} &gt; 0 \).&lt;/li&gt;
&lt;li&gt;The &lt;strong&gt;pivot element&lt;/strong&gt; is \( a_{rs} \).&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Perform &lt;strong&gt;Gaussian elimination&lt;/strong&gt; to make the pivot element \( a_{rs} = 1 \) and all other elements in the pivot column \( s \) equal to zero.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Determine the new basic solution \( z \) and the updated objective function value.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Return to step 1 and repeat until the solution converges.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h3 id="53-interpretation-of-the-simplex-algorithm"&gt;5.3 Interpretation of the Simplex Algorithm&lt;/h3&gt;
&lt;p&gt;The &lt;strong&gt;simplex algorithm&lt;/strong&gt; has a very insightful geometric interpretation, particularly in the context of two-dimensional optimization problems.&lt;/p&gt;
&lt;figure style="text-align: center; margin: auto;"&gt;
 &lt;iframe width="600" height="300" 
 src="https://www.youtube.com/watch?v=mHgv6kKOl6g&amp;t=226" 
 style="display: block; margin: auto;" 
 allowfullscreen&gt;
 &lt;/iframe&gt;
 &lt;figcaption style="margin-top: 10px; text-align: center;"&gt;
 A nice visualization of the simplex algorithm.
 &lt;/figcaption&gt;
&lt;/figure&gt;
&lt;h3 id="54-set-of-problems-and-solutions"&gt;5.4 Set of Problems and Solutions&lt;/h3&gt;
&lt;h4 id="541-basic-example-phase-2"&gt;5.4.1 Basic Example: Phase 2&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Task:&lt;/strong&gt; Determine the maximum of the objective function \(Z(x,y) = -x + 3y\) under the constraints:&lt;/p&gt;
\[
x + y \leq 5, \quad x - y \geq -3, \quad x \leq 2, \quad x, y \geq 0
\]&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution&lt;/summary&gt;
 
 &lt;p&gt;&lt;strong&gt;Step 1:&lt;/strong&gt; Transform the problem into canonical form.&lt;/p&gt;
&lt;p&gt;We first express the objective function as a minimization problem:&lt;/p&gt;
\[
\max \quad -x + 3y \quad \text{becomes} \quad \min \quad x - 3y
\]&lt;p&gt;Now, we add slack variables to convert inequalities into equalities:&lt;/p&gt;
\[
x + y + x_3 = 5, \quad -x + y + x_4 = 3, \quad x + x_5 = 2
\]&lt;p&gt;Thus, the problem becomes:&lt;/p&gt;
\[
\min \quad x_1 - 3x_2
\]&lt;p&gt;
subject to:
&lt;/p&gt;
\[
x_1 + x_2 + x_3 = 5, \quad -x_1 + x_2 + x_4 = 3, \quad x_1 + x_5 = 2
\]&lt;p&gt;
with \(x_1, x_2, x_3, x_4, x_5 \geq 0\).&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Step 2:&lt;/strong&gt; Set up the initial simplex tableau.&lt;/p&gt;
&lt;p&gt;The initial tableau looks like this:&lt;/p&gt;
\[
\begin{array}{ccccc|c}
x_1 &amp; x_2 &amp; x_3 &amp; x_4 &amp; x_5 &amp; b \\
\hline
1 &amp; -3 &amp; 0 &amp; 0 &amp; 0 &amp; 0 \\
\hline
1 &amp; 1 &amp; 1 &amp; 0 &amp; 0 &amp; 5 \\
-1 &amp; 1 &amp; 0 &amp; 1 &amp; 0 &amp; 3 \\
1 &amp; 0 &amp; 0 &amp; 0 &amp; 1 &amp; 2 \\
\end{array}
\]&lt;p&gt;&lt;strong&gt;Step 3:&lt;/strong&gt; Find the pivot element using Bland&amp;rsquo;s Rule.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The first negative column is the second column (corresponding to \(x_2\)).&lt;/li&gt;
&lt;li&gt;Compute \( \min \left\{ \frac{b_k}{a_{ks}} : a_{ks} &gt; 0 \right\} \) for the second column:

\[
 \frac{5}{1}, \quad \frac{3}{1}, \quad \frac{2}{1}
 \]
The lowest ratio is 2, corresponding to the third row.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Step 4:&lt;/strong&gt; Perform the first iteration (Gaussian elimination) to make all other entries in the pivot column (second column) zero.&lt;/p&gt;
\[
\begin{array}{ccccc|c}
x_1 &amp; x_2 &amp; x_3 &amp; x_4 &amp; x_5 &amp; b \\
\hline
-2 &amp; 0 &amp; 0 &amp; 3 &amp; 0 &amp; 9 \\
\hline
2 &amp; 0 &amp; 1 &amp; -1 &amp; 0 &amp; 2 \\
-1 &amp; 1 &amp; 0 &amp; 1 &amp; 0 &amp; 3 \\
1 &amp; 0 &amp; 0 &amp; 0 &amp; 1 &amp; 2 \\
\end{array}
\]&lt;p&gt;&lt;strong&gt;Step 5:&lt;/strong&gt; Find the next pivot element.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The first negative entry is in the first column, and the lowest ratio is \( \frac{9}{2} = 4.5 \), which corresponds to the first row.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Step 6:&lt;/strong&gt; Perform the second iteration of Gaussian elimination.&lt;/p&gt;
\[
\begin{array}{ccccc|c}
x_1 &amp; x_2 &amp; x_3 &amp; x_4 &amp; x_5 &amp; b \\
\hline
0 &amp; 0 &amp; 0 &amp; 1 &amp; 2 &amp; 11 \\
\hline
1 &amp; 0 &amp; \frac{1}{2} &amp; -\frac{1}{2} &amp; 0 &amp; 1 \\
0 &amp; 1 &amp; \frac{1}{2} &amp; \frac{1}{2} &amp; 0 &amp; 4 \\
0 &amp; 0 &amp; -\frac{1}{2} &amp; \frac{1}{2} &amp; 1 &amp; 1 \\
\end{array}
\]&lt;p&gt;&lt;strong&gt;Step 7:&lt;/strong&gt; Check the top row.&lt;/p&gt;
&lt;p&gt;Since all the entries in the top row are now non-negative, the algorithm terminates. The optimal solution is \(x_1 = 1\), \(x_2 = 4\), and the maximum value of \(Z\) is \(Z = 11\).&lt;/p&gt;
&lt;p&gt;Thus, the optimal solution is \(x = 1\), \(y = 4\), with \(Z = 11\).&lt;/p&gt;

 
&lt;/details&gt;


&lt;h4 id="542-basic-example-phase-2"&gt;5.4.2 Basic Example: Phase 2&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Task:&lt;/strong&gt; A Truck can transport up to 20 tonnes of freight with 12m³ space, and it can be loaded with two goods \(G_1, G_2\). Each good has 8 units in stock.&lt;/p&gt;
\[
\begin{array}{|c|c|c|}
\hline
 &amp; G_1 &amp; G_2 \\
\hline
\text{Weight (Tonnes)} &amp; 2 &amp; 3 \\
\text{Space (m}^3\text{)} &amp; 2 &amp; 1 \\
\text{Worth (in 10,000€)} &amp; 3 &amp; 2 \\
\hline
\end{array}
\]&lt;p&gt;How many units of each good should the truck be loaded with, to maximize the freight?&lt;/p&gt;
&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution&lt;/summary&gt;
 
 &lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Bring the problem in canonical form:&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;
\[
\begin{aligned}
\max \quad &amp; 3 G_1 + 2 G_2 \\
\text{subject to} \quad &amp; 
2 G_1 + 3 G_2 \leq 20, \\
&amp; 2 G_1 + 1 G_2 \leq 12, \\
&amp; G_1 \leq 8, \\
&amp; G_2 \leq 8, \\
&amp; G_1, G_2 \geq 0.
\end{aligned}
\]&lt;ol start="2"&gt;
&lt;li&gt;&lt;strong&gt;Add slack variables and transform from maximization to minimization:&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;
\[
\begin{aligned}
\max \quad &amp; -3 G_1 -2 G_2 \\
\text{subject to} \quad &amp; 
2 G_1 + 3 G_2 + x_1 = 20, \\
&amp; 2 G_1 + 1 G_2 + x_2 = 12, \\
&amp; G_1 + x_3 = 8, \\
&amp; G_2 + x_4 = 8, \\
&amp; x_1, x_2 \geq 0.
\end{aligned}
\]&lt;ol start="3"&gt;
&lt;li&gt;&lt;strong&gt;Write the problem in the form of a table:&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;
\[
\begin{array}{cccccc|c}
G_1 &amp; G_2 &amp; x_1 &amp; x_2 &amp; x_3 &amp; x_4 &amp; b \\
\hline
-3 &amp; -2 &amp; 0 &amp; 0 &amp; 0 &amp; 0 &amp; 0 \\
\hline
2 &amp; 3 &amp; 1 &amp; 0 &amp; 0 &amp; 0 &amp; 20 \\
2 &amp; 1 &amp; 0 &amp; 1 &amp; 0 &amp; 0 &amp; 12 \\
1 &amp; 0 &amp; 0 &amp; 0 &amp; 1 &amp; 0 &amp; 8 \\
0 &amp; 1 &amp; 0 &amp; 0 &amp; 0 &amp; 1 &amp; 8 \\
\end{array}
\]&lt;ol start="4"&gt;
&lt;li&gt;&lt;strong&gt;Find the pivot with Bland&amp;rsquo;s rule:&lt;/strong&gt;
&lt;ul&gt;
&lt;li&gt;The first negative column is the first column.&lt;/li&gt;
&lt;li&gt;The lowest division is in the second row.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;
\[
\begin{array}{cccccc|c}
G_1 &amp; G_2 &amp; x_1 &amp; x_2 &amp; x_3 &amp; x_4 &amp; b \\
\hline
-3 &amp; -2 &amp; 0 &amp; 0 &amp; 0 &amp; 0 &amp; 0 \\
\hline
2 &amp; 3 &amp; 1 &amp; 0 &amp; 0 &amp; 0 &amp; 20 \\
\fbox{2} &amp; 1 &amp; 0 &amp; 1 &amp; 0 &amp; 0 &amp; 12 \\
1 &amp; 0 &amp; 0 &amp; 0 &amp; 1 &amp; 0 &amp; 8 \\
0 &amp; 1 &amp; 0 &amp; 0 &amp; 0 &amp; 1 &amp; 8 \\
\end{array}
\]&lt;ol start="5"&gt;
&lt;li&gt;&lt;strong&gt;First Iteration:&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;
\[
\begin{array}{cccccc|c}
G_1 &amp; G_2 &amp; x_1 &amp; x_2 &amp; x_3 &amp; x_4 &amp; b \\
\hline
0 &amp; -0.5 &amp; 0 &amp; 1.5 &amp; 0 &amp; 0 &amp; 18 \\
\hline
0 &amp; 2 &amp; 1 &amp; -1 &amp; 0 &amp; 0 &amp; 8 \\
1 &amp; 0.5 &amp; 0 &amp; 0.5 &amp; 0 &amp; 0 &amp; 6 \\
0 &amp; -0.5 &amp; 0 &amp; -0.5 &amp; 1 &amp; 0 &amp; 2 \\
0 &amp; 1 &amp; 0 &amp; 0 &amp; 0 &amp; 1 &amp; 8 \\
\end{array}
\]&lt;ol start="6"&gt;
&lt;li&gt;&lt;strong&gt;Find the pivot with Bland&amp;rsquo;s rule:&lt;/strong&gt;
&lt;ul&gt;
&lt;li&gt;The first negative column is the second column.&lt;/li&gt;
&lt;li&gt;The lowest division is in the first row.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;
\[
\begin{array}{cccccc|c}
G_1 &amp; G_2 &amp; x_1 &amp; x_2 &amp; x_3 &amp; x_4 &amp; b \\
\hline
0 &amp; -0.5 &amp; 0 &amp; 1.5 &amp; 0 &amp; 0 &amp; 18 \\
\hline
0 &amp; \fbox{2} &amp; 1 &amp; -1 &amp; 0 &amp; 0 &amp; 8 \\
1 &amp; 0.5 &amp; 0 &amp; 0.5 &amp; 0 &amp; 0 &amp; 6 \\
0 &amp; -0.5 &amp; 0 &amp; -0.5 &amp; 1 &amp; 0 &amp; 2 \\
0 &amp; 1 &amp; 0 &amp; 0 &amp; 0 &amp; 1 &amp; 8 \\
\end{array}
\]&lt;ol start="7"&gt;
&lt;li&gt;&lt;strong&gt;Second Iteration:&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;
\[
\begin{array}{cccccc|c}
G_1 &amp; G_2 &amp; x_1 &amp; x_2 &amp; x_3 &amp; x_4 &amp; b \\
\hline
0 &amp; 0 &amp; \frac{1}{4} &amp; \frac{5}{4} &amp; 0 &amp; 0 &amp; 20 \\
\hline
0 &amp; 1 &amp; \frac{1}{2} &amp; -\frac{1}{2} &amp; 0 &amp; 0 &amp; 4 \\
1 &amp; 0 &amp; -\frac{1}{4} &amp; \frac{3}{4} &amp; 0 &amp; 0 &amp; 4 \\
0 &amp; 0 &amp; \frac{1}{4} &amp; -\frac{3}{4} &amp; 1 &amp; 0 &amp; 4 \\
0 &amp; 0 &amp; -\frac{1}{2} &amp; \frac{1}{2} &amp; 0 &amp; 1 &amp; 4 \\
\end{array}
\]&lt;ol start="8"&gt;
&lt;li&gt;&lt;strong&gt;Optimal Solution:&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;The top row is completely positive, indicating that we have found the optimal solution, which is \(z = 20\) with \(G_1 = 4\), \(G_2 = 4\).&lt;/p&gt;
 
&lt;/details&gt;


&lt;h4 id="543-intermediate-example-phase-2"&gt;5.4.3 Intermediate Example: Phase 2&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Task:&lt;/strong&gt; Let \(\alpha, \beta \in \mathbb{R}\). Solve the following problem with the simplex algorithm:&lt;/p&gt;
\[
\begin{aligned}
\text{Maximize} &amp; \quad f(x) = \alpha x_1 + \beta x_2 \\
\text{subject to} \quad &amp; 
x_1 \geq 0, \, x_2 \geq 0, \, x_1 - x_2 \leq 10
\end{aligned}
\]&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution&lt;/summary&gt;
 
 &lt;p&gt;&lt;strong&gt;Case 1&lt;/strong&gt; \(\beta &gt; 0\): Then the problem is unrestricted, since we can set \(\alpha = 0\) and \(x_2 \to \infty\). We only need to fulfill the restriction \(x_1 - x_2 \leq 10\), which can be done by also letting \(x_2 \to \infty\).&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Case 2&lt;/strong&gt; \(\beta \leq 0\): We need to add a slack variable \(x_3\) for the restriction \(x_1 - x_2 \leq 10\), and then we can write the problem in table form:&lt;/p&gt;
\[
\begin{array}{ccc|c}
x_1 &amp; x_2 &amp; x_3 &amp; b \\
\hline 
-\alpha &amp; -\beta &amp; 0 &amp; 0 \\ 
\hline
1 &amp; -1 &amp; 1 &amp; 10 
\end{array}
\]&lt;p&gt;We now need to calculate the pivot again using Bland&amp;rsquo;s rule:&lt;/p&gt;
\[
\begin{array}{ccc|c}
x_1 &amp; x_2 &amp; x_3 &amp; b \\
\hline 
-\alpha &amp; -\beta &amp; 0 &amp; 0 \\ 
\hline
\fbox{1} &amp; -1 &amp; 1 &amp; 10 
\end{array}
\]&lt;p&gt;It now depends on the sign of \(\alpha\) how to proceed. If \(\alpha \leq 0\), then all our values in the first row are positive, and we stop the simplex algorithm, meaning we have already reached our optimal value \(f(0, 0) = 0\).&lt;/p&gt;
&lt;p&gt;Otherwise, we can continue:&lt;/p&gt;
\[
\begin{array}{ccc|c}
x_1 &amp; x_2 &amp; x_3 &amp; b \\
\hline 
0 &amp; -\beta - \alpha &amp; 0 &amp; 10 \alpha \\ 
\hline
1 &amp; -1 &amp; 1 &amp; 10 
\end{array}
\]&lt;p&gt;If \(-\beta - \alpha \geq 0\), then the first row is positive, and we have reached the optimum value with \(f(10) = 10 \alpha\).&lt;/p&gt;
&lt;p&gt;Otherwise, if \(-\beta - \alpha \le 0\), then we need to continue and calculate the next pivot, but the only entry in the second row is \(-1 \leq 0\), thus we can&amp;rsquo;t continue. This means our problem is unrestricted, i.e., \(\max f(x) = \infty\).&lt;/p&gt;

 
&lt;/details&gt;


&lt;h4 id="544-basic-example-phase-1"&gt;5.4.4 Basic Example: Phase 1&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Task:&lt;/strong&gt; Minimize \(- x_1 + 2x_2 + 3x_3\) under the restrictions:&lt;/p&gt;
\[
\begin{aligned}
x_1 + 3x_2 - 2x_3 &amp;\leq 10 \\
3x_1 - 2x_2 - 3x_3 &amp;\leq -5 \\
4x_1 - 2x_3 &amp;= 4 \\
x_1, x_2 &amp;\geq 0
\end{aligned}
\]&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution&lt;/summary&gt;
 
 &lt;p&gt;The first step is to bring the problem into its canonical form, by replacing \(x_3\) which is not positive by two positive variables \(x_3 - x_4\) with \(x_3, x_4 \geq 0\). Furthermore, we need to introduce slack variables \(x_5, x_6\) for the first two restrictions. We further multiply the second equality by \(-1\), which gives us the following problem:&lt;/p&gt;
\[
\begin{aligned}
\min \quad &amp; -x_1 + 2x_2 + 3x_3 - 3x_4 \\
\text{subject to:} \quad &amp;
x_1 + 3x_2 - 2x_3 + 2x_4 + x_5 = 10, \\
&amp; -3x_1 + 2x_2 + 3x_3 - 3x_4 - x_6 = 5, \\
&amp; 4x_1 - 2x_2 = 4, \\
&amp; x_j \geq 0 \quad \text{for } j = 1, 2, 3, 4, 5, 6.
\end{aligned}
\]&lt;p&gt;We can write this in tabular form:&lt;/p&gt;
\[
\begin{array}{cccccc|c}
x_1 &amp; x_2 &amp; x_3 &amp; x_4 &amp; x_5 &amp; x_6 &amp; b \\
\hline
-1 &amp; 2 &amp; 3 &amp; -3 &amp; 0 &amp; 0 &amp; 0 \\
\hline
1 &amp; 3 &amp; -2 &amp; 2 &amp; 1 &amp; 0 &amp; 10 \\
-3 &amp; 2 &amp; 3 &amp; -3 &amp; 0 &amp; -1 &amp; 5 \\
4 &amp; -2 &amp; 0 &amp; 0 &amp; 0 &amp; 0 &amp; 4 \\
\end{array}
\]&lt;p&gt;But we have a problem in the second row, the entry for the variable \(x_6\) is negative, but in our restriction set we assumed \(x_6 \geq 0\) as required by the simplex algorithm (the simplex algorithm uses the canonical form which has the prerequisite that \(x_j \geq 0\)).&lt;/p&gt;
&lt;p&gt;Thus, we first need to transform our problem using &lt;strong&gt;Phase 1&lt;/strong&gt; of the simplex algorithm and get a first basis solution on which we can then iterate using &lt;strong&gt;Phase 2&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;Since the first equation is already in the correct form, we need to apply the transformation only on the bottom two equalities. So, first we need to add a new column with entries that are the sum of entries for each column multiplied by \(-1\). For example, the first entry in our new row will be \((-3) + 4 = 1 \implies (-1) \cdot 1 = -1\), and remember we only add up the last two rows. We further add two new rows with unit vectors in them.&lt;/p&gt;
&lt;p&gt;We also calculate the pivot and mark it:&lt;/p&gt;
\[
\begin{array}{cccccc|c}
-1 &amp; 0 &amp; -3 &amp; 3 &amp; 0 &amp; 1 &amp; 0 &amp; 0 &amp; -9 \\
\hline
-1 &amp; 2 &amp; 3 &amp; -3 &amp; 0 &amp; 0 &amp; 0 &amp; 0 &amp; 0 \\
\hline
1 &amp; 3 &amp; -2 &amp; 2 &amp; 1 &amp; 0 &amp; 0 &amp; 0 &amp; 10 \\
-3 &amp; 2 &amp; \fbox{3} &amp; -3 &amp; 0 &amp; -1 &amp; 1 &amp; 0 &amp; 5 \\
4 &amp; -2 &amp; 0 &amp; 0 &amp; 0 &amp; 0 &amp; 0 &amp; 1 &amp; 4 \\
\end{array}
\]&lt;p&gt;Next, we perform the necessary steps to finalize Phase 1:&lt;/p&gt;
\[
\begin{array}{cccccc|c}
-4 &amp; 2 &amp; 0 &amp; 0 &amp; 0 &amp; 0 &amp; 1 &amp; 0 &amp; -4 \\
\hline
2 &amp; 0 &amp; 0 &amp; 0 &amp; 0 &amp; 1 &amp; -1 &amp; 0 &amp; -5 \\
\hline
-1 &amp; \frac{13}{3} &amp; 0 &amp; 0 &amp; 1 &amp; -\frac{2}{3} &amp; \frac{2}{3} &amp; 0 &amp; \frac{40}{3} \\
-1 &amp; \frac{2}{3} &amp; 1 &amp; -1 &amp; 0 &amp; -\frac{1}{3} &amp; \frac{1}{3} &amp; 0 &amp; \frac{5}{3} \\
\fbox{4} &amp; -2 &amp; 0 &amp; 0 &amp; 0 &amp; 0 &amp; 0 &amp; 1 &amp; 4 \\
\end{array}
\]\[
\begin{array}{cccccc|c}
0 &amp; 0 &amp; 0 &amp; 0 &amp; 0 &amp; 0 &amp; 1 &amp; 1 &amp; 0 \\
\hline
0 &amp; 1 &amp; 0 &amp; 0 &amp; 0 &amp; 1 &amp; -1 &amp; -\frac{1}{2} &amp; -7 \\
\hline
0 &amp; \frac{23}{6} &amp; 0 &amp; 0 &amp; 1 &amp; -\frac{2}{3} &amp; \frac{2}{3} &amp; \frac{1}{4} &amp; \frac{43}{3} \\
0 &amp; \frac{1}{6} &amp; 1 &amp; -1 &amp; 0 &amp; -\frac{1}{3} &amp; \frac{1}{3} &amp; \frac{1}{4} &amp; \frac{8}{3} \\
1 &amp; -\frac{1}{2} &amp; 0 &amp; 0 &amp; 0 &amp; 0 &amp; 0 &amp; \frac{1}{4} &amp; 1 \\
\end{array}
\]&lt;p&gt;Now that the first row has zeros in the positions we want, we are finished and can move to Phase 2. Our basis solution is \(z = (1, 0, 8/3, 0, 43/3, 0, 0, 0)\).&lt;/p&gt;
&lt;p&gt;To move on to Phase 2, we can remove the first row and the last two columns before the \(b\)-column:&lt;/p&gt;
\[
\begin{array}{cccccc|c}
0 &amp; 1 &amp; 0 &amp; 0 &amp; 0 &amp; 1 &amp; -7 \\
\hline
0 &amp; \frac{23}{6} &amp; 0 &amp; 0 &amp; 1 &amp; -\frac{2}{3} &amp; \frac{43}{3} \\
0 &amp; \frac{1}{6} &amp; 1 &amp; -1 &amp; 0 &amp; -\frac{1}{3} &amp; \frac{8}{3} \\
1 &amp; -\frac{1}{2} &amp; 0 &amp; 0 &amp; 0 &amp; 0 &amp; 1 \\
\end{array}
\]&lt;p&gt;As we see, Phase 2 is already finished since the first row has only positive values. The solution is \(x^* = (1, 0, 8/3), f(x^*) = 7\).&lt;/p&gt;

 
&lt;/details&gt;


&lt;h4 id="545-intermediate-example-phase-1"&gt;5.4.5 Intermediate Example: Phase 1&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Task:&lt;/strong&gt; Minimize \(x_1 - x_2\) under the following constraints: \(x_1 + x_2 \leq 3\), \(x_1 + 2x_2 \geq 1\), \(x_1 \geq 0\).&lt;/p&gt;
&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution&lt;/summary&gt;
 
 &lt;p&gt;First, write the problem in its canonical form. We need to add slack variables for the two inequalities and replace \(x_2 := x_2 - x_3\) so that all variables are positive.&lt;/p&gt;
$$
\begin{aligned}
\min \quad &amp; x_1 - x_2 - x_3 \\
\text{subject to} \quad &amp; 
x_1 + x_2 - x_3 + x_4 = 3, \\
&amp; x_1 + 2x_2 - x_5 = 1, \\
&amp; x_1, x_2, x_3, x_4, x_5 \geq 0.
\end{aligned}
$$&lt;p&gt;Since we have \(- x_5\), we have a negative slack variable (remember, the rows of our slack variables need to be unit vectors), thus we need to start with Phase 1. For Phase 1, the table would look like this:&lt;/p&gt;
$$
\begin{array}{ccccc|c}
x_1 &amp; x_2 &amp; x_3 &amp; x_4 &amp; x_5 &amp; b \\
\hline
1 &amp; -1 &amp; -1 &amp; 0 &amp; 0 &amp; 0 \\
\hline
1 &amp; 1 &amp; -1 &amp; 1 &amp; 0 &amp; 3 \\
1 &amp; 2 &amp; 0 &amp; 0 &amp; -1 &amp; 1 \\
\end{array}
$$&lt;p&gt;We create our Phase 1 table by adding a new row, whose entries are the sum of its columns multiplied by \(-1\). We furthermore add two columns with unit vectors. The pivot should be calculated and marked.&lt;/p&gt;
$$
\begin{array}{ccccc:c:c|c}
x_1 &amp; x_2 &amp; x_3 &amp; x_4 &amp; x_5 &amp; x_6 &amp; x_7 &amp; b \\
\hline
-2 &amp; -3 &amp; 3 &amp; -1 &amp; 1 &amp; 0 &amp; 0 &amp; -4 \\
\hline
1 &amp; -1 &amp; 1 &amp; 0 &amp; 0 &amp; 0 &amp; 0 &amp; 0 \\
\hline
1 &amp; 1 &amp; -1 &amp; 1 &amp; 0 &amp; 1 &amp; 0 &amp; 3 \\
\fbox{1} &amp; 2 &amp; -2 &amp; 0 &amp; -1 &amp; 0 &amp; 1 &amp; 1 \\
\end{array}
$$&lt;p&gt;Through the first iteration, we get:&lt;/p&gt;
$$
\begin{array}{ccccc:c:c|c}
x_1 &amp; x_2 &amp; x_3 &amp; x_4 &amp; x_5 &amp; x_6 &amp; x_7 &amp; b \\
\hline
0 &amp; 1 &amp; -1 &amp; -1 &amp; -1 &amp; 0 &amp; 2 &amp; -2 \\
\hline
0 &amp; -3 &amp; 3 &amp; 0 &amp; 1 &amp; 0 &amp; -1 &amp; -1 \\
\hline
0 &amp; -1 &amp; \fbox{1} &amp; 1 &amp; 1 &amp; 1 &amp; -1 &amp; 2 \\
1 &amp; 2 &amp; -2 &amp; 0 &amp; -1 &amp; 0 &amp; 1 &amp; 1 \\
\end{array}
$$&lt;p&gt;And:&lt;/p&gt;
$$
\begin{array}{ccccc:c:c|c}
x_1 &amp; x_2 &amp; x_3 &amp; x_4 &amp; x_5 &amp; x_6 &amp; x_7 &amp; b \\
\hline
0 &amp; 0 &amp; 0 &amp; 0 &amp; 0 &amp; 1 &amp; 1 &amp; -1 \\
\hline
0 &amp; 0 &amp; 0 &amp; -3 &amp; -2 &amp; -3 &amp; 2 &amp; -7 \\
\hline
0 &amp; -1 &amp; 1 &amp; 1 &amp; 1 &amp; 1 &amp; -1 &amp; 2 \\
1 &amp; 0 &amp; 0 &amp; 2 &amp; 1 &amp; 2 &amp; -1 &amp; 5 \\
\end{array}
$$&lt;p&gt;Since we now have zeros in the first row where we want them, we have finished Phase 1 and can continue to Phase 2. To get the table for Phase 2, we remove the last two columns and the first row of the table and calculate the pivot again.&lt;/p&gt;
$$
\begin{array}{ccccc|c}
x_1 &amp; x_2 &amp; x_3 &amp; x_4 &amp; x_5 &amp; b \\
\hline
0 &amp; 0 &amp; 0 &amp; -3 &amp; -2 &amp; -7 \\
\hline
0 &amp; -1 &amp; 1 &amp; \fbox{1} &amp; 1 &amp; 2 \\
1 &amp; 0 &amp; 0 &amp; 2 &amp; 1 &amp; 5 \\
\end{array}
$$&lt;p&gt;We get through the first iteration of Phase 2:&lt;/p&gt;
$$
\begin{array}{ccccc|c}
x_1 &amp; x_2 &amp; x_3 &amp; x_4 &amp; x_5 &amp; b \\
\hline
0 &amp; -3 &amp; 3 &amp; 0 &amp; 1 &amp; -1 \\
\hline
0 &amp; -1 &amp; 1 &amp; 1 &amp; 1 &amp; 2 \\
1 &amp; \fbox{2} &amp; -2 &amp; 0 &amp; -1 &amp; 1 \\
\end{array}
$$&lt;p&gt;Then:&lt;/p&gt;
$$
\begin{array}{ccccc|c}
x_1 &amp; x_2 &amp; x_3 &amp; x_4 &amp; x_5 &amp; b \\
\hline
\frac{3}{2} &amp; 0 &amp; 0 &amp; 0 &amp; -\frac{1}{2} &amp; \frac{1}{2} \\
\hline
\frac{1}{2} &amp; 0 &amp; 0 &amp; 1 &amp; \fbox{\(\frac{1}{2}\)} &amp; \frac{5}{2} \\
\frac{1}{2} &amp; 1 &amp; -1 &amp; 0 &amp; -\frac{1}{2} &amp; \frac{1}{2} \\
\end{array}
$$&lt;p&gt;Finally, the last step:&lt;/p&gt;
$$
\begin{array}{ccccc|c}
x_1 &amp; x_2 &amp; x_3 &amp; x_4 &amp; x_5 &amp; b \\
\hline
2 &amp; 0 &amp; 0 &amp; 1 &amp; 0 &amp; 3 \\
\hline
1 &amp; 0 &amp; 0 &amp; 2 &amp; 1 &amp; 5 \\
1 &amp; 1 &amp; -1 &amp; 1 &amp; 0 &amp; 3 \\
\end{array}
$$&lt;p&gt;Hence, we have reached our optimal solution with \(x^* = (x_1, x_2, x_3) = (0, 3, 0)\). Remember, you get the solution by checking which columns are unit vectors; non-unit vector columns mean they have the value 0. This is the same as \(x^* = (x_1, x_2) = (0, 3 - 0) = (0, 3)\) and \(f(x^*) = -3\).&lt;/p&gt;

 
&lt;/details&gt;


&lt;h4 id="546-advanced-example-phase-1"&gt;5.4.6 Advanced Example: Phase 1&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Task:&lt;/strong&gt; We have the following system of equations with \( \beta \in \mathbb{R}\):&lt;/p&gt;
$$
\begin{align*}
\begin{bmatrix}
1 &amp; 4 &amp; 2 \\
-1 &amp; 2 &amp; -4
\end{bmatrix}
\begin{bmatrix}
x_1 \\
x_2 \\
x_3
\end{bmatrix}
&amp;=
\begin{bmatrix}
2 \\
\beta
\end{bmatrix}
\end{align*}
$$&lt;p&gt;Check for all \(\beta \geq 0\) with the help of Phase 1 of the simplex algorithm if the system of equations has a non-negative solution.&lt;/p&gt;
&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution&lt;/summary&gt;
 
 &lt;p&gt;This problem is the same as asking whether \(M = \{Ax = b, x \geq 0\}\) is the empty set or not. This means asking whether a linear program is valid/feasible or not. We can solve this using Phase 1 of the simplex algorithm.&lt;/p&gt;
&lt;p&gt;First, we create the Phase 1 table:&lt;/p&gt;
$$
\begin{array}{ccc:c:c|c}
0 &amp; -6 &amp; 2 &amp; 0 &amp; 0 &amp; -2 -\beta \\
\hline
1 &amp; 4 &amp; 2 &amp; 1 &amp; 0 &amp; 2 &amp; \\
\hline
-1 &amp; 2 &amp; -4 &amp; 0 &amp; 1 &amp; \beta \\
\end{array}
$$&lt;p&gt;The pivot will be in the second column. However, it depends on the value of \(\beta\) whether it will be the first row or the second row.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Case 1&lt;/strong&gt; \(\beta \geq 1\): Then &lt;strong&gt;4&lt;/strong&gt; is the pivot, and we get the table:&lt;/p&gt;
$$
\begin{array}{ccc:c:c|c}
\frac{3}{2} &amp; 0 &amp; 1 &amp; \frac{3}{2} &amp; 0 &amp; 1 -\beta \\
\hline
\frac{1}{4} &amp; 1 &amp; \frac{1}{2} &amp; \frac{1}{4} &amp; 0 &amp; \frac{1}{2} &amp; \\
\hline
-\frac{3}{2} &amp; 0 &amp; -5 &amp; -\frac{1}{2} &amp; 1 &amp; \beta - 1 \\
\end{array}
$$&lt;p&gt;If \(\beta = 1\), then Phase 1 is finished as the cost vector (the first row of the table) is positive, with \(\min f = 0\). If \(\beta &gt; 1\), then \(M = \emptyset\).&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Case 2&lt;/strong&gt; \(0 \leq \beta \leq 1\): Then &lt;strong&gt;2&lt;/strong&gt; is the pivot, and we get the table:&lt;/p&gt;
$$
\begin{array}{ccc:c:c|c}
-3 &amp; 0 &amp; -10 &amp; 0 &amp; 3 &amp; -2 + 2 \beta \\
\hline
\fbox{3} &amp; 0 &amp; 10 &amp; 1 &amp; -2 &amp; 2 - 2 \beta &amp; \\
\hline
-\frac{1}{2} &amp; 1 &amp; -2 &amp; 0 &amp; \frac{1}{2} &amp; \frac{\beta}{2} \\
\end{array}
$$&lt;p&gt;Then:&lt;/p&gt;
$$
\begin{array}{ccc:c:c|c}
0 &amp; 0 &amp; 0 &amp; 1 &amp; 1 &amp; 0 \\
\hline
1 &amp; 0 &amp; \frac{10}{3} &amp; \frac{1}{3} &amp; -\frac{2}{3} &amp; \frac{2}{3} - \frac{2}{3} \beta &amp; \\
\hline
0 &amp; 1 &amp; -\frac{1}{3} &amp; \frac{1}{6} &amp; \frac{1}{6} &amp; \frac{1}{3} + \frac{1}{6} \beta \\
\end{array}
$$&lt;p&gt;With this, Phase 1 is finished, and the problem has a solution for \( 0 \leq \beta \leq 1\).&lt;/p&gt;

 
&lt;/details&gt;


&lt;h4 id="547-simplex-feasibility-and-solvability"&gt;5.4.7 Simplex, Feasibility, and Solvability&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Task:&lt;/strong&gt; We have the following linear program:&lt;/p&gt;
$$
(P) \quad \text{Minimize} \ \ c^T x \ \ \text{under} \ \ Ax = b, \ x \geq 0, \ b \geq 0 
$$&lt;p&gt;Furthermore, we have the helper problem:&lt;/p&gt;
$$
(P') \quad \text{Minimize} \ \ c^T x + \alpha e^T z \ \ \text{under} \ \ Ax + z = b, \ x \geq 0, \ b \geq 0, \ z \geq 0
$$&lt;p&gt;Show that:&lt;/p&gt;
&lt;p&gt;(a) There is an immediate basic solution for (P&amp;rsquo;). &lt;br&gt;
(b) If \((x^*, z^*)\) is a solution of (P&amp;rsquo;) with \(z^* = 0\), then \(x^*\) is a solution for (P).&lt;/p&gt;
&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution (a)&lt;/summary&gt;
 
 &lt;p&gt;We can write (P&amp;rsquo;) in its canonical form:&lt;/p&gt;
$$
\begin{bmatrix}
A &amp; I 
\end{bmatrix}
\begin{bmatrix}
x \\
z 
\end{bmatrix}
= b
$$&lt;p&gt;Since \(b \geq 0\) according to the task description, we have the basic solution \((x, z) = (0, b)\).&lt;/p&gt;

 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution (b)&lt;/summary&gt;
 
 &lt;p&gt;We are given our solution \((x^*, z^*)^T\) of problem (P&amp;rsquo;). Since \(z^* = 0\), the constraints of (P&amp;rsquo;) are \(Ax^* = b\), \(x^* \geq 0\). This means that \(x^*\) is a feasible point (a possible solution, since it fulfills the constraints) of (P).&lt;/p&gt;
&lt;p&gt;It remains to show that \(x^*\) is the optimal solution.&lt;/p&gt;
&lt;p&gt;Since \((x^*, z^*)\) is optimal for (P&amp;rsquo;):&lt;/p&gt;
$$
c^T x^* = c^T x^* + \alpha e^T z^* \leq c^T x + \alpha e^T 0 = c^T x
$$&lt;p&gt;This means that \(x^*\) is optimal for (P).&lt;/p&gt;

 
&lt;/details&gt;


&lt;h2 id="6-convex-optimization"&gt;6. Convex Optimization&lt;/h2&gt;
&lt;p&gt;Until now, we have only seen linear optimization problems, with linear objective functions and linear constraints. We now want to explore another important family of functions that we want to optimize: convex functions.&lt;/p&gt;
&lt;h3 id="61-convex-functions"&gt;6.1 Convex Functions&lt;/h3&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Definition&lt;/strong&gt;&lt;br&gt;
We call a set \(M \subset \mathbb{R}^n\) &lt;strong&gt;convex&lt;/strong&gt; if for \(x, y \in M\) and \(\lambda \in [0,1]\), the following holds: \((1 - \lambda)x + \lambda y \in M\).&lt;/p&gt;
&lt;/blockquote&gt;


&lt;figure&gt;
&lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width: 60%" src="https://monkemanx.github.io/attachments/convex_set.jpg"&gt;
&lt;figcaption style="margin-top: 10px; text-align:center"&gt;
 Convex and Non-Convex Set.
&lt;/figcaption&gt;
&lt;/figure&gt;


&lt;p&gt;In other words, we say that a set is &lt;em&gt;convex&lt;/em&gt; if we have two points \(a, b\), and their interval \([a, b]\) is also in the set. In convex optimization problems, both the domain of the definition and the target area are convex sets.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Definition&lt;/strong&gt;&lt;br&gt;
Let \(D \subset \mathbb{R}^n\) be convex.&lt;br&gt;
a) A function \(f : D \to \mathbb{R}\) is called &lt;strong&gt;convex&lt;/strong&gt; if for all \(x, y \in D\) and \(\lambda \in [0,1]\), the following applies:&lt;/p&gt;
$$
f (\lambda x + (1 - \lambda) y) \leq \lambda f(x) + (1 - \lambda) f(y)
$$&lt;p&gt;b) A function \(f : D \to \mathbb{R}\) is called &lt;strong&gt;strictly convex&lt;/strong&gt; if for all \(x, y \in D\) with \(x \neq y\) and \(\lambda \in (0, 1)\), the following applies:&lt;/p&gt;
$$
f (\lambda x + (1 - \lambda) y) &lt; \lambda f(x) + (1 - \lambda) f(y)
$$&lt;p&gt;c) A function \(f : D \to \mathbb{R}\) is called &lt;strong&gt;steadily convex&lt;/strong&gt; if there exists \(c_0 &gt; 0\) such that for all \(x, y \in D\) and \(\lambda \in [0, 1]\), the following applies:&lt;/p&gt;
$$
f (\lambda x + (1 - \lambda) y) + c_0 \lambda (1 - \lambda) || x - y ||^2 \leq \lambda f(x) + (1 - \lambda) f(y)
$$&lt;/blockquote&gt;


&lt;figure&gt;
&lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width: 100%" src="https://monkemanx.github.io/attachments/convex_function.jpg"&gt;
&lt;figcaption style="margin-top: 10px;text-align:center"&gt;
 An illustration of the definition of a convex function.
&lt;/figcaption&gt;
&lt;/figure&gt;


&lt;p&gt;Convex functions are defined analogously to convex sets. We say a function is convex when, for any two points, we can draw a line between them that is above the function.&lt;/p&gt;
&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details open&gt;
 &lt;summary&gt;Example&lt;/summary&gt;
 
 &lt;p&gt;a) The function \(f(x) = c^T x, x \in \mathbb{R}^n\) is convex, but not strictly convex.&lt;/p&gt;
&lt;p&gt;b) \(f(x) = \frac{1}{1 + x}, x \geq 0\) is strictly convex, but not steadily convex.&lt;/p&gt;
&lt;p&gt;c) Let \(Q \in \mathbb{R}^{n \times n}\) be symmetric and positive definite, then \(f(x) = x^T Qx + c^T x\) is convex.&lt;/p&gt;

 
&lt;/details&gt;


&lt;p&gt;We can define the &lt;a href="https://en.wikipedia.org/wiki/Gradient"&gt;gradient&lt;/a&gt; \( \nabla f (x)\), which gives us the rate of change (first derivative) in all directions. We also have the &lt;a href="https://en.wikipedia.org/wiki/Hessian_matrix"&gt;Hessian matrix&lt;/a&gt; \( \nabla^2 f(x)\), which gives the second rate of change (i.e., the second derivative) of this function.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Lemma&lt;/strong&gt;&lt;br&gt;
Let \( D \subset \mathbb{R}^n \) be open and convex, then the following holds:&lt;/p&gt;
&lt;p&gt;a) \(f\) is &lt;em&gt;steadily convex&lt;/em&gt; on \(D\), if one of the following equivalent conditions holds:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;There exists \(c_0 \geq 0\) such that \(f(x) - f(y) \geq \nabla f(y)^T (x - y) + c_0 ||x - y||^2\)&lt;/li&gt;
&lt;li&gt;There exists \(c_0 \geq 0\) such that \(z^T \nabla^2 f(x) z \geq 2 c_0 ||z||^2\)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;b) \(f\) is &lt;em&gt;strictly convex&lt;/em&gt;, when in (a) we can replace \(c_0 = 0\) and &amp;ldquo;\(\leq\)&amp;rdquo; with &amp;ldquo;\(&lt;\)&amp;rdquo; for \(x \neq y, z \neq 0\).&lt;/p&gt;
&lt;p&gt;c) \(f\) is convex, when in (a) we can replace \(c_0 = 0\).&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;This means that if we want, for example, to show that a certain function is convex, we can show that its second derivative is always positive.&lt;/p&gt;
&lt;h3 id="62-existence-and-unambiguity"&gt;6.2 Existence and Unambiguity&lt;/h3&gt;
&lt;p&gt;For &lt;strong&gt;linear optimization problems&lt;/strong&gt;, it was sufficient for \(M \neq \emptyset\) and \(\inf(P) \geq -\infty\) for a solution to exist, i.e., for the problem to have a solution.&lt;/p&gt;
&lt;p&gt;In general, this is not true for &lt;em&gt;convex optimization problems&lt;/em&gt;.&lt;/p&gt;
&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details open&gt;
 &lt;summary&gt;Example&lt;/summary&gt;
 
 &lt;p&gt;Let&amp;rsquo;s look at the function&lt;/p&gt;
$$
f(x) = \frac{1}{x}
$$&lt;p&gt;for which \(\inf \ f(x) = 0\), but \(f(x) &gt; 0\), meaning we can never reach the optimal solution.&lt;/p&gt;
&lt;p&gt;Thus, we need additional conditions and prerequisites for our convex optimization problem to be solvable.&lt;/p&gt;

 
&lt;/details&gt;


&lt;p&gt;We now look at the general convex problem:&lt;/p&gt;
$$
(P) \quad \min f(x), \quad M = \{x \in K : g(x) \leq 0, Ax = b\}
$$&lt;p&gt;
where \(K \subset \mathbb{R}^n\) is a convex set, and \(f, g\) are convex functions.&lt;/p&gt;
&lt;p&gt;In optimization theory, we differentiate between &lt;em&gt;local minima&lt;/em&gt; (the lowest point in a subset of the landscape) and &lt;em&gt;global minima&lt;/em&gt; (the lowest point in the overall landscape). But for convex functions, they are one and the same.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Lemma&lt;/strong&gt;&lt;br&gt;
All &lt;em&gt;local minima&lt;/em&gt; of a convex function are also &lt;em&gt;global minima&lt;/em&gt;. The set of minima is convex.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Lemma&lt;/strong&gt;&lt;br&gt;
(P) has a solution if \(M \neq \emptyset\), \(\inf(P) \leq -\infty\), and \(\Lambda = \{(f(x) + r, g(x) + z, Ax - b) \in \mathbb{R} \times \mathbb{R}^p \times \mathbb{R}^m : r \geq 0, z \geq 0, x \in K\}\) is closed.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Lemma&lt;/strong&gt;&lt;br&gt;
If \(M \neq \emptyset\) and \(f\) is &lt;em&gt;strictly convex&lt;/em&gt;, then (P) has at most one solution.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Lemma&lt;/strong&gt;&lt;br&gt;
If \(M \neq \emptyset\) and \(f\) is &lt;em&gt;steadily convex&lt;/em&gt;, then (P) has exactly one unambiguous solution.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h3 id="63-the-dual-problem-and-duality-lemmas"&gt;6.3 The Dual Problem and Duality Lemmas&lt;/h3&gt;
&lt;p&gt;Let \(K \subset \mathbb{R}^n\) be a convex set, and let \(f, g_i\) be convex functions, with \(A\) a matrix and \(b\) a vector.&lt;/p&gt;
&lt;p&gt;We now look at a problem that looks like this:&lt;/p&gt;
$$
(P) \quad \text{Minimize} \ \ f(x) \ \ \text{on} \ \ M = \{x \in K : g(x) \leq 0, Ax = b\}
$$&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details open&gt;
 &lt;summary&gt;Examples&lt;/summary&gt;
 
 &lt;p&gt;a) If there are no restrictions on \(g_i\) and \(f(x) = c^T x\), then we have a linear optimization problem.&lt;/p&gt;
&lt;p&gt;b) If \(Q\) is symmetric and positive definite, and&lt;/p&gt;
$$
f(x) := x^T Q x + c^T x
$$&lt;p&gt;then \(f\) is convex. To see this, one can compute the second derivative: \(\nabla^2 f(x) = 2Q\).&lt;/p&gt;

 
&lt;/details&gt;


&lt;p&gt;Now, we can define the dual problem to our primal problem:&lt;/p&gt;
$$
(D) \quad \text{Maximize} \ \ F(u, v) := \inf[L(x, u, v)] \quad \text{on} \quad N = \{(u,v) : u \geq 0, F(u, v) \geq -\infty\}
$$&lt;p&gt;Next, we introduce the &lt;strong&gt;Lagrange function&lt;/strong&gt;:&lt;/p&gt;
$$
L(x, u, v) := f(x) + u^T g(x) + v^T (Ax - b), \quad x \in \mathbb{R}^n, \quad u \geq 0
$$&lt;p&gt;The dual variables \(u\) and \(v\) are called the &lt;strong&gt;Lagrange multipliers&lt;/strong&gt;. The Lagrange function helps us transform optimization problems with equality constraints into problems without equality constraints.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Lemma&lt;/strong&gt; (Weak Duality)&lt;br&gt;
Given (P) and (D), then&lt;/p&gt;
$$ 
f(x) \geq F(u, v)
$$&lt;p&gt;
If \(f(x^*) = F(u^*, v^*)\), then \(x^*, (u^*, v^*)\) are optimal for (P) and (D).&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;For the lemma of strong duality, we need two prerequisites that must be satisfied.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Definition&lt;/strong&gt;&lt;br&gt;
A problem satisfies the &lt;strong&gt;Slater condition&lt;/strong&gt; if both conditions are fulfilled:&lt;br&gt;
(i) \( \text{rank}(A) = m \leq n \)&lt;br&gt;
(ii) There exists \(x' \in \mathbb{R}^n\) such that \(Ax' = b\) and \(g_i(x') &lt; 0\) for all \(i\).&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Lemma&lt;/strong&gt; (Strong Duality)&lt;br&gt;
Let \(f, g\) be continuous, and (P) be solvable with \(x^* \in M\). If the &lt;em&gt;Slater condition&lt;/em&gt; is satisfied, then there exists a solution \((u^*, v^*) \in N\) for (D) and \(f(x^*) = F(u^*, v^*)\). Furthermore, \(u_j^* g_j(x^*) = 0\).&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;A point \((x^*, u^*, v^*)\) with&lt;/p&gt;
$$
L(x^*, u, v) \leq L(x^*, u^*, v^*) \leq L(x, u^*, v^*) \quad \forall x \in \mathbb{R}^n, u \in \mathbb{R}^p, u \geq 0, v \in \mathbb{R}^m
$$&lt;p&gt;is called a &lt;strong&gt;saddle point&lt;/strong&gt; of the Lagrange function. These points have important properties.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Lemma&lt;/strong&gt; (Saddle Point Lemma)&lt;br&gt;
Let (P) be a convex optimization problem with \(K = \mathbb{R}^n\), and the &lt;em&gt;Slater condition&lt;/em&gt; is satisfied.&lt;br&gt;
a) If \(x^* \in M\) is optimal for (P), then a &lt;em&gt;saddle point&lt;/em&gt; \((x^*, u^*, v^*)\) exists.&lt;br&gt;
b) If \((x^*, u^*, v^*)\) is a saddle point, then \(x^*\) is a solution of (P) and \((u^*, v^*)\) is a solution of (D).&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;This means that if \(L\) has a saddle point, then \(x^*\) is the minimum of \(L(*, u^*, v^*)\) and \((u^*, v^*)\) is the maximum of \(L(x^*, *, *)\).&lt;/p&gt;
&lt;p&gt;From the saddle point lemma, we can derive a &lt;em&gt;Lagrange Multiplier Lemma&lt;/em&gt;, for which we need a simple necessary optimization condition:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Lemma&lt;/strong&gt;&lt;br&gt;
Let \(U \subset \mathbb{R}^n\) be open, \(f\) differentiable, and \(x^* \in U\) a local minimum of \(f\). Then \(\nabla f(x^*) = 0\).&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;We can apply this to the Lagrange function:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Lemma&lt;/strong&gt; (Lagrange Multiplier)&lt;br&gt;
Let \(f, g_i\) be convex and differentiable, and the Slater condition is satisfied. Then \(x^* \in M\) is the unique solution of (P) if there exist \(u^* \in \mathbb{R}^p, u^* \geq 0, v^* \in \mathbb{R}^m\) such that&lt;/p&gt;
$$
\nabla f(x^*) + \sum u_j^* \nabla g_j(x^*) + A^T v^* = 0
$$&lt;p&gt;and&lt;/p&gt;
$$
u_j^* g_j(x^*) = 0, \quad j = 1, \dots, p
$$&lt;/blockquote&gt;
&lt;h3 id="64-set-of-problems-and-solutions"&gt;6.4 Set of Problems and Solutions&lt;/h3&gt;
&lt;h4 id="641-convex-sets-cones-and-polyhedra"&gt;6.4.1 Convex Sets, Cones, and Polyhedra&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Task:&lt;/strong&gt; Show that:&lt;br&gt;
a) The set \( P = \text{conv}\{(1, 3), (2, 0), (4, 2), (2, 6)\} \) is a polyhedron.&lt;br&gt;
b) The set \( K = \{(x, y) : (x, y) = r (\cos(\phi), \sin(\phi)), r \geq 0, -\frac{\pi}{4} \leq \phi \leq \frac{\pi}{2}\} \) is a finite generated cone.&lt;/p&gt;
&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution a)&lt;/summary&gt;
 
 &lt;p&gt;If \(P\) is a polyhedron, then there exists a matrix \(A\) and a vector \(b\) such that&lt;/p&gt;
$$
P = \{x \in \mathbb{R}^2 : Ax \geq b\}
$$&lt;p&gt;In other words, \(P\) can be represented as the intersection of finitely many half-spaces.&lt;br&gt;
We can display the set \(M\) and its convex hull graphically:&lt;/p&gt;
&lt;figure&gt;
&lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width: 50%" src="https://monkemanx.github.io/attachments/convex_hull_and_polyhedral.jpg"&gt;
&lt;/figure&gt;
&lt;p&gt;The convex hull is described by all points that lie in the polygon formed between the corners.&lt;/p&gt;
&lt;p&gt;We can create the following system of linear equalities:&lt;/p&gt;
$$
\begin{aligned}
AB: 3x_1 + x_2 = 6 \\
BC: -x_1 + x_2 = -2 \\
CD: -2x_1 - x_2 = -10 \\
AD: 3x_1 - x_2 = 0
\end{aligned}
$$&lt;p&gt;With this, we can create our half-spaces to describe the polyhedron:&lt;/p&gt;
$$
A = 
\begin{pmatrix} 
3 &amp; 1 \\
-1 &amp; 1 \\
-2 &amp; -1 \\
3 &amp; -1
\end{pmatrix}, \quad b =
\begin{pmatrix} 
6 \\
-2 \\
-10 \\
0
\end{pmatrix}
$$&lt;p&gt;Thus, we have a polyhedron.&lt;/p&gt;

 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution b)&lt;/summary&gt;
 
 &lt;p&gt;If \(K\) is a finite generated cone, then there exists a matrix \(U\) such that \( K = \{ U \lambda : \lambda \geq 0 \} \), which means the set of all points is a linear combination of the columns in \(U\) that are non-negative.&lt;/p&gt;
&lt;p&gt;Let \( I = [-\frac{\pi}{4}, \frac{\pi}{2}] \). We can then write:&lt;/p&gt;
$$
\begin{aligned}
K &amp;= \{ r (\cos(\phi), \sin(\phi)) : r \geq 0, \phi \in I \} \\
 &amp;= \{ r (-\cos(\phi), -\sin(\phi)) : r \geq 0, \phi \in I \} \\
 &amp;= \{ U \lambda : \lambda \geq 0 \}
\end{aligned}
$$&lt;p&gt;With&lt;/p&gt;
$$
U = 
\begin{pmatrix} 
-\cos(\frac{\pi}{2}) &amp; -\cos(-\frac{\pi}{4}) \\
-\sin(\frac{\pi}{2}) &amp; -\sin(-\frac{\pi}{4})
\end{pmatrix}
$$
 
&lt;/details&gt;


&lt;h4 id="642-convex-functions"&gt;6.4.2 Convex Functions&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Task:&lt;/strong&gt;&lt;br&gt;
a) Show that the following functions are convex:&lt;br&gt;
(i) \( f_1(x) = \|x\| \)&lt;br&gt;
(ii) \( f_2(x) = \max\{x_1, \dots, x_n\} \)&lt;br&gt;
(iii) \( f_3(x) = \frac{x_2^2}{x_1} \)&lt;br&gt;
(iv) \( f_4(x) = \exp(a^T x) \)&lt;/p&gt;
&lt;p&gt;b) Which of these functions are strictly convex?&lt;/p&gt;
&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution a)&lt;/summary&gt;
 
 &lt;p&gt;(i) \( f_1(\lambda x + (1 - \lambda) y) = \| \lambda x + (1 - \lambda) y \| \leq \lambda \| x \| + (1 - \lambda) \| y \| \), where the last step uses the triangle inequality.&lt;/p&gt;
&lt;p&gt;(ii) \( f_2(\lambda x + (1 - \lambda) y) = \max\{\lambda x_1 + (1 - \lambda) y_1, \dots, \lambda x_n + (1 - \lambda) y_n\} \leq \max\{\lambda x_1, \dots, \lambda x_n\} + \max\{(1 - \lambda) y_1, \dots, (1 - \lambda) y_n\} = \lambda f_2(x) + (1 - \lambda) f_2(y) \)&lt;/p&gt;
&lt;p&gt;(iii) The gradient and Hessian matrix are:&lt;/p&gt;
$$
\nabla f_3(x) = \left( \frac{-x_2^2}{x_1^2}, \ \frac{2 x_2}{x_1} \right), \quad H_f(x) = 
\begin{pmatrix} 
\frac{2x_2^2}{x_1^3} &amp; \frac{-2x_2}{x_1^2} \\
\frac{-2x_2}{x_1^2} &amp; \frac{2}{x_1}
\end{pmatrix}
$$&lt;p&gt;Using the Hessian, we can show convexity:&lt;/p&gt;
$$
\begin{aligned}
z^T H_f(x) z &amp;= z_1 \left( \frac{2x_2^2}{x_1^3} z_1 - \frac{2x_2}{x_1^2} z_2 \right) + z_2 \left( \frac{-2x_2}{x_1^2} z_1 + \frac{2}{x_1} z_2 \right) \\
&amp;= \frac{2}{x_1} \left( \frac{x_2}{x_1} z_1 - z_2 \right)^2 \geq 0
\end{aligned}
$$&lt;p&gt;Thus, \( H_f(x) \) is positive definite, and the function is convex.&lt;/p&gt;
&lt;p&gt;(iv) Since \( \exp(x) \) is convex, we have:&lt;/p&gt;
$$
f_4(\lambda x + (1 - \lambda) y) = \exp(a^T(\lambda x + (1 - \lambda) y)) = \exp(a^T \lambda x + a^T(1 - \lambda) y) \\
\leq \lambda \exp(a^T x) + (1 - \lambda) \exp(a^T y) = \lambda f_4(x) + (1 - \lambda) f_4(y)
$$&lt;p&gt;Thus, \( f_4(x) \) is convex.&lt;/p&gt;

 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution b)&lt;/summary&gt;
 
 &lt;p&gt;(i) Norms are never strictly convex. For example, if \( x \neq 0 \) and \( y = 0 \), then \( \|x\| = \|y\| \), which implies they are equivalent and not strictly greater.&lt;/p&gt;
&lt;p&gt;(ii) Not strictly convex. For example, \( \max\{1, 0\} = \max\{1, 0.5\} = \max\{1, 1\} = 1 \), so we can have points with the same function value, which violates the condition for strict convexity.&lt;/p&gt;
&lt;p&gt;(iii) Not strictly convex. For example, \( f_3(x_1, 0) = 0 \) for all \( x_1 \), as shown in (ii).&lt;/p&gt;
&lt;p&gt;(iv) Not strictly convex for \( a = 0 \).&lt;/p&gt;

 
&lt;/details&gt;


&lt;h4 id="643-duality-for-convex-problems"&gt;6.4.3 Duality for Convex Problems&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Task:&lt;/strong&gt;&lt;br&gt;
Given the convex optimization problem&lt;/p&gt;
$$
(P) \quad \min \ \ x_1^2 + x_2, \ \ M = \{x \in \mathbb{R}^2 : \| x \|_2 \leq 1\}
$$&lt;p&gt;formulate the dual problem (D) and solve both.&lt;/p&gt;
&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution&lt;/summary&gt;
 
 &lt;p&gt;First, we will check that (P) is indeed a convex problem.&lt;/p&gt;
$$
f(x) = x_1^2 + x_2 = x^T Q x + c^T x
$$&lt;p&gt;with&lt;/p&gt;
$$
Q =
\begin{pmatrix} 
1 &amp; 0 \\
0 &amp; 0
\end{pmatrix}, \quad 
c = 
\begin{pmatrix}
0 \\
1
\end{pmatrix}
$$&lt;p&gt;Since we can write the problem in this form, it is convex.&lt;/p&gt;
&lt;p&gt;Next, we can formulate the Lagrange function for the problem.&lt;/p&gt;
$$
L(x, u) = f(x) + u^T g(x) + v^T (Ax - b)
$$$$
= x_1^2 + x_2 + u (x_1^2 + x_2^2 - 1) = (1 + u)x_1^2 + (u x_2 + 1)x_2 - u
$$&lt;p&gt;From this, we obtain:&lt;/p&gt;
$$
F(u) = \inf L(x,u) = \inf_{x_1} \left( (1 + u)x_1^2 \right) + \inf_{x_2} \left( (u x_2 + 1)x_2 \right) - u
$$&lt;p&gt;which has the property \( F(0) = -\infty \). We take the derivative of \( L \):&lt;/p&gt;
$$
\nabla_x L(x, u) = 
\begin{pmatrix}
2(1 + u)x_1 \\
2ux_2 + 1
\end{pmatrix}
$$&lt;p&gt;Setting \( \nabla_x L(x, u) = 0 \):&lt;/p&gt;
$$
\begin{pmatrix}
x_1 \\
x_2
\end{pmatrix}
\ = \ 
\begin{pmatrix}
0 \\
-\frac{1}{2u}
\end{pmatrix}
$$&lt;p&gt;The minimum is thus:&lt;/p&gt;
$$
F(u) =
\begin{cases}
-\frac{1}{4u} - u, &amp; u &gt; 0 \\
-\infty, &amp; u = 0
\end{cases}
$$&lt;p&gt;We now solve:&lt;/p&gt;
$$
\max_u F(u)
$$&lt;p&gt;Analysis shows that \( u^* = \frac{1}{2} \) is the solution from (D) with \( \max(D) = -1 \). By the weak duality lemma, any \( x^* \) such that \( f(x^*) = -1 \) is a solution of (P). For example, the point \( x^* = (0, 1) \in M \).&lt;/p&gt;

 
&lt;/details&gt;


&lt;h4 id="644-duality-and-slater-condition"&gt;6.4.4 Duality and Slater Condition&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Task:&lt;/strong&gt;&lt;br&gt;
The function \( g \) is given by&lt;/p&gt;
$$
g(x) =
\begin{cases}
e^x - 2, \quad x &lt; 0, \\
2x - 1, \quad x \geq 0
\end{cases}
$$&lt;p&gt;And the optimization problem is&lt;/p&gt;
$$
\min \ f(x) = -x \quad \text{subject to} \quad g(x) \leq 0.
$$&lt;p&gt;a) Show that \( f \) and \( g \) are convex, and that (P) is a convex optimization problem.&lt;br&gt;
b) Is the Slater condition fulfilled?&lt;br&gt;
c) What is the dual problem (D) to (P)?&lt;br&gt;
d) Solve (P) and (D).&lt;br&gt;
e) Is there a duality gap?&lt;/p&gt;
&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution a)&lt;/summary&gt;
 
 &lt;p&gt;The function \( f \) is linear, and thus convex.&lt;/p&gt;
&lt;p&gt;We calculate the first derivatives of \( g(x) \):&lt;/p&gt;
$$
g'(x) =
\begin{cases}
e^x, \quad x &lt; 0 \\
2, \quad x \geq 0
\end{cases}
$$&lt;p&gt;We check the convexity condition for \( x, y \in \mathbb{R} \) and assume \( x \leq y \):&lt;/p&gt;
$$
[g'(y) - g'(x)](y - x) \geq 0.
$$&lt;p&gt;We can then do a case distinction:&lt;/p&gt;
&lt;p&gt;(i) \( x, y \in (-\infty, 0): \quad g'(y) - g'(x) = e^y - e^x \geq 0 \)&lt;br&gt;
(ii) \( x \in (-\infty, 0), y \in [0, \infty): \quad g'(y) - g'(x) = 2 - e^x \geq 0 \)&lt;br&gt;
(iii) \( x, y \in [0, \infty): \quad g'(y) - g'(x) = 2 - 2 \geq 0 \)&lt;/p&gt;
&lt;p&gt;Thus, the function \( g(x) \) is convex.&lt;/p&gt;

 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution b)&lt;/summary&gt;
 
 &lt;p&gt;The Slater condition is:&lt;/p&gt;
&lt;p&gt;(i) \( Rg(A) = m \leq n \)&lt;br&gt;
(ii) There exists \( x' \in \mathbb{R}^n \) such that \( A x' = b \) and \( g_i(x') &lt; 0 \).&lt;/p&gt;
&lt;p&gt;We do not have any condition of the form \( A x = b \), so we only need to check the second condition.&lt;/p&gt;
&lt;p&gt;We can use any \( x \leq 1/2 \) such that \( g(x) \leq 0 \).&lt;/p&gt;

 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution c)&lt;/summary&gt;
 
 &lt;p&gt;We establish the Lagrange function with \( u \geq 0 \):&lt;/p&gt;
$$
L(u) = \inf \left[ f(x) + u^T g(x) \right] = \inf \left[ -x + u^T g(x) \right].
$$&lt;p&gt;&lt;strong&gt;Case 1: \( u = 0 \)&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;
\[
L(0) = \inf[-x] = -\infty.
\]&lt;p&gt;&lt;strong&gt;Case 2: \( u &gt; 0 \), then we differentiate:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;(i) \( x &lt; 0 \)&lt;/p&gt;
$$
L_-(u) = \inf[-x + u(e^x - 2)] = -2u + \inf[-x + ue^x].
$$&lt;p&gt;For \( 0 &lt; u \leq 1 \),&lt;/p&gt;
$$
L_-(u) = -2u - u e^0 = -u.
$$&lt;p&gt;For \( u &gt; 1 \), the function \( -x + ue^x \) is monotonically decreasing on \( (-\infty, -\ln(u)] \) and increasing on \( [-\ln(u), 0) \). Thus,&lt;/p&gt;
$$
L_-(u) = -2u + \ln(u) + ue^{-\ln(u)} = -2u + \ln(u) + 1.
$$&lt;p&gt;(ii) \( x \geq 0 \)&lt;/p&gt;
$$
L_+(u) = -u + \inf[(2u - 1)x] =
\begin{cases}
-u, \quad 2u - 1 \geq 0 \\
-\infty, \quad 2u - 1 &gt; 0
\end{cases}
$$&lt;p&gt;Thus, we can bring all cases together:&lt;/p&gt;
$$
L(u) = \min \{ L_-(u), L_+(u) \} =
\begin{cases}
-\infty, \quad u = 0 \\
-\infty, \quad 0 &lt; u &lt; 1/2 \\
-u, \quad 1/2 \leq u \leq 1 \\
-2u + 1 + \ln(u), \quad u &gt; 1
\end{cases}
$$&lt;p&gt;Our dual problem with \( u \geq 1/2 \) is then:&lt;/p&gt;
$$
(D) \quad \max \ L(u) =
\begin{cases}
-u, \quad 1/2 \leq u \leq 1 \\
-2u + 1 + \ln(u), \quad u &gt; 1
\end{cases}
$$
 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution d)&lt;/summary&gt;
 
 &lt;p&gt;The primal problem is feasible because \( g(x) \leq 0 \) if \( x \leq 1/2 \). Further, \( f(x) = -x \geq -1/2 = f(1/2) \) for all \( x \leq 1/2 \).&lt;br&gt;
Thus, the solution is:&lt;/p&gt;
$$
\min f(x) = -1/2.
$$&lt;p&gt;The function \( L(u) \) is the dual problem:&lt;/p&gt;
$$
\max \ L(u) = L(1/2) = -1/2.
$$
 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution e)&lt;/summary&gt;
 
 There is no duality gap because \( \min(P) = \max(D) \).
 
&lt;/details&gt;


&lt;h4 id="645-duality-and-saddle-point-lemma"&gt;6.4.5 Duality and Saddle Point Lemma&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Task:&lt;/strong&gt;&lt;br&gt;
Given:&lt;/p&gt;
$$
\min \ \ f(x) = e^{x_1^2 + (x_2 - 1)^2}
$$&lt;p&gt;subject to:&lt;/p&gt;
$$
M = \{|x_2| - x_1 \leq 0, \ x_2^2 + x_1 \leq 1\}
$$&lt;p&gt;a) Show that (P) is a convex problem.&lt;br&gt;
b) Show that (P) has a solution.&lt;br&gt;
c) Calculate the solution of (P) using duality and the saddle point lemma.&lt;/p&gt;
&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution a)&lt;/summary&gt;
 
 &lt;p&gt;Let \( h_1 = |x_2| - x_1 \) and \( h_2 = x_2^2 + x_1 - 1 \), with \( \lambda \in [0,1] \):&lt;/p&gt;
$$
\begin{aligned}
h_1(\lambda x + (1 - \lambda)y) &amp;= |\lambda x_2 + (1 - \lambda)y_2| - (\lambda x_1 + (1 - \lambda)y_1) \\
&amp;\leq \lambda (|x_2| - x_1) + (1 - \lambda)(|y_2| - y_1) \\
&amp;= \lambda h_1(x) + (1 - \lambda) h_1(y)
\end{aligned}
$$&lt;p&gt;This shows that \( h_1 \) is convex. To show that \( h_2 \) is convex, we compute:&lt;/p&gt;
$$
\nabla h_2(x) = 
\begin{pmatrix}
1 \\
2x_2
\end{pmatrix}
, \quad 
\nabla^2 h_2(x) = 
\begin{pmatrix}
0 &amp; 0 \\
0 &amp; 2
\end{pmatrix}
$$&lt;p&gt;Since the Hessian matrix is semi-positive definite, \( h_2 \) is convex. Furthermore, both \( h_1 \) and the exponential function \( e^x \) are convex, and the composition of convex functions is convex. Hence, \( f(x) = e^{x_1^2 + (x_2 - 1)^2} \) is convex.&lt;/p&gt;

 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution b)&lt;/summary&gt;
 
 The function \( f(x) \) is a composition of continuous functions, which are smooth and bounded. Furthermore, the set \( M \) is closed and bounded, which makes it compact. According to the Weierstrass Extreme Value Theorem, a continuous function on a compact set always attains a minimum, ensuring that (P) has a solution.
 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution c)&lt;/summary&gt;
 
 &lt;p&gt;First, let’s consider \( x = (1/2, 0) \in M \). For this point, \( h_1(x) = -1/2 &lt; 0 \) and \( h_2(x) = -1/2 &lt; 0 \), which means this point satisfies the Slater condition and is feasible.&lt;/p&gt;
&lt;p&gt;By the strong duality lemma, a solution to the dual problem exists. We define the Lagrangian:&lt;/p&gt;
$$
(D) \quad F(u) = \inf \left( e^{x_1^2 + (x_2 - 1)^2} + u_1 (|x_2| - x_1) + u_2 (x_2^2 + x_1 - 1) \right).
$$&lt;p&gt;For a pair \( (x', u') \), the complementary slackness condition \( u'^T h(x') = 0 \) holds. Combining this with the saddle point lemma, we have:&lt;/p&gt;
$$
\begin{aligned}
&amp; e^{x_1'^2 + (x_2' - 1)^2} + u_1 (|x_2'| - x_1') + u_2 (x_2'^2 + x_1' - 1) \\
&amp; \leq e^{x_1'^2 + (x_2' - 1)^2} + u_1' (|x_2'| - x_1') + u_2' (x_2'^2 + x_1' - 1) \\
&amp; = e^{x_1'^2 + (x_2' - 1)^2}.
\end{aligned}
$$&lt;p&gt;We analyze three cases:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Case 1: \( u_1' = 0 \):&lt;/strong&gt;&lt;br&gt;
With \( x_1 = 0 \) and \( x_2 = 1 \), we get a contradiction.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Case 2: \( |x_2'| = x_1' \) and \( u_2' = 0 \):&lt;/strong&gt;&lt;br&gt;
This gives a candidate solution \( x' = (1/2, 1/2) \), with \( f(x') = e^{1/2} \).&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Case 3: \( |x_2'| = x_1' \) and \( x_2'^2 + x_1' - 1 = 0 \):&lt;/strong&gt;&lt;br&gt;
This gives \( x' = (1/2, 1/2) \).&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Thus, the solution to the problem is \( x' = (1/2, 1/2) \).&lt;/p&gt;

 
&lt;/details&gt;


&lt;h2 id="7-the-quadratic-problem"&gt;7. The Quadratic Problem&lt;/h2&gt;
&lt;p&gt;In this chapter, we take a look at the quadratic optimization problem:&lt;/p&gt;
$$
(P) \quad \text{Minimize} \ \ f(x) := x^T Q x + c^T x \ \ \text{on} \ \ M = \{x \in \mathbb{R}^n : x \geq 0, A x = b\}
$$&lt;p&gt;Where \(Q\) is any quadratic matrix.&lt;/p&gt;
&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details open&gt;
 &lt;summary&gt;Interlude&lt;/summary&gt;
 
 &lt;p&gt;a) Because \(x^T Q x = x^T Q^T x\), we have:&lt;/p&gt;
$$
f(x) = x^T Q x + c^T x = \frac{1}{2} x^T (Q + Q^T) x + c^T x = x^T Q_{\text{Sym}} x + c^T x
$$&lt;p&gt;with \(Q_{\text{Sym}} = \frac{1}{2} (Q + Q^T)\), which is symmetric. This means we can transform any quadratic matrix into a symmetric matrix.&lt;/p&gt;
&lt;p&gt;b) If \(Q\) is symmetric and positive definite, then the objective function is convex.&lt;/p&gt;

 
&lt;/details&gt;


&lt;h3 id="71-existence-lemma-and-kuhn-tucker"&gt;7.1 Existence Lemma and Kuhn-Tucker&lt;/h3&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Lemma&lt;/strong&gt;&lt;br&gt;
Let (P) be feasible and \(\inf(P) &gt; - \infty\). Then (P) has a solution.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;The lemma from Kuhn-Tucker for quadratic problems is part of the strong duality lemma for linear and convex problems and is also called the &lt;strong&gt;Lagrange multiplier lemma&lt;/strong&gt;.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Lemma&lt;/strong&gt; (Lagrange Multiplier)&lt;br&gt;
Let \(x^* \in M\) be a solution of the linear problem:&lt;/p&gt;
$$
(LP) \quad \text{Minimize} \ \ c^T x \ \ \text{on} \ \ M = \{x \in \mathbb{R}^n : A x = b, x \geq 0\}
$$&lt;p&gt;Then there exists a &lt;strong&gt;Lagrange multiplier&lt;/strong&gt;, i.e., \(y^* \in \mathbb{R}^m\) such that \(c + A^T y^* \geq 0\) and with the equality \((c + A^T y^*)^T x^* = 0\).&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;For convex problems, we have learned about the Slater condition that needs to be fulfilled for the problem to have a solution. For quadratic problems, we have easier conditions:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Lemma&lt;/strong&gt; (Kuhn-Tucker)&lt;br&gt;
Let (LP) be the given quadratic optimization problem.&lt;/p&gt;
&lt;p&gt;a) Let \(x^*\) be a solution of (P). Then there exists \(y^* \in \mathbb{R}^m\) such that:&lt;br&gt;
(i) \(2 Q x^* + c + A^T y^* \geq 0\) and&lt;br&gt;
(ii) \((2 Q x^* + c + A^T y^*)^T x^* = 0\).&lt;/p&gt;
&lt;p&gt;b) Let \(Q\) be symmetric and positive definite, \(x^* \in M\), and there exists \(y^* \in \mathbb{R}^m\) with (i) and (ii). Then \(x^*\) is a solution of (LP).&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;This lemma can also be formulated for the following canonical form:&lt;/p&gt;
$$
(LP2) \quad \text{Minimize} \ \ c^T x \ \ \text{on} \ \ M = \{x \in \mathbb{R}^n : A x \leq b\}
$$&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Lemma&lt;/strong&gt; (Kuhn-Tucker)&lt;br&gt;
Let (LP2) be the given quadratic optimization problem.&lt;/p&gt;
&lt;p&gt;a) Let \(x^*\) be a solution of (P). Then there exists \(y^* \in \mathbb{R}^m\) such that:&lt;br&gt;
(i) \(2 Q x^* + c + A^T y^* = 0\) and&lt;br&gt;
(ii) \((2 Q x^* + c + A^T y^*)^T x^* = 0\).&lt;/p&gt;
&lt;p&gt;b) Let \(Q\) be symmetric and positive definite, \(x^* \in M\), and there exists \(y^* \in \mathbb{R}^m\) with \(y^* \geq 0\), (i), and (ii). Then \(x^*\) is a solution of (LP2).&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h3 id="72-set-of-problems-and-solutions"&gt;7.2 Set of Problems and Solutions&lt;/h3&gt;
&lt;h4 id="721-duality-and-quadratic-problems"&gt;7.2.1 Duality and Quadratic Problems&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Task:&lt;/strong&gt; Given a symmetric, positive definite matrix \(Q\), a matrix \(A\), and a vector \(c\), consider the following two quadratic optimization problems:&lt;/p&gt;
$$
\begin{aligned}
(P1) \quad \min \ \ \frac{1}{2} x^T Q x + c^T x \ \ \text{on} \ \ M = \{A x \leq b\} \\
(P2) \quad \min \ \ \frac{1}{2} y^T A Q^{-1} A^T y + (b + A Q^{-1} c)^T y \ \ \text{on} \ \ M^* = \{y \geq 0\}
\end{aligned}
$$&lt;p&gt;Show that:&lt;br&gt;
a) (P1) is unambiguously solvable by an \(x^* \in M\), if \(M\) is not empty.&lt;br&gt;
b) The problem (P2) is equivalent to the dual problem of (P1).&lt;/p&gt;
&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution a)&lt;/summary&gt;
 
 &lt;p&gt;We define \(f(x) = \frac{1}{2} x^T Q x + c^T x\).&lt;/p&gt;
&lt;p&gt;The matrix \(Q\) is symmetric and positive definite, thus the second derivative \(D^2 f(x) = Q\), and the function is strictly convex.&lt;/p&gt;
&lt;p&gt;If the conditions are fulfilled:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;\(M\) is not empty,&lt;/li&gt;
&lt;li&gt;\(M\) is closed,&lt;/li&gt;
&lt;li&gt;\(f\) is strictly convex,&lt;/li&gt;
&lt;li&gt;\(M\) is convex (since \(A x \leq b\) is the intersection of half-spaces, which is convex),&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;then (P1) is solvable using the lemma in section 6.2.&lt;/p&gt;

 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution b)&lt;/summary&gt;
 
 &lt;p&gt;To show that (P2) is equivalent to the dual problem of (P1), we investigate the dual problem of (P1).&lt;/p&gt;
&lt;p&gt;Let \(g(x) := A x - b\), so that:&lt;/p&gt;
$$
M = \{x \in \mathbb{R}^n : g(x) \leq 0\}
$$&lt;p&gt;where \(g\) is a convex function. The dual problem has the form:&lt;/p&gt;
$$
(D1) \quad \max \ F(u) \ \ \text{on} \ \ N = \{u \in \mathbb{R}^m : u \geq 0, \ F(u) &gt; -\infty\}
$$&lt;p&gt;with:&lt;/p&gt;
$$
F(u) = \inf \left( \frac{1}{2} x^T Q x + c^T x + u^T (A x - b) \right)
$$&lt;p&gt;We consider the necessary condition:&lt;/p&gt;
$$
\nabla_x L(x, u) = Q x + c + A^T u = 0
$$&lt;p&gt;From which we get \(x = -Q^{-1}(c + A^T u)\), and since \(D^2 f(x) = Q\) is symmetric and positive definite, we have a local minimum (which is also a global minimum, since the Lagrange function is convex).&lt;/p&gt;
&lt;p&gt;Substituting this into our function:&lt;/p&gt;
$$
\begin{aligned}
F(u) &amp;= L(-Q^{-1}(c + A^T u)) \\
&amp;= \frac{1}{2} (c + A^T u)^T Q^{-T} Q Q^{-1} (c + A^T u) - c^T Q^{-1} (c + A^T u) - u^T A Q^{-1} (c + A^T u) - u^T b \\
&amp;= \frac{1}{2} (c + A^T u) Q^{-1} (c + A^T u) - (c + A^T u)^T Q^{-1} (c + A^T u) - u^T b \\
&amp;= - \frac{1}{2} (c + A^T u)^T Q^{-1} (c + A^T u) - u^T b \\
&amp;= -\frac{1}{2} u^T A Q^{-1} A^T u - u^T A Q^{-1} c - \frac{1}{2} c^T Q^{-1} c - u^T b \\
&amp;= -\frac{1}{2} u^T A Q^{-1} A^T u - u^T (b + A Q^{-1} c) - \frac{1}{2} c^T Q^{-1} c
\end{aligned}
$$&lt;p&gt;Thus, the dual problem is:&lt;/p&gt;
$$
\max \ \ -\frac{1}{2} u^T A Q^{-1} A^T u - u^T (b + A Q^{-1} c) - \frac{1}{2} c^T Q^{-1} c
$$&lt;p&gt;This can be transformed into:&lt;/p&gt;
$$
\min \ \ \frac{1}{2} u^T A Q^{-1} A^T u + u^T (b + A Q^{-1} c) - \left( - \frac{1}{2} c^T Q^{-1} c \right)
$$&lt;p&gt;Which is the same as (P2) if we set \(y = u\).&lt;/p&gt;

 
&lt;/details&gt;


&lt;h2 id="8-differentiable-problems"&gt;8. Differentiable Problems&lt;/h2&gt;
&lt;p&gt;In this final section, we want to consider one last class of optimization problems, &amp;ldquo;differentiable problems.&amp;rdquo; They have the form:&lt;/p&gt;
$$
(P) \quad \min f(x), \ \ x \in M = \{x \in \mathbb{R}^n : g(x) \leq 0, h(x) = 0\}
$$&lt;p&gt;with&lt;/p&gt;
$$
\begin{aligned}
f: \mathbb{R}^n \to \mathbb{R} \\
g: \mathbb{R}^n \to \mathbb{R}^p \\
h: \mathbb{R}^n \to \mathbb{R}^m \\
\end{aligned}
$$&lt;p&gt;all &lt;em&gt;continuously differentiable&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;This class of optimization problems also has a &lt;em&gt;Lagrange multiplier rule&lt;/em&gt;, just like the other classes. To use this, we need three steps for a local solution \(x^* \in M\):&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;We linearize (P) around \(x^*\), resulting in a &lt;em&gt;linear optimization problem (LP)&lt;/em&gt;, as seen in the first few chapters.&lt;/li&gt;
&lt;li&gt;We show that 0 is a solution to the (LP).&lt;/li&gt;
&lt;li&gt;We use the &lt;em&gt;Kuhn-Tucker&lt;/em&gt; lemma on the solution 0.&lt;/li&gt;
&lt;/ol&gt;
&lt;h3 id="81-lemma-of-lyusternik"&gt;8.1 Lemma of Lyusternik&lt;/h3&gt;
&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details open&gt;
 &lt;summary&gt;Review: Differentiable&lt;/summary&gt;
 
 &lt;p&gt;We remember that \(g: \mathbb{R}^n \to \mathbb{R}^p\) is differentiable at \(x \in \mathbb{R}^n\) if a matrix \(g'(x) \in \mathbb{R}^{p \times n}\) exists such that&lt;/p&gt;
$$
\lim_{h \to 0} \frac{|g(x+h)-g(x)-g'(x)h|}{|h|} = 0
$$&lt;p&gt;We write this as&lt;/p&gt;
$$
g(x + h) = g(x) + g'(x)h + o(|h|), \quad h \to 0
$$&lt;p&gt;Such a representation also exists for matrices; we call them &lt;strong&gt;functional matrices&lt;/strong&gt;, and they consist of the partial derivatives, for example:&lt;/p&gt;
$$
g'(x) = \left( \frac{\partial g_i(x)}{\partial x_j} \right)
$$
 
&lt;/details&gt;


&lt;p&gt;We can now linearize our problem (P) around our solution \(x^*\). For this, we replace \(f(x)\) with \(f(x^*) + f'(x^*)z\), and so on. We get:&lt;/p&gt;
$$
\min f'(x^*)z, \ \ z \in \mathbb{R}^n, \quad g(x^*) + g'(x^*)z \leq 0, \ \ h'(x^*)z = 0
$$&lt;p&gt;To show that 0 is a solution of the (LP), if \(x^*\) is a solution of (P), we need one more lemma.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Theorem (Implicit Functions)&lt;/strong&gt;&lt;br&gt;
Let \( H: \mathbb{R}^m \times \mathbb{R} \to \mathbb{R} \) be continuously differentiable. Suppose \( (y', t') \in \mathbb{R}^m \times \mathbb{R} \) with \( H(y', t') = 0 \) and \( \frac{\partial H}{\partial y}(y', t') \in \mathbb{R}^{m \times m} \) is regular (invertible).&lt;/p&gt;
\[
\begin{aligned}
\implies \exists \, \delta &gt; 0 , \gamma: (t' - \delta, t' + \delta) \to \mathbb{R}^m \text{ such that } \\
\gamma(t') = y' \text{ and } H(\gamma(t), t) = 0 \text{ for all } |t - t'| &lt; \delta.
\end{aligned}
\]&lt;p&gt;
with \(\gamma\) being continuously differentiable.&lt;/p&gt;
&lt;p&gt;The derivative of \( \gamma \) at \( t' \) is obtained using the chain rule:&lt;/p&gt;
\[
0 = \frac{\partial H}{\partial y}(y', t') \gamma'(t') + \frac{\partial H}{\partial t}(y', t')
\]&lt;p&gt;
&lt;/p&gt;
\[
\implies \gamma'(t') = - \left( \frac{\partial H}{\partial y}(y', t') \right)^{-1} \frac{\partial H}{\partial t}(y', t')
\]&lt;/blockquote&gt;
&lt;p&gt;This can be used to prove the following theorem.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Theorem (Lyusternik)&lt;/strong&gt;&lt;br&gt;
Let \( h: \mathbb{R}^n \to \mathbb{R}^m \) be continuously differentiable with \( h(x^*) = 0 \).&lt;br&gt;
Further, let \( h'(x^*) \in \mathbb{R}^{m \times n} \) have rank \( m \) (i.e., \( m \leq n \)).&lt;br&gt;
Suppose also that \( z \in \mathbb{R}^n \) satisfies \( h'(x^*)z = 0 \).&lt;/p&gt;
&lt;p&gt;Then, there exists \( \delta &gt; 0 \) and a continuously differentiable function \( r: (-\delta, \delta) \to \mathbb{R}^n \) such that \( r(0) = 0 \), \( r'(0) = \lim_{t \to 0} \frac{r(t)}{t} \), and \( h(x^* + tz + r(t)) = 0 \) for all \( t \in (-\delta, \delta) \).&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h3 id="82-lagrange-multiplication-rule"&gt;8.2 Lagrange Multiplication Rule&lt;/h3&gt;
&lt;p&gt;We define the Lagrange function for our problem (P):&lt;/p&gt;
$$
L : \mathbb{R}^n \times \mathbb{R}^p \times \mathbb{R}^m \to \mathbb{R}, \ \ 
L(x, u, v) = f(x) + u^Tg(x) + v^T h(x)
$$&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Definition&lt;/strong&gt;&lt;br&gt;
Let \((P)\) be given.&lt;/p&gt;
&lt;p&gt;i) The conditions \( \Delta L(x,u,v) = 0, \ h(x) = 0, \ g(x) \leq 0, \ u \geq 0, \ u^T g(x) = 0 \) are called &lt;strong&gt;Karush-Kuhn-Tucker (KKT) conditions&lt;/strong&gt;, where \( \Delta L(x,u,v) = \Delta f(x) + u^T g'(x) + v^T h'(x) \).&lt;/p&gt;
&lt;p&gt;ii) Any triplet \( (x^*, u^*, v^*) \) that satisfies the KKT conditions is called a KKT point of \((P)\). The components \( (u^*, v^*) \) are called the Lagrange multipliers.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;The Slater condition we had for convex problems is replaced here by the &lt;strong&gt;constraint qualification (CQ1)&lt;/strong&gt; condition at \( x \in \mathbb{R}^n \).&lt;/p&gt;
&lt;p&gt;i) The rank of \( h'(x) = m &lt; n \).&lt;/p&gt;
&lt;p&gt;ii) There exists \( z' \in \mathbb{R}^n \) such that \( g(x) + g'(x) z' &lt; 0 \), and \( h'(x) z' = 0 \).&lt;/p&gt;
&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details open&gt;
 &lt;summary&gt;Remarks&lt;/summary&gt;
 
 &lt;p&gt;For feasible \( x \in M \), condition ii) can be replaced by:&lt;br&gt;
ii) There exists \( z' \in \mathbb{R}^n \) such that \( g_i'(x) z' &lt; 0 \) for \( i \in I(x) \) (active indices), and \( h'(x) z' = 0 \).&lt;/p&gt;
&lt;p&gt;CQ1 is also called the &lt;strong&gt;Mangasarian-Fromovitz CQ&lt;/strong&gt;.&lt;/p&gt;

 
&lt;/details&gt;


&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Theorem (Lagrange Rule)&lt;/strong&gt;&lt;br&gt;
Let \( K \subset \mathbb{R}^n \) be open, and let \( f: K \to \mathbb{R} \), \( g: K \to \mathbb{R}^p \), \( h: K \to \mathbb{R}^m \) be continuously differentiable.&lt;br&gt;
Suppose \( x^* \) is a local minimum of \( f \) on the set&lt;/p&gt;
\[
M = \{ x \in K : g(x) \leq 0, h(x) = 0 \}.
\]&lt;p&gt;If (CQ1) holds at \( x^* \), then there exist \( u^* \in \mathbb{R}^p \) and \( v^* \in \mathbb{R}^m \) such that \( (x^*, u^*, v^*) \) is a KKT point of \((P)\).&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;With this, we know that our KKT points are possible solutions for our optimization problem.&lt;/p&gt;
&lt;h3 id="83-necessary-and-sufficient-conditions"&gt;8.3 Necessary and Sufficient Conditions&lt;/h3&gt;
&lt;p&gt;In this section, we want to look at additional conditions that can be used to determine whether a problem is solvable and to solve it.&lt;/p&gt;
&lt;p&gt;We consider the same problem as in the last section:&lt;/p&gt;
\[
\min f(x), \quad x \in M = \{ y \in \mathbb{R}^n : g(y) \leq 0, h(y) = 0 \}.
\]&lt;p&gt;
Let \( x \in M \), and let \( I(x) = \{ i \in \{ 1, \dots, p \} : g_i(x) = 0 \} \) denote the active indices.&lt;/p&gt;
&lt;p&gt;The vectors:
&lt;/p&gt;
\[
\{ g_i'(x) : i \in I(x) \} \cup \{ h_j'(x) : j \in \{ 1, \dots, m \} \}
\]&lt;p&gt;
are linearly independent.&lt;/p&gt;
&lt;p&gt;Thus, if \( I = T(x^*) = \{ i_1, \dots, i_q \} \) with \( 1 \leq i_1 \leq \dots \leq i_q \) and \( g_I(x) = (g_{i_j}(x)) \), then &lt;strong&gt;(CQ2)&lt;/strong&gt; means exactly that:&lt;/p&gt;
\[
\text{Rank} \left( \begin{pmatrix} g'_I \\ h'(x^*) \end{pmatrix} \right) = q + m
\]&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Lemma&lt;/strong&gt;&lt;br&gt;
If (CQ2) is optimal, then (CQ1) also holds. So, \( \text{CQ2} \implies \text{CQ1} \).&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Theorem&lt;/strong&gt;&lt;br&gt;
Let \( x^* \) be a local minimum of \( f \) on \( M \) and suppose (CQ2) holds. Additionally, let \( f \), \( g \), and \( h \) be twice continuously differentiable at \( x^* \). Then there exist \( u^*, v^* \) with \( u^* \geq 0 \) such that:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;a) \( L(x^*, u^*, v^*) = 0 \), i.e., we have a KKT tuple.&lt;/li&gt;
&lt;li&gt;b) \( u_i^* g_i(x^*) = 0 \).&lt;/li&gt;
&lt;li&gt;c) Define the subspace&lt;/li&gt;
&lt;/ul&gt;
\[
V = \{ z \in \mathbb{R}^n : h'(z) = 0, g_i(x^*)^T z = 0 \}.
\]&lt;p&gt;Then&lt;/p&gt;
\[
z^T L z \geq 0 
\]&lt;p&gt;which means it is positive semi-definite on \( V \).&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Theorem&lt;/strong&gt;&lt;br&gt;
Let \( (x^*, u^*, v^*) \) be a KKT point of \( (P) \), and let \( I^* = I(x^*, u^*) = \{ i \in I(x^*) : u_i^* &gt; 0 \} \) denote the strongly active indices. Assume that \( f \), \( g \), and \( h \) are \( z \)-times continuously differentiable.&lt;br&gt;
Furthermore, suppose that \( L(x^*, u^*, v^*) \) is positive definite on the cone:&lt;/p&gt;
\[
K = \{ z \in \mathbb{R}^n : h'(x^*) z = 0, g'(x^*) z = 0, g_i'(x^*) z &lt; 0, i \in I \setminus I^+ \}.
\]&lt;p&gt;Then&lt;/p&gt;
\[
z^T L(x^*, u^*, v^*) z &gt; 0 \quad \forall z \in K
\]&lt;p&gt;This implies that \( x^* \) is a strict local minimum.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h3 id="84-further-optimality-criteria"&gt;8.4 Further Optimality Criteria&lt;/h3&gt;
&lt;p&gt;In this section, we discuss a constraint qualification that is weaker than \((CQ1)\).&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Definition&lt;/strong&gt;&lt;br&gt;
Let \( \emptyset \neq X \subset \mathbb{R}^n \). A vector \( d \in \mathbb{R}^n \) is called &lt;strong&gt;tangential&lt;/strong&gt; to \( X \) at a point \( x \in X \) if there exists a sequence \( \{x^k\} \subset X \) and \( \{t_k\} \subset (0, \infty) \) such that&lt;/p&gt;
\[
x^k \to x, \quad t_k \to 0, \quad \frac{x^k - x}{t_k} \to d.
\]&lt;p&gt;The set of all such directions is called the &lt;strong&gt;tangent cone&lt;/strong&gt; of \( X \) at \( x \in X \), denoted \( T_X(x) \).&lt;/p&gt;
&lt;/blockquote&gt;
&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details open&gt;
 &lt;summary&gt;Example&lt;/summary&gt;
 
 If the set \( X \) is a rectangle and the point \( x \) lies somewhere in the middle, then \( T_x(X) = \mathbb{R}^2 \). If the point \( y \) is at the upper-right corner, then \( T_y(X) = \{d \in \mathbb{R}^2 : d_1 \leq 0, d_2 \leq 0 \} \)
 
&lt;/details&gt;


&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Lemma&lt;/strong&gt;&lt;br&gt;
Let \( \emptyset \neq X \subset \mathbb{R}^n \), and let \( x \in X \). Then \( T_x(X) \) is closed.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Lemma&lt;/strong&gt;&lt;br&gt;
Let \( \emptyset \neq X \subset \mathbb{R}^n \), \( f: \mathbb{R}^n \to \mathbb{R} \) be continuously differentiable, and let \( x^* \in X \) be a local minimum of \( f \) over \( X \). Then the following holds:&lt;/p&gt;
\[
f'(x^*) d \geq 0 \quad \forall d \in T_X(x^*)
\]&lt;/blockquote&gt;
&lt;p&gt;The critical or stationary points of a constrained optimization problem are therefore all \( x^* \in X \) such that&lt;/p&gt;
\[
\Delta f(x^*) d \geq 0 \quad \forall d \in T_X(x^*)
\]&lt;p&gt;Only these points are candidate Lagrange multiplier points. For \( T_X(x^*) = \mathbb{R}^n \), we get the usual condition \( \Delta f(x^*) = 0 \).&lt;/p&gt;
&lt;p&gt;We now consider the following problem:&lt;/p&gt;
\[
\min f(x), \quad x \in M = \{ z \in \mathbb{R}^n : g(z) \leq 0, h(z) = 0 \}
\]&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Definition&lt;/strong&gt;&lt;br&gt;
Let \( x \in M \). The &lt;strong&gt;linearized tangent cone&lt;/strong&gt; of \( M \) at \( x \) is defined as&lt;/p&gt;
\[
T_{\text{lin}}(x) = \{ d \in \mathbb{R}^n : g_i'(x) d \leq 0, \, i \in I(x), \, h'(x) d = 0 \},
\]&lt;p&gt;where \( I(x) \) is the set of active indices.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Lemma&lt;/strong&gt;&lt;br&gt;
Let \( x \in M \). Then \( T_M(x) \subset T_{\text{lin}}(x) \).&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;If&lt;/p&gt;
\[
T_M(x) = T_{\text{lin}}(x),
\]&lt;p&gt;we refer to this as &lt;strong&gt;ACQ&lt;/strong&gt; (Active Constraint Qualification).&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Theorem (Multiplier Rule under ACQ)&lt;/strong&gt;&lt;br&gt;
Let \( f \), \( g \), and \( h \) be differentiable, and let \( x^* \) be a local minimum of \( f \) in \( M \). Suppose (ACQ) holds at \( x^* \).&lt;br&gt;
Then there exists a KKT point \( (x^*, u^*, v^*) \).&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;As an application of the previous theorem, consider the linear restricted optimization problem (LRP):&lt;/p&gt;
\[
\min f(x), \quad x \in M = \{ \phi \in \mathbb{R}^n : B \phi \leq c, \, A \phi = b \},
\]&lt;p&gt;where \( f \) is continuously differentiable.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Theorem&lt;/strong&gt;&lt;br&gt;
Under the above assumption, if \( x^* \in M \) is a local minimum of LRP, then there exists a KKT point \( (x^*, u^*, v^*) \) for LRP, i.e.,&lt;/p&gt;
\[
\Delta f(x^*) + (u^*)^T B + (v^*)^T A = 0, \quad u^* \geq 0, \quad B x^* \leq c, \quad A x^* = b, \quad (u^*)^T (B x^* - c) = 0.
\]&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Theorem&lt;/strong&gt;&lt;br&gt;
It holds that&lt;/p&gt;
\[
\text{CQ1} \implies \text{ACQ}.
\]&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;Quadratic Problems with Linear Constraints&lt;/strong&gt;&lt;/p&gt;
\[
\min f(x) = x^T Q x + c^T x, \quad x \in M = \{ \phi \in \mathbb{R}^n : \phi \geq 0, \, A x = b \} \quad (QP),
\]&lt;p&gt;with \( Q = Q^T \), \( b \in \mathbb{R}^m \).&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Theorem&lt;/strong&gt;&lt;br&gt;
If (QP) is feasible and \( \inf (QP) &gt; -\infty \), then (QP) has a local minimum solution.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Theorem (Multiplier Rule)&lt;/strong&gt;&lt;br&gt;
a) Let \( x^* \in M \) for (QP) \( \implies \) there exist \( u^*, v^* \) such that&lt;/p&gt;
\[
2Qx^* + u^* + A^T v^* = 0.
\]&lt;p&gt;b) Let \( Q \) be positive semi-definite, and \( x' \in M \) with \( \exists u', v' \) such that&lt;/p&gt;
\[
2Qx' - u' + A^T v' = 0, \quad u'^T x' = 0,
\]&lt;p&gt;then \( x' \) is a local minimum solution of (QP).&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;This is a very important theorem, which helps us in solving differentiable optimization problems.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Theorem (necessary second-order optimality conditions)&lt;/strong&gt;&lt;br&gt;
Let \( x^* \) be a local minimum of \( f \) on \( M \), and let (CQ2) hold. Furthermore, assume that \( f, g \), and \( h \) are twice continuously differentiable at \( x^* \). Then there exist \( u^* \in \mathbb{R}^p \), \( v^* \in \mathbb{R}^m \), with \( u^* \geq 0 \), such that:&lt;/p&gt;
&lt;p&gt;(a)&lt;/p&gt;
\[
\nabla_x L(x^*, u^*, v^*) = 0
\]&lt;p&gt;where the Lagrangian function is defined as&lt;/p&gt;
\[
L(x, u, v) = f(x) + u^\top g(x) + v^\top h(x), \quad x \in \mathbb{R}^n, \, u \in \mathbb{R}^p, \, v \in \mathbb{R}^m.
\]&lt;p&gt;(b)&lt;/p&gt;
\[
u_i^* g_i(x^*) = 0 \quad \text{for all } i = 1, \dots, p.
\]&lt;p&gt;(c) Define the subspace&lt;/p&gt;
\[
V = \left\{ z \in \mathbb{R}^n : h(x^*)^\top z = 0, \, \nabla g_i(x^*)^\top z = 0 \text{ for all } i \in I(x^*) \right\}.
\]&lt;p&gt;Then it holds that&lt;/p&gt;
\[
z^\top \nabla_x^2 L(x^*, u^*, v^*) z \geq 0 \quad \text{for all } z \in V,
\]&lt;p&gt;i.e.,&lt;/p&gt;
\[
\nabla_x^2 L(x^*, u^*, v^*)
\]&lt;p&gt;is positive semidefinite on \( V \).&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Theorem (Second-Order Sufficient Optimality Condition)&lt;/strong&gt;&lt;br&gt;
Let \((x^*, u^*, v^*) \in \mathbb{R}^n \times \mathbb{R}^p \times \mathbb{R}^m\) be a Kuhn-Tucker point, meaning that \(x^* \in M\), \(u^* \geq 0\), and \(u_i^* g_i(x^*) = 0\) for all \(i = 1, \dots, p\), as well as&lt;/p&gt;
\[
\nabla_x L(x^*, u^*, v^*) = 0.
\]&lt;p&gt;Assume that the functions \( f \), \( g \), and \( h \) are twice continuously differentiable at \( x^* \). Furthermore, suppose the Hessian \( \nabla_x^2 L(x^*, u^*, v^*) \) is strictly positive definite on the cone&lt;/p&gt;
\[
K = \{ z \in \mathbb{R}^n : h'(x^*) z = 0, \, \nabla g_i(x^*)^T z = 0 \text{ for } i \in I^+, \, \nabla g_i(x^*)^T z \leq 0 \text{ for } i \in I(x^*) \setminus I^+ \}
\]&lt;p&gt;which means:&lt;/p&gt;
\[
z^T \nabla_x^2 L(x^*, u^*, v^*) z &gt; 0 \quad \text{for all } z \in K, \, z \neq 0.
\]&lt;p&gt;Then \( x^* \) is a strict local minimum of \( f \) on \( M \).&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h3 id="85-set-of-problems-and-solutions"&gt;8.5 Set of Problems and Solutions&lt;/h3&gt;
&lt;h4 id="851-cq1mangasarian-fromowitz-condition"&gt;8.5.1 CQ1/Mangasarian-Fromowitz-Condition&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Task:&lt;/strong&gt; Use the Lagrange multiplication rule on the set&lt;/p&gt;
$$
M = \{(x,y) \in R^2 \ : \ y^2 = (x+1)(x-1)^2\}
$$&lt;p&gt;to get all points with the minimum distance to the origin.&lt;/p&gt;
&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution&lt;/summary&gt;
 
 &lt;p&gt;The function \(f(x,y) = x^2 + y^2\) and \(g(x,y) = y^2 -(x+1)(x-1)^2\) are differentiable. Thus, we can write the problem as a differentiable problem:&lt;/p&gt;
$$
(P) \quad \min \ \ f(x,y) \ \ \text{on} \ \ M = \{(x,y) \in R^2 \ : \ g(x,y) = 0\}
$$&lt;p&gt;A sketch of \(M\):&lt;/p&gt;
&lt;figure&gt;
 &lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width: 60%" src="https://monkemanx.github.io/attachments/sketch_constraint_set_task.jpg"&gt;
&lt;/figure&gt;
&lt;p&gt;The Lagrange function is given by:&lt;/p&gt;
$$
L(x, y, v) = f(x, y) + vg(x,y) = x^2 + y^2 + vy^2 - v(x+1)(x-1)^2
$$&lt;p&gt;The CQ1 condition is then fulfilled when \(Rg(g'(x,y))\) is maximal.&lt;br&gt;
If we derive \(g\), we obtain a \(1 \times 2\) matrix, meaning the minimum row/column rank is 1, and thus \(\max Rg(g'(x,y)) = 1\).&lt;/p&gt;
&lt;p&gt;Thus, for CQ1 to be fulfilled, \(\nabla g(x,y) \neq 0\), meaning:&lt;/p&gt;
\[
\begin{aligned}
&amp; \frac{\partial g}{\partial y}(x,y) = 2y = 0 \\
&amp; \frac{\partial g}{\partial x}(x,y) = -\left[(x-1)^2 + 2(x+1)(x-1)\right] = -(x-1)(3x+1) = 0
\end{aligned}
\]&lt;p&gt;which is fulfilled for \(x \in \{1, -1/3\}, y=0\). The point \((-1/3, 0)\) is not in \(M\), but the point \((1, 0)\) is in \(M\).&lt;/p&gt;
&lt;p&gt;The Lagrange rule does not provide information about the point \((1,0)\), thus we need to check it separately. We calculate \(f(1,0)=1\). In other words, \((-1/3, 0)\) &lt;strong&gt;is not&lt;/strong&gt; a possible solution (because it is not in \(M\)), but \((1,0)\) &lt;strong&gt;is&lt;/strong&gt; a possible solution.&lt;/p&gt;
&lt;p&gt;If \((x,y) \neq (1,0)\) is a local minimum of \(f\) on \(M\), then there exists a \(v \in R\) such that \(\nabla L(x,y,v) = 0\), according to the Lagrange rule. Furthermore, since \((x,y) \in M\), we have \(g(x,y) = 0\). From this, we can formulate the following equations by differentiating \(L\) with respect to its three variables:&lt;/p&gt;
$$
\begin{aligned}
&amp; 2x - v(x-1)(3x +1) = 0 \\
&amp; 2y(1+v) = 0 \\
&amp; y^2 - (x + 1)(x-1)^2 = 0
\end{aligned}
$$&lt;p&gt;From the second equation, it follows that \(y=0\) or \(v =-1\).&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Case 1:&lt;/strong&gt; \(y=0\): From the third equation, we get \(x \in \{-1, 1\}\). The point \((1,0)\) was already considered above. Furthermore, we get \(f(-1, 0) = 1\).&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Case 2:&lt;/strong&gt; \(y \neq 0, v=-1\): From the first equation, we find that \(0 = 3x^2 -1 \), thus \(x_{1,2} = \pm\sqrt{1/3}\). From the third equation, we get the critical points:&lt;/p&gt;
\[
P_1 = \begin{pmatrix} 
-\sqrt{\frac{1}{3}}, -\left(\sqrt{\frac{1}{3}} + 1\right), \sqrt{1 - \sqrt{\frac{1}{3}}} 
\end{pmatrix}^{\top},
\]\[
P_2 = \begin{pmatrix} 
-\sqrt{\frac{1}{3}}, \sqrt{\frac{1}{3}} + 1, \sqrt{1 - \sqrt{\frac{1}{3}}} 
\end{pmatrix}^{\top},
\]\[
P_3 = \begin{pmatrix} 
\sqrt{\frac{1}{3}}, \sqrt{\frac{1}{3}} - 1, \sqrt{1 + \sqrt{\frac{1}{3}}} 
\end{pmatrix}^{\top},
\]\[
P_4 = \begin{pmatrix} 
\sqrt{\frac{1}{3}}, -\left(\sqrt{\frac{1}{3}} - 1\right), \sqrt{1 + \sqrt{\frac{1}{3}}} 
\end{pmatrix}^{\top}.
\]&lt;p&gt;Thus, we obtain:&lt;/p&gt;
$$
\begin{aligned}
\min(P) &amp;= \min\{f(-1,0), f(P_1), f(P_2), f(P_3), f(P_4), f(1,0)\} \\
&amp;= \min\{1, 1 + \frac{2}{9}\sqrt{3}, 1- \frac{2}{9}\sqrt{3}\} \\
&amp;= 1- \frac{2}{9} \sqrt{3}
\end{aligned}
$$&lt;p&gt;Hence, the points with the smallest distance are \(P_3\) and \(P_4\). Their distance is:&lt;/p&gt;
$$
\sqrt{1- \frac{2}{9} \sqrt{3}}
$$
 
&lt;/details&gt;


&lt;h4 id="852-violated-cq1mangasarian-fromowitz-condition"&gt;8.5.2 Violated CQ1/Mangasarian-Fromowitz Condition&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Task:&lt;/strong&gt; For \(\alpha \in \mathbb{R}\), we have the functions&lt;/p&gt;
$$
f(x) = x_1 + x_2 \sin \alpha , \quad h_1(x) = (x_1 - 1)^2 + x_2^2 - 1 , \quad h_2(x) = (x_1 + 1)^2 + x_2^2 -1 
$$&lt;p&gt;Furthermore, we have the optimization problem&lt;/p&gt;
$$
(P) \quad \min \ f(x) \ \ \text{subject to} \ \ M = \{x \in \mathbb{R}^2 : h(x) = 0\}
$$&lt;p&gt;where \(h(x) = (h_1(x), h_2(x))\).&lt;/p&gt;
&lt;p&gt;a) Draw the level lines for \(h_1, h_2\) and determine the feasible set \(M\), and the solution \(x^*\) for (P).&lt;br&gt;
b) Show that for \(x^*\), CQ1 is not fulfilled.&lt;br&gt;
c) Determine all \(\alpha\) such that a \(v^*\) exists with&lt;/p&gt;
$$
\nabla f(x^*) + \sum v_k^* \nabla h_k(x^*) = 0
$$&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution a)&lt;/summary&gt;
 
 The feasible set contains only one element: \( M = \{(0,0)\} \). Thus, \( x^* = (0, 0) \) is the solution for (P), with \(\min(P)=0\).
 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution b)&lt;/summary&gt;
 
 &lt;p&gt;The following holds:&lt;/p&gt;
\[
\nabla f(x) =
\begin{bmatrix}
1 \\
\sin \alpha
\end{bmatrix}, \quad
\nabla h_1(x) =
\begin{bmatrix}
2x_1 - 2 \\
2x_2 
\end{bmatrix}, \quad
\nabla h_2(x) =
\begin{bmatrix}
2x_1 + 2 \\
2x_2 
\end{bmatrix}
\]&lt;p&gt;By inserting \(x^*\):&lt;/p&gt;
\[
\nabla f(x^*) =
\begin{bmatrix}
1 \\
\sin \alpha
\end{bmatrix}, \quad
\nabla h_1(x^*) =
\begin{bmatrix}
-2 \\
0 
\end{bmatrix}, \quad
\nabla h_2(x^*) =
\begin{bmatrix}
2 \\
0
\end{bmatrix}
\]&lt;p&gt;The vectors \(\nabla h_1(x^*)\) and \(\nabla h_2(x^*)\) are &lt;em&gt;linearly dependent&lt;/em&gt;, thus:&lt;/p&gt;
\[
\text{rank } h(x^*) = 1 \neq 2 = K
\]&lt;p&gt;Hence, CQ1 is not fullfilled.&lt;/p&gt;

 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution c)&lt;/summary&gt;
 
 &lt;p&gt;Since the CQ1 condition is violated, we cannot directly apply the Lagrange multiplier rule.&lt;/p&gt;
&lt;p&gt;We seek a \(v \in \mathbb{R}^2\) such that:&lt;/p&gt;
$$
0 = \nabla_x f(x^*) + v^*{}^T D_x h(x^*) =
\begin{bmatrix}
1 \\
\sin \alpha
\end{bmatrix} + 
v_1 
\begin{bmatrix}
-2 \\
0 
\end{bmatrix} + 
v_2 
\begin{bmatrix}
2 \\
0 
\end{bmatrix}
$$&lt;p&gt;If \(\sin \alpha \neq 0\), then such a \(v\) does not exist.&lt;/p&gt;
&lt;p&gt;Now, let \(\sin \alpha = 0\), meaning \(\alpha = n \pi, \quad n \in \mathbb{N}\). In this case, the equation simplifies to \(-1 = -2v_1 + 2v_2\), which implies \(v = (\phi, \phi - 1/2)\) with \(\phi \in \mathbb{R}\) as a Lagrange multiplier.&lt;/p&gt;

 
&lt;/details&gt;


&lt;h4 id="853-cq2second-order-condition"&gt;8.5.3 CQ2/Second-Order Condition&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Task:&lt;/strong&gt; The function \(f(x) = x_1^2 x_2\) with&lt;/p&gt;
$$
(P) \quad \min \ f(x) \ \ \text{subject to} \ \ M = \{x \in \mathbb{R}^2 \ : \ ||x||^2 - 4 = 0\}
$$&lt;p&gt;is a differentiable optimization problem.&lt;/p&gt;
&lt;p&gt;a) Determine all KKT points of (P).&lt;br&gt;
b) Show, using the necessary second-order optimality condition, that \(f\) has &lt;strong&gt;no&lt;/strong&gt; local minimum at \(x^* = (0,-2)\).&lt;br&gt;
c) Show, using the sufficient second-order optimality condition, that \(f\) has a strict local minimum at \(x^* = (0,2)\).&lt;/p&gt;
&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution: Preliminary&lt;/summary&gt;
 
 &lt;p&gt;We can rewrite the constraint as \(g(x) := x_1^2 + x_2^2 -4 = 0\). Thus, the Lagrangian function is given by:&lt;/p&gt;
$$
L(x_1, x_2, v) = x_1^2x_2 + v(x_1^2 + x_2^2 -4 )
$$
 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution a)&lt;/summary&gt;
 
 &lt;p&gt;The KKT points of (P) are characterized by the conditions \(\nabla_x L(x,v) = 0\) and \(g(x)=0\), which results in the system:&lt;/p&gt;
$$
\begin{aligned}
2x_1 (x_2 + v) &amp;= 0 \\
x_1^2 + 2 v x_2 &amp;= 0 \\
x_1^2 + x_2^2 &amp;= 4
\end{aligned}
$$&lt;p&gt;&lt;strong&gt;Case 1:&lt;/strong&gt; \(x_1 = 0\). Then \(x_2 = \pm 2\), and \(v = 0\).&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Case 2:&lt;/strong&gt; \(x_1 \neq 0\). Then \(x_2 = -v\), and with this:&lt;/p&gt;
$$
x_1^2 - 2v^2 = 0, \quad x_1^2 + v^2 = 4
$$&lt;p&gt;By subtracting the equations, we obtain \(3v^2 = 4 \Rightarrow v = \pm \frac{2}{\sqrt{3}}\).&lt;br&gt;
The associated points are:&lt;/p&gt;
$$
\left( \pm \frac{2\sqrt{2}}{\sqrt{3}}, -\frac{2}{\sqrt{3}} \right), \quad \left( \pm \frac{2\sqrt{2}}{\sqrt{3}}, \frac{2}{\sqrt{3}} \right)
$$&lt;p&gt;Thus, we have 6 KKT points: 4 from the second case and 2 from the first case.&lt;/p&gt;

 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution b)&lt;/summary&gt;
 
 &lt;p&gt;The constraint qualification (CQ2) is satisfied because:&lt;/p&gt;
$$
\nabla g(x) =
\begin{pmatrix}
2x_1 \\
2x_2 
\end{pmatrix}
\neq
\begin{pmatrix}
0 \\
0 
\end{pmatrix}
$$&lt;p&gt;The Hessian matrix of the Lagrangian is:&lt;/p&gt;
$$
\nabla^2_x L(x_1, x_2, v) =
\begin{pmatrix}
2x_2 + 2v &amp; 2x_1 \\
2x_1 &amp; 2v 
\end{pmatrix}
$$&lt;p&gt;If \(f\) had a local minimum at \(x^* = (0, -2)\) with \(v^* = 0\), then the Hessian of the Lagrangian on the subspace&lt;/p&gt;
$$
K = \{z \in \mathbb{R}^2 \ : \ g'(x^*)z = 0\}
$$&lt;p&gt;would need to be positive semidefinite. However:&lt;/p&gt;
$$
z^T \nabla^2 L(0,-2,0)z = z^T
\begin{pmatrix}
-4 &amp; 0 \\
0 &amp; 0 
\end{pmatrix}
z = -4z_1^2 &lt; 0, \quad \forall z \in K
$$&lt;p&gt;Thus, there is &lt;strong&gt;no&lt;/strong&gt; local minimum at the point \(x^* = (0, -2)\).&lt;/p&gt;

 
&lt;/details&gt;


&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution c)&lt;/summary&gt;
 
 &lt;p&gt;Since we only have equality constraints and no inequalities in the set \(M\), we can again examine the cone \(K\) from part (b).&lt;/p&gt;
$$
z^T \nabla^2 L(0,2,0)z = z^T
\begin{pmatrix}
4 &amp; 0 \\
0 &amp; 0 
\end{pmatrix}
z = 4z_1^2 &gt; 0, \quad \forall z \in K
$$&lt;p&gt;Thus, \(f\) has a &lt;strong&gt;strict local minimum&lt;/strong&gt; at the point \(x^* = (0, 2)\).&lt;/p&gt;

 
&lt;/details&gt;


&lt;h4 id="854-minimal-distance-to-a-point-and-a-parabola"&gt;8.5.4 Minimal Distance to a Point and a Parabola&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Task:&lt;/strong&gt; Find a point \(x \in \mathbb{R}^2\) on the parabola \(4x_2 = x_1^2\) that has the minimum distance to the point \((2,5)\).&lt;/p&gt;
&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Solution&lt;/summary&gt;
 
 &lt;p&gt;We first need to transform our problem into an optimization problem:&lt;/p&gt;
$$
(P) \quad \min \ ||x-(2,5)||^2 \ \ \text{subject to} \ \ P = \{z \in \mathbb{R}^2 \ : \ 4z_2 = z_1^2\}
$$&lt;p&gt;The Lagrangian function is given by:&lt;/p&gt;
$$
L(x, v) = (x_1 - 2)^2 + (x_2 - 5)^2 + v(x_1^2 - 4 x_2)
$$&lt;p&gt;Now, we determine the KKT points:&lt;/p&gt;
$$
\begin{aligned}
&amp;0 =^! \nabla L(x,v) = 
\begin{pmatrix}
2(x_1 - 2) + 2vx_1 \\
2(x_2 - 5) - 4v
\end{pmatrix} \\
&amp; 0 =^! x_1^2 - 4x_2
\end{aligned}
$$&lt;p&gt;From this, it follows that:&lt;/p&gt;
$$
v = \frac{1}{2} x_2 - \frac{5}{2} = \frac{1}{8} x_1^2 - \frac{5}{2}
$$&lt;p&gt;Substituting into the first equation:&lt;/p&gt;
$$
0 = x_1 - 2 + vx_1 = x_1 - 2 + \frac{1}{8}x_1^3 - \frac{5}{2} x_1
$$&lt;p&gt;This simplifies to:&lt;/p&gt;
$$
0 = x_1^3 - 12 x_1 - 16 = (x_1 + 2)^2 (x_1 - 4)
$$&lt;p&gt;Thus, the solutions are \(x_1 = -2\) or \(x_1 = 4\), leading to the KKT points:&lt;/p&gt;
$$
(-2, 1, -2), \quad (4, 4, -1/2)
$$&lt;p&gt;We can now compare their distances:&lt;/p&gt;
$$
||(-2,1) - (2,5)||^2 = 32 &gt; 5 = ||(4,4)-(2,5)||^2
$$&lt;p&gt;Hence, the point of interest is \((4,4, -1/2)\), for which CQ2 is trivially satisfied.&lt;/p&gt;
&lt;p&gt;We now use the &lt;em&gt;sufficient second-order optimality condition&lt;/em&gt;:&lt;/p&gt;
$$
\nabla^2 L(x^*, v^*) = 
\begin{pmatrix}
2 + 2v &amp; 0 \\
0 &amp; 2
\end{pmatrix} = 
\begin{pmatrix}
1 &amp; 0 \\
0 &amp; 2
\end{pmatrix}
$$&lt;p&gt;Since the matrix is positive definite, the point \((4,4)\) is a local minimum, and therefore, the point we searched for with the minimal distance to \((2,5)\).&lt;/p&gt;

 
&lt;/details&gt;


&lt;h2 id="9-conclusion"&gt;9. Conclusion&lt;/h2&gt;
&lt;p&gt;This article is by no stretch of the imagination complete, highly accurate, or very intuitive and understandable. It is more like hastily written notes from my lecture combined with various external materials.&lt;br&gt;
The most use one can get from this article is to use it as a reference for theorems or to calculate through the &lt;em&gt;problem solution set&lt;/em&gt;, where the solutions should be fairly accurate.&lt;/p&gt;


&lt;figure&gt;
 &lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width: 60%" src="https://monkemanx.github.io/attachments/cat_drunk.jpg"&gt;
&lt;/figure&gt;


&lt;hr&gt;
&lt;p&gt;Ressources:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The Lecture &amp;ldquo;Optimization Theory&amp;rdquo; by Andreas Kirsch&lt;/li&gt;
&lt;li&gt;The Lecture &amp;ldquo;Optimization Theory&amp;rdquo; Martin Frank&lt;/li&gt;
&lt;li&gt;The Book &amp;ldquo;Einführung in die Mathematische Optimierung&amp;rdquo; by Rainer Burkard and Uwe Zimmerman&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.princeton.edu/~aaa/Public/Teaching/ORF523/"&gt;Princeton Optimization theory&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>What is Love?</title><link>https://monkemanx.github.io/articles/symposium/</link><pubDate>Wed, 15 Jan 2025 17:00:00 +0000</pubDate><author>monkeman@cock.li (MonkeMan)</author><guid>https://monkemanx.github.io/articles/symposium/</guid><description>&lt;style&gt;
 .info {
 background-color: #e6f7ff; 
 padding: 15px; 
 border-radius: 5px; 
 margin-bottom: 15px; 
 }

 .info-title {
 font-size: 20px; 
 margin-bottom: 10px; 
 color: #000080; 
 font-weight: bold; 
 }
&lt;/style&gt;

&lt;div class="info"&gt;
 &lt;div class="info-title"&gt;Info&lt;/div&gt;
 &lt;p&gt;Also see: &lt;a href="https://monkemanx.github.io/tangled_thoughts/quotes_tillich05/"&gt;Love and Faith&lt;/a&gt;.&lt;/p&gt;
&lt;/div&gt;

&lt;p&gt;In the book &lt;em&gt;Symposium&lt;/em&gt; by Plato, various people give eulogies on the nature of love. These eulogies roughly follow the structure of:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;What is the origin of love?&lt;/li&gt;
&lt;li&gt;What are the good qualities of love?&lt;/li&gt;
&lt;li&gt;What are the habits and lifestyles of love?&lt;/li&gt;
&lt;li&gt;What is the effect of love?&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;strong&gt;Phaedrus&lt;/strong&gt; gives the first eulogy, in which he argues that love originates as one of the oldest gods. He highlights its benefits, particularly in promoting virtue in human beings, such as inspiring acts of self-sacrifice for a loved one.&lt;/p&gt;
&lt;p&gt;Next is &lt;strong&gt;Pausanias&lt;/strong&gt;, who focuses on male-to-male sexual relationships in Athens at the time. He distinguishes between Common Love, which is purely physical, and Heavenly Love, which is directed at developing virtue and rationality in young men. In exchange for education, these young men gratify their teachers. Pausanias considers Heavenly Love superior because its purpose is to cultivate virtue and intellect.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Eryximachus&lt;/strong&gt; also distinguishes between good and bad love, like his predecessor, but broadens the discussion to encompass all natural processes. For him, just as medicine is about nurturing the good parts of the body and discarding the bad, good love is self-controlled, while bad love is indulgent.&lt;/p&gt;
&lt;p&gt;Besides Socrates’ speech, &lt;strong&gt;Aristophanes&lt;/strong&gt;&amp;rsquo; eulogy is probably the most famous. His speech recounts a myth about the origin of love. He suggests that humans were originally double their current shape, with four arms, four legs, and two faces. There was also a third gender, hermaphrodite, which had both male and female sexual organs. These beings became arrogant and tried to overthrow the gods on Olympus. In response, Zeus cut them in half, creating the humans we are today. This explains the innate human desire for a partner: we are searching for our &amp;ldquo;other half&amp;rdquo; to become whole again. Furthermore, people with heterosexual preferences originated from the hermaphrodite beings, while homosexuals were derived from the original entirely male or female beings.&lt;/p&gt;
&lt;p&gt;The last eulogy is given by &lt;strong&gt;Socrates&lt;/strong&gt;. He argues:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Love is a relationship between oneself and something else, expressing a lack of something. Love itself is not beautiful but is the desire for beauty.&lt;/li&gt;
&lt;li&gt;Love is an expression of a more fundamental desire: to possess something good forever.&lt;/li&gt;
&lt;li&gt;Love satisfies this desire by &amp;ldquo;giving birth in beauty&amp;rdquo; and thus achieving self-immortalization.&lt;/li&gt;
&lt;li&gt;There are two ways to achieve self-immortalization: physical (producing offspring) and intellectual (creating enduring works, such as Homer’s poetry or Einstein’s theories).&lt;/li&gt;
&lt;li&gt;The highest form of love is mental, abstracted from specific individuals to the appreciation of universal forms of beauty.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Socrates contends that since &lt;strong&gt;love&lt;/strong&gt; is relational, it is neither inherently ugly nor beautiful, but rather an expression of the &lt;strong&gt;human desire to attain goodness and happiness&lt;/strong&gt;. For Socrates, goodness and beauty are inseparable: if something is good, it is naturally beautiful. He also believes that to be happy, humans must be good, which for him means to cultivate virtues.&lt;/p&gt;
&lt;p&gt;In rejecting the idea of love as the search for one&amp;rsquo;s other half, Socrates defines love as the general desire for happiness. Love&amp;rsquo;s ultimate purpose is &amp;ldquo;to give birth in beauty, both in body and mind,&amp;rdquo; which brings humans as close as possible to immortality. This immortality can be achieved through sexual reproduction or through immortal fame gained by heroic acts or intellectual contributions, similar to the distinctions between Common and Heavenly Love mentioned earlier.&lt;/p&gt;
&lt;p&gt;Socrates generalizes this desire beyond human relationships and describes it in stages of increasing generality and &amp;ldquo;higher&amp;rdquo; quality:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The first stage involves sexual relationships between humans.&lt;/li&gt;
&lt;li&gt;The next stage is recognizing physical beauty not only in an individual but in all people.&lt;/li&gt;
&lt;li&gt;The subsequent stage values mental beauty over physical beauty, such as the beauty in a mathematical theorem or a philosophical argument.&lt;/li&gt;
&lt;li&gt;In the final stage, one perceives the beauty of beauty itself—what Socrates calls the Platonic Form of Beauty, which is unchanging, uniform, and universal.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;To understand this ultimate form is to comprehend &lt;em&gt;what beauty truly is&lt;/em&gt;. By recognizing this form, one comes into contact with the &amp;ldquo;divine&amp;rdquo; and generates &amp;ldquo;true virtue,&amp;rdquo; which, according to Socrates, leads to happiness (eudaimonia).&lt;/p&gt;</description></item><item><title>Why do Philosophy?</title><link>https://monkemanx.github.io/articles/metaphilosophy/</link><pubDate>Wed, 01 Jan 2025 00:00:00 +0000</pubDate><author>monkeman@cock.li (MonkeMan)</author><guid>https://monkemanx.github.io/articles/metaphilosophy/</guid><description>&lt;p&gt;People often think of philosophers as old men brooding all day over the most nonsensical questions imaginable, such as: &amp;ldquo;Do things outside of my mind exist?&amp;rdquo; or &amp;ldquo;Do we have free will?&amp;rdquo; This stereotype paints them as providing no benefit to society or advancing humanity in any meaningful way, instead wasting resources that could be better spent elsewhere.&lt;/p&gt;
&lt;p&gt;However, this perception is not entirely accurate. Philosophy offers significant benefits both to individuals and society at large. In this short article, I aim to explore these benefits and the role of philosophy. This will be by no means a complete picture, but rather a selection of highlights.&lt;/p&gt;
&lt;h1 id="philosophical-assumptions"&gt;Philosophical Assumptions&lt;/h1&gt;
&lt;p&gt;Whether we realize it or not, much of our contemporary and historical understanding of the world is underpinned by a wide array of philosophical assumptions. These assumptions shape how we view the world, and this influence extends beyond Western thought to encompass cultures globally.&lt;/p&gt;
&lt;p&gt;For example, the focus on individualism in Western societies can be traced back to Aristotle and his view that personal virtue is central to happiness and of paramount importance. This emphasis is not universal, as seen in more collectivist societies in Asia, which draw inspiration from Confucian thought. In these cultures, hierarchical structures and filial piety are central, and roles and duties often take precedence over personal ambition.&lt;/p&gt;
&lt;p&gt;Rationalism, the reliance on logical inquiry as a primary tool for understanding the world, is another example. First articulated by Aristotle and later developed by thinkers like Descartes, rationalism shaped Western thought. Yet, alternative approaches exist, as evidenced by spiritual and self-realization based frameworks prominent in Eastern traditions like Advaita Vedanta and Anekantavada.&lt;/p&gt;
&lt;p&gt;Similarly, the anthropocentric view dominant in Western societies—where humans are considered the most important entities in the universe—stems from Judeo-Christian theology and Enlightenment rationalism. In contrast, many Asian cultures, influenced by Buddhist and Jain teachings, place greater value on all forms of life, emphasizing harmony and equality among creatures.&lt;/p&gt;
&lt;p&gt;These examples illustrate that many of the foundational principles underpinning society are rooted in ancient philosophical assumptions. Our societal structures and worldviews could have been vastly different had, for example, the Buddha&amp;rsquo;s teachings taken hold in ancient Greece instead of Aristotle&amp;rsquo;s. It is therefore crucial to critically examine these underlying assumptions, assess their merits, and scrutinize whether they hold up under critical analysis. By becoming aware of our biases and foundational beliefs, we can engage in more productive conversations and debates.&lt;/p&gt;
&lt;p&gt;As a final example, consider panpsychism as proposed by Philip Goff, which posits that consciousness is a fundamental feature of the universe, akin to electrons and quarks. If this view became deeply entrenched in society, it might radically shift societal priorities. Instead of focusing on resource extraction, technological advancements, and profit-making, humanity might prioritize living in harmony with nature. In this framework, humans are temporary clusters of consciousness, while animals and nature are simply entities with lower concentrations of consciousness &amp;ldquo;particles.&amp;rdquo; Such a perspective could foster greater interest in understanding how these clusters arise and how they might be enhanced.&lt;/p&gt;
&lt;h1 id="philosophy-and-conversations"&gt;Philosophy and Conversations&lt;/h1&gt;
&lt;p&gt;Another significant benefit of philosophy is its ability to enhance conversations. By understanding how formal argumentation works and recognizing logical fallacies, we can avoid these pitfalls and construct sound, valid arguments. Here are some common fallacies to be mindful of:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Continuum Fallacy&lt;/strong&gt;: Rejecting a definition or claim because it is not precise enough.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Is-Ought Fallacy&lt;/strong&gt;: Drawing conclusions about what ought to be solely based on what is. In other words, just because something is a certain way doesn’t mean it should be that way.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Slippery Slope&lt;/strong&gt;: Arguing that a small change will inevitably lead to a significant and undesirable outcome, and therefore, the change should not be allowed.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Appeal to Authority&lt;/strong&gt;: Claiming something is true simply because an authority figure says so.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Beyond avoiding fallacies, understanding the difference between valid and sound arguments can further improve the quality of discussions. A valid argument ensures that if all the premises are true, the conclusion must also be true. A sound argument, on the other hand, is both valid and has true premises. Recognizing these distinctions helps us identify problems in reasoning and refine arguments to make them more robust.&lt;/p&gt;
&lt;p&gt;Philosophy of language also contributes to better conversations. For instance, &lt;strong&gt;&lt;a href="(https://monkemanx.github.io/articles/what_is_knowledge/)"&gt;contextualism&lt;/a&gt;&lt;/strong&gt;—the idea that the standard of evidence required for knowledge varies by situation—helps us understand how language and meaning adapt to different contexts. This understanding ensures more precise and effective communication.&lt;/p&gt;
&lt;h1 id="philosophy-as-a-model"&gt;Philosophy as a Model&lt;/h1&gt;
&lt;p&gt;There are many ways to conceptualize philosophy and its purpose. My favorite approach is to view philosophy as a form of modeling. In mathematics, we build models by starting with axioms, defining various mathematical objects, and then using deduction to prove theorems about those objects.&lt;/p&gt;
&lt;p&gt;However, not all mathematical models are inherently useful. A model’s utility depends on its applicability to the real world, which is determined by empirical data. For example, mathematics can define Erdős–Rényi random graphs and prove properties about them. But only by examining real-world data can we determine whether these graphs accurately model real-world networks.&lt;/p&gt;
&lt;p&gt;Philosophy operates in a way similar to natural science. For instance, when we ask questions like &lt;em&gt;What is morality?&lt;/em&gt;, philosophers develop models to explain it, such as &lt;a href="https://monkemanx.github.io/articles/what_is_morality/"&gt;emotivism, naturalism, or realism&lt;/a&gt;. These models are then tested against our existing beliefs and empirical evidence to assess how well they align with reality. Just as scientific models are imperfect and prone to errors, philosophical models have their own shortcomings. Emotivism, for example, struggles with the &amp;ldquo;Frege-Geach&amp;rdquo; problem, naturalism faces challenges highlighted by the &amp;ldquo;Open Question Argument,&amp;rdquo; and realism has difficulty addressing how morality, as a property of the real world, accounts for its motivational aspect. While none of these models perfectly explain morality or are free from flaws, they serve as tools to approximate the truth, much like models in natural science.&lt;/p&gt;
&lt;p&gt;This perspective is important to me because of my journey into philosophy. When I was 14, I was inspired by the incredible book Sophie&amp;rsquo;s World and developed an interest in philosophy. However, over time, I became disillusioned. Philosophy started to feel frustratingly stagnant—endless open questions debated for thousands of years, with countless proposed answers, none of which ever seemed definitive. It felt as though no progress was being made. But when I started viewing these answers as models—imperfect attempts to approximate the truth from different perspectives; philosophy became much more meaningful. Each model offers a unique lens through which to view the world, helping us understand it, and ourselves.&lt;/p&gt;
&lt;p&gt;In a nutshell,&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&amp;ldquo;If you don&amp;rsquo;t bring into the light the presuppositions of your thinking, especially in moral and political spheres, then this makes you simply a prisoner of whatever the reigning orthodoxy is—it makes you a prisoner of the existing model, of the model of your age, of the model of your day.&amp;rdquo;&lt;/p&gt;
&lt;p&gt;~ Bryan Magee&lt;/p&gt;
&lt;/blockquote&gt;
&lt;hr&gt;
&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Verification Principle&lt;/summary&gt;
 
 &lt;p&gt;A. J. Ayer proposed the &lt;strong&gt;verification principle&lt;/strong&gt;, which asserts that only statements that can be verified—or falsified—are meaningful. Based on this principle, Ayer dismissed large parts of philosophy, such as metaphysics, as meaningless because they cannot be empirically tested.&lt;/p&gt;
&lt;p&gt;While I agree that falsifiability and verification are critical for meaningful theories, I disagree with outright dismissing metaphysics. Even if metaphysical theories cannot be empirically verified (debatable?), they can still provide utility as models for understanding phenomena. Their value lies in offering frameworks to explore and think about questions that empirical science alone cannot fully address.&lt;/p&gt;

 
&lt;/details&gt;


&lt;hr&gt;
&lt;p&gt;Ressources:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://en.wikipedia.org/wiki/Panpsychism"&gt;Panpsychism&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://en.wikipedia.org/wiki/Philip_Goff_(philosopher)#Panpsychism"&gt;Modern Panpsychism&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://en.wikipedia.org/wiki/List_of_fallacies"&gt;More Logical Fallacies&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://rintintin.colorado.edu/~vancecd/phil1440/notes.html"&gt;Course on Logic&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Modern Philosophy: Men of Ideas with Bryan Magee, Episode 1&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>What is knowledge? An Overview of contemporary theories of knowledge</title><link>https://monkemanx.github.io/articles/what_is_knowledge/</link><pubDate>Sat, 28 Dec 2024 00:00:00 +0000</pubDate><author>monkeman@cock.li (MonkeMan)</author><guid>https://monkemanx.github.io/articles/what_is_knowledge/</guid><description>&lt;style&gt;
 .info {
 background-color: #e6f7ff; 
 padding: 15px; 
 border-radius: 5px; 
 margin-bottom: 15px; 
 }

 .info-title {
 font-size: 20px; 
 margin-bottom: 10px; 
 color: #000080; 
 font-weight: bold; 
 }
&lt;/style&gt;

&lt;div class="info"&gt;
 &lt;div class="info-title"&gt;Info&lt;/div&gt;
 &lt;p&gt;This article is basically a summary of the book &lt;em&gt;Knowledge: A Very Short Introduction&lt;/em&gt; by &lt;em&gt;Jennifer Nagel&lt;/em&gt;.&lt;/p&gt;
&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Knowledge is one of the most important concepts we humans possess.&lt;/strong&gt; It has not only allowed us to advance society tremendously through scientific achievements, such as visiting the moon or sequencing the human genome, but it also helps us on a smaller, personal scale in daily life. Whether it’s knowing when a supermarket opens or closes, or understanding how to prepare food, knowledge is essential.&lt;/p&gt;
&lt;p&gt;With the ever-increasing connectivity of our modern world through the internet and social media—platforms that have democratized free speech—nearly everyone can share their opinions and knowledge publicly, spreading their ideas far and wide. In this context, understanding what knowledge truly is becomes even more critical. This is especially true in a time when many people believe we live in a &lt;a href="https://en.wikipedia.org/wiki/Post-truth_politics"&gt;post-truth&lt;/a&gt; era, where the truth of a fact matters less than the emotions it evokes. How can we avoid falling into this trap if we don’t even know what knowledge is in the first place?&lt;/p&gt;
&lt;p&gt;The central question this article seeks to answer is: &lt;em&gt;What is knowledge?&lt;/em&gt; Specifically, what is its essence, and how can we define it in a way that is consistent with both everyday usage and with challenging examples that test our common sense and assumptions?&lt;/p&gt;
&lt;p&gt;The theory of knowledge, or epistemology, encompasses far more than this single question. It also investigates inquiries such as: How does knowledge relate to truth? Do our senses provide the same kind of knowledge as abstract reasoning? Must a claim be justified to be considered knowledge? These related questions will be addressed when relevant to the primary question. However, this article is not an exhaustive account of all positions on knowledge. Rather, it offers an overview of common perspectives and arguments.&lt;/p&gt;


&lt;figure&gt;
 &lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width:50%" src="https://monkemanx.github.io/attachments/1731096649646525.jpg"&gt;
&lt;/figure&gt;


&lt;h1 id="basics-of-knowledge"&gt;Basics of Knowledge&lt;/h1&gt;
&lt;p&gt;The first thing to note is that knowledge is not the same as a fact. There are countless facts in the world, but just because a fact exists doesn’t mean we know it. Nor is it enough to simply record it. For example, imagine a coin inside a shuffled shoebox. It’s a fact whether the coin landed on heads or tails. We might even write on one piece of paper that it landed on tails and on another that it landed on heads. Yet, this doesn’t mean we &lt;em&gt;know&lt;/em&gt; whether the coin landed on heads or tails. To claim knowledge, we need some form of access to the fact.&lt;/p&gt;
&lt;p&gt;Knowledge, unlike tangible goods such as gold or bread, always belongs to someone. However, it doesn’t have to belong to a single individual. For instance, we can say that a band collectively knows how to play a symphony, even though each musician only knows how to play their specific part.&lt;/p&gt;
&lt;p&gt;This leads us to deeper questions: Is there knowledge that extends beyond a group of people? Can non-humans possess knowledge? And what distinguishes belief from knowledge?&lt;/p&gt;
&lt;h1 id="epistemology-of-knowledge"&gt;Epistemology of Knowledge&lt;/h1&gt;
&lt;p&gt;There are three primary methodologies for investigating what knowledge means: &lt;strong&gt;Skepticism&lt;/strong&gt;, &lt;strong&gt;Empiricism&lt;/strong&gt;, and &lt;strong&gt;Rationalism&lt;/strong&gt;.&lt;/p&gt;
&lt;h2 id="skepticism"&gt;Skepticism&lt;/h2&gt;
&lt;p&gt;How do you know that you are currently wearing socks? You might say that you can see them on your feet or feel them against your skin. But isn’t it possible that you are dreaming right now? While you might think this is unlikely, it remains a possibility.&lt;/p&gt;
&lt;p&gt;It doesn’t even have to be an extreme case like dreaming. Our senses can deceive us in ordinary situations. Optical illusions, for example, work precisely because they exploit the unreliability of our sensory data, making us perceive things that aren’t happening in reality.&lt;/p&gt;
&lt;p&gt;This raises a fundamental question: Do we have any reliable way to truly know something?&lt;/p&gt;
&lt;h3 id="academic-skepticism"&gt;Academic Skepticism&lt;/h3&gt;
&lt;p&gt;Academic skeptics argue that it is impossible to know anything with certainty because there are always scenarios—like dreaming or hallucinating—that we cannot rule out. Historically, this school of thought developed as a response to Stoicism.&lt;/p&gt;
&lt;p&gt;The Stoics believed that we can distinguish between &lt;em&gt;impressions&lt;/em&gt; and &lt;em&gt;judgments.&lt;/em&gt; Impressions are the raw sensory experiences we encounter, while judgments are the acceptance or rejection of those impressions. According to Stoicism, knowledge arises when a judgment is so clear and rational that it cannot be mistaken.&lt;/p&gt;
&lt;p&gt;Academic skeptics, however, challenged this view. While they agreed with the distinction between impressions and judgments, they argued that no impression could ever be so clear that it’s immune to doubt. A person could be hallucinating, intoxicated, misremembering, or dreaming, making it impossible to be certain about any impression.&lt;/p&gt;
&lt;p&gt;However, the argument of academic skepticism is self-defeating. If it’s impossible to know anything, how can we claim to know with certainty that knowledge itself is impossible?&lt;/p&gt;
&lt;h3 id="pyrrhonian-skepticism"&gt;Pyrrhonian Skepticism&lt;/h3&gt;
&lt;p&gt;To address this paradox, Pyrrhonian skeptics proposed a different approach: they argued that we should suspend all judgments—not only about knowledge itself but also about the process of attaining it.&lt;/p&gt;
&lt;p&gt;But this leads to another question: If we suspend judgment on everything, how do we decide basic matters, such as when to eat or drink? Pyrrhonian skeptics would say that such behavior can be guided by instinct rather than knowledge.&lt;/p&gt;
&lt;h2 id="arguments-against-and-for-skepticism"&gt;Arguments Against and For Skepticism&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Moorean Shift(Dogmatist)&lt;/strong&gt;
One well-known counterargument to skepticism, put forward by G.E. Moore, is known as the &lt;em&gt;Moorean Shift&lt;/em&gt;. Moore argues for the existence of external objects using a simple yet effective argument:&lt;/p&gt;
&lt;blockquote&gt;
&lt;ol&gt;
&lt;li&gt;Here is one hand.&lt;/li&gt;
&lt;li&gt;And here is another.&lt;/li&gt;
&lt;li&gt;Therefore, there are at least two external objects in the world.
C: An external world exists.&lt;/li&gt;
&lt;/ol&gt;
&lt;/blockquote&gt;
&lt;p&gt;A skeptic might claim that one cannot truly know they have hands, but Moore essentially reverses the burden of proof onto the skeptic. If common sense tells us that our hands exist, then it is the skeptic—not Moore—who must provide evidence to challenge this. In other words, the burden of proof lies with the party disputing the common sense or the &amp;ldquo;null hypothesis.&amp;rdquo;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Inference to the Best Explanation(Abductive)&lt;/strong&gt;
This argument, championed by Bertrand Russell, acknowledges the skeptic’s point that sense data might be misleading or distinct from reality. However, Russell argues that just because something cannot be proven with absolute certainty does not mean we cannot rationally infer its existence.&lt;/p&gt;
&lt;p&gt;Russell posits that the simplest hypothesis is often the most reasonable to believe. The hypothesis that external objects exist is simpler than the idea that we are dreaming or are brains in vats.&lt;/p&gt;
&lt;p&gt;Skeptics, however, counter this by noting that simplicity does not guarantee truth. For example, just because a detective has many clues pointing to one suspect does not mean the suspect is the actual culprit. Similarly, skeptics might concede that external objects are likely to exist but maintain that we cannot know this with certainty.&lt;/p&gt;
&lt;p&gt;Additionally, skeptics argue that external objects existing might not necessarily be the simpler hypothesis. For instance, Descartes&amp;rsquo; &lt;em&gt;evil demon&lt;/em&gt; hypothesis, where a demon manipulates our sense data to create a false reality, provides a coherent and equally comprehensive explanation for our experiences.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Semantic Approach&lt;/strong&gt;
The semantic approach to countering skepticism relies on how language functions. According to this view, meaning is not strictly tied to internal definitions within our minds (&lt;em&gt;Semantic Internalism&lt;/em&gt;), but rather to causal associations between words and the world (&lt;em&gt;Semantic Externalism&lt;/em&gt;).&lt;/p&gt;
&lt;p&gt;For example, people once thought water was a fundamental element. Now we know it is the compound H₂O. Despite this shift, the meaning of &amp;ldquo;water&amp;rdquo; remains consistent across both understandings because it refers to the same physical substance through causal links.&lt;/p&gt;
&lt;p&gt;Hilary Putnam builds on this to argue against skepticism. He suggests that a skeptic’s claim—such as &amp;ldquo;I am a brain in a vat&amp;rdquo;—cannot be true for someone who understands the sentence. This is because, in a virtual reality, the word &amp;ldquo;vat&amp;rdquo; would have a different causal association than it does in the real world. A person in such a scenario would only ever interact with simulated vats, so their word &amp;ldquo;vat&amp;rdquo; would not mean the same as in our reality.&lt;/p&gt;
&lt;p&gt;A skeptic could respond, however, by introducing a scenario like this: &amp;ldquo;Until yesterday, you lived in the real world, but today you became a brain in a vat.&amp;rdquo; In this case, since the person once had real-world experiences with vats, the meaning of the word &amp;ldquo;vat&amp;rdquo; in their sentence aligns with its real-world meaning, preserving the skeptical hypothesis.&lt;/p&gt;
&lt;h2 id="rationalism-of-rené-descartes"&gt;Rationalism of René Descartes&lt;/h2&gt;
&lt;p&gt;In his work &lt;em&gt;Meditations&lt;/em&gt;, René Descartes begins by questioning all the assumptions he, and we, have about what we think we know. He does this by pointing out the fallibility of our senses, eventually introducing his famous concept of the &lt;em&gt;evil demon&lt;/em&gt;, an omnipotent being that manipulates our minds by sending us all the sensations we currently experience. Against such an adversary, how could we ever know that something is true? The rest of Descartes&amp;rsquo; &lt;em&gt;Meditations&lt;/em&gt; is dedicated to reconstructing our worldview from the ground up.&lt;/p&gt;
&lt;p&gt;Descartes argues that the first undeniable truth is that one exists. He famously states, &lt;em&gt;Cogito, ergo sum&lt;/em&gt; (&amp;ldquo;I think, therefore I am&amp;rdquo;).&lt;/p&gt;
&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Cogito, ergo sum more formally&lt;/summary&gt;
 
 &lt;p&gt;Bertrand Russell rephrased this more formally as:&lt;/p&gt;
&lt;blockquote&gt;
&lt;ol&gt;
&lt;li&gt;There is doubt.&lt;/li&gt;
&lt;li&gt;If there is doubt, there must be a doubter.&lt;/li&gt;
&lt;li&gt;That doubter is referred to as &amp;ldquo;I.&amp;rdquo;
C: Therefore, I exist.&lt;/li&gt;
&lt;/ol&gt;
&lt;/blockquote&gt;
&lt;p&gt;Though it is unclear if this was exactly Descartes&amp;rsquo; intention, this argument has some problematic aspects. One issue is that we cannot know with absolute certainty that &lt;em&gt;doubt&lt;/em&gt; requires a &lt;em&gt;doubter&lt;/em&gt;. Another issue is that this argument only holds as long as one is doubting—if one stops doubting, the argument loses its force.&lt;/p&gt;

 
&lt;/details&gt;


&lt;p&gt;However, this is not enough to construct an entire worldview. Descartes then asks: What is the principle that allows us to say &amp;ldquo;I exist&amp;rdquo;? He answers that the principle is &lt;em&gt;a clear and distinct perception of what I am asserting&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;Descartes then categorizes ideas into two groups: &lt;em&gt;internal ideas&lt;/em&gt; (e.g., a flying eagle-headed horse) and &lt;em&gt;external ideas&lt;/em&gt; (e.g., a fireplace). As long as the &lt;em&gt;evil demon&lt;/em&gt; deceives him, he cannot be certain these ideas are his own.&lt;/p&gt;
&lt;p&gt;But Descartes argues that some ideas are greater than others, with the greatest idea being God—an infinite and perfect being. Since the source of perfection cannot come from something less than perfect, God must be the source of all perfection (a controversial causal principle).&lt;/p&gt;
&lt;p&gt;He continues by claiming that human errors arise because God gave us free will, including the freedom to accept imperfect ideas. He also argues that our senses can deceive us because they are not intended to convey ideas but are instead focused on bodily sensations that ensure our survival. Descartes concludes that we can be certain we are not dreaming because a benevolent God would not deceive us into being trapped in a lifelong dream.&lt;/p&gt;
&lt;h2 id="empiricism-of-john-locke"&gt;Empiricism of John Locke&lt;/h2&gt;
&lt;p&gt;John Locke worked on his theory for 20 years, aiming to challenge Descartes and address the issue of &lt;em&gt;finding the boundaries between opinion and knowledge&lt;/em&gt;. His approach was based on the &lt;em&gt;historical plain&lt;/em&gt; method.&lt;/p&gt;
&lt;p&gt;Rationalists claim that humans possess innate ideas, which we can use to reason our way to a worldview. Locke disagreed with this. He first raised the objection that children often lack the ideas that rationalists claim all humans are born with. One might counter that children will eventually discover these truths as they mature, but this would make the idea of innate knowledge redundant.&lt;/p&gt;
&lt;p&gt;Locke argued that the mind is a &lt;em&gt;blank slate&lt;/em&gt; (tabula rasa), and that it is shaped by sensation and experience. Through these, humans learn and gain knowledge. This approach, which focuses on sensation and experience, is called &lt;em&gt;empiricism&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;Empiricists do not believe that all ideas come from experience, only the &lt;em&gt;raw material&lt;/em&gt; for them. Reason can then be used to construct knowledge and ideas.&lt;/p&gt;
&lt;p&gt;Locke defines knowledge as &lt;em&gt;the perception of the connection and agreement, or disagreement, of any of our ideas&lt;/em&gt;. He differentiates between three types of knowledge:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;em&gt;Intuitive knowledge&lt;/em&gt;: Ideas we grasp immediately.&lt;/li&gt;
&lt;li&gt;&lt;em&gt;Demonstrative knowledge&lt;/em&gt;: Ideas we come to agree with, but only through a chain of reasoning.&lt;/li&gt;
&lt;li&gt;&lt;em&gt;Sensitive knowledge&lt;/em&gt;: Knowledge of particulars based on sensory experience.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;For Locke, knowledge is a tool for the pursuit of happiness. Therefore, if something appears to be a reliable source of pleasure or pain, it is worth considering. Locke is not concerned with the question of the &lt;em&gt;skeptics&lt;/em&gt;, as he believes that knowledge is primarily practical, helping us navigate the world effectively.&lt;/p&gt;
&lt;h1 id="theories-of-knowledge"&gt;Theories of Knowledge&lt;/h1&gt;
&lt;h2 id="cynical-theory-of-knowledge"&gt;Cynical Theory of Knowledge&lt;/h2&gt;
&lt;blockquote&gt;
&lt;p&gt;A subject S knows that a proposition P is true if and only if S believes P to be true.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;In this theory, knowledge and opinion are treated as the same thing. It argues, &amp;ldquo;What is knowledge if not the opinion of the elitist few?&amp;rdquo; According to this view, knowledge is nothing more than the opinion of those whom society deems to have high social standing.&lt;/p&gt;
&lt;p&gt;However, this theory is disproven by the fact that knowledge is not reserved for experts or leaders but is one of the most common terms used in everyday life. Furthermore, even Nobel Prize winners can be shown to be wrong.&lt;/p&gt;
&lt;h2 id="protagoras-theory-of-knowledge"&gt;Protagoras&amp;rsquo; Theory of Knowledge&lt;/h2&gt;
&lt;p&gt;Not everyone believes that truth is objective, meaning that a statement applies to everyone in the same way. Protagoras, for example, believed that two people standing outside, one feeling it as warm and the other feeling it as cold, would both be justified in saying they &lt;em&gt;know&lt;/em&gt; it is currently cold or warm and would both be correct in their assertions.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;A subject S knows that a proposition P is true if and only if: S perceives P to be true according to their personal experience or perspective.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;This is similar to the Cynical Theory of Knowledge, but while cynics emphasize power dynamics, Protagoras argues more broadly for relativism, independent of power structures.&lt;/p&gt;
&lt;p&gt;One problem with this conception of knowledge is: What if you were incorrect in the past? If Protagoras is correct, then our past selves, who were mistaken, should also be correct at the same time. A counter to this would be that the &amp;ldquo;you&amp;rdquo; of the present is not the same person as the &amp;ldquo;you&amp;rdquo; who made the mistake. In other words, things are only true for the &amp;ldquo;you&amp;rdquo; of right now, but not for the &amp;ldquo;you&amp;rdquo; of a moment ago.&lt;/p&gt;
&lt;p&gt;Another problem arises if I believe the theory to be false: According to Protagoras&amp;rsquo; view, if I believe something is false, then it must also be false for me, since knowledge is what you believe.&lt;/p&gt;
&lt;h2 id="justified-true-belief-jtb"&gt;Justified True Belief (JTB)&lt;/h2&gt;
&lt;p&gt;What is the difference between &amp;lsquo;know&amp;rsquo; and &amp;rsquo;think&amp;rsquo;? For example, consider the sentences &lt;em&gt;James thinks he turned off the oven&lt;/em&gt; vs. &lt;em&gt;Brian knows he turned off the oven&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;One distinction is that in the first case, James might only &lt;em&gt;think&lt;/em&gt; that he turned off the oven, but in reality, he forgot to do it. In the second case, this cannot be true. As such, one requirement for knowledge seems to be &lt;strong&gt;factuality&lt;/strong&gt;—in other words, we can only know &lt;em&gt;true propositions&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;It would make sense to say &lt;em&gt;James thinks he turned the oven off, but he didn’t&lt;/em&gt;, but the sentence &lt;em&gt;Brian knows he turned the oven off, but he didn’t&lt;/em&gt; seems nonsensical. Knowledge seems to require some level of &lt;strong&gt;confidence&lt;/strong&gt;, or in other words, the knower &lt;em&gt;needs to believe their knowledge to be true&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;But this is not enough for knowledge. We could have someone who is very confident in their claim, but for the wrong reasons. For example, a parent might feel very confident that their child is innocent when accused of a crime, but that doesn’t mean they &lt;em&gt;know&lt;/em&gt; it. One possibility to amend our requirements is to add that knowledge requires &lt;strong&gt;justified belief&lt;/strong&gt;—it is not enough to simply think one is correct; one must also be justified in thinking so for it to count as knowledge.&lt;/p&gt;
&lt;p&gt;More formally, we can define the theory of &lt;strong&gt;Justified True Belief (JTB)&lt;/strong&gt; as:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;A subject S knows that a proposition P is true if and only if:
(i) P is true;
(ii) S believes that P;
(iii) S is justified in believing that P.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h3 id="the-gettier-problem"&gt;The Gettier Problem&lt;/h3&gt;
&lt;p&gt;There is a problem with this definition, known as the &lt;strong&gt;Gettier problem&lt;/strong&gt;. Let’s imagine a person wandering in a deserted train station, having lost track of time. They want to know the time, so they check the station clock, which reads 1:17—this is the correct time. But here’s the twist: the clock is actually broken, and the person happened to glance at the exact moment when the clock stopped at 1:17.&lt;/p&gt;
&lt;p&gt;With how we&amp;rsquo;ve defined JTB, we would say the person &lt;em&gt;knows&lt;/em&gt; it’s 1:17—since (i) it is true, (ii) they believe it’s 1:17, and (iii) they are justified in believing it is this time, having checked the clock. But most people would argue that the person didn’t really &lt;em&gt;know&lt;/em&gt; it was 1:17.&lt;/p&gt;
&lt;p&gt;This suggests that knowledge is more than the sum of justification and true belief.&lt;/p&gt;
&lt;h2 id="modified-justified-true-belief"&gt;Modified Justified True Belief&lt;/h2&gt;
&lt;p&gt;The reason we think the person in the train station doesn’t know the time is because they have a false belief. We could modify our definition to exclude this scenario.&lt;/p&gt;
&lt;p&gt;More formally:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;A subject S knows that a proposition P is true if and only if:
(i) P is true;
(ii) S believes that P;
(iii) S is justified in believing that P;
(iv) The justification is not based on a false belief.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;But there’s still a problem with this definition. Sometimes, even though a person has a false belief, we can still say they know something. For example, if a detective gathers physical evidence and interviews one hundred people about a murder, and all of them point to the same person as the murderer, but one of the witnesses is lying and didn’t see the murder, we would still say the detective knows who the murderer is. A single false belief doesn’t invalidate all the other evidence leading the detective to their knowledge.&lt;/p&gt;
&lt;p&gt;We could try to modify the definition of knowledge again to allow for some false beliefs, while the majority of the evidence remains true. However, this is very hard to formalize.&lt;/p&gt;
&lt;h2 id="causal-theory-of-knowledge"&gt;Causal Theory of Knowledge&lt;/h2&gt;
&lt;p&gt;According to the &lt;em&gt;causal theory of knowledge&lt;/em&gt;, experience-based knowledge requires the knower to be appropriately causally connected to a fact.&lt;/p&gt;
&lt;p&gt;For example, when one looks at a burning barn, the visual evidence of the burning barn causes us to have the belief that the barn is in fact burning. As such, we have a causal chain linking us back to the fact of the matter.&lt;/p&gt;
&lt;p&gt;More formally, we can write it as:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;A subject S knows that a proposition P is true if and only if:
(i) P is true.
(ii) S believes that P is true.
(iii) S&amp;rsquo;s belief that P is true is appropriately causally connected to the fact that makes P true.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Let&amp;rsquo;s think back to the clock example, where the person was accidentally correct in telling the time using the broken clock. In this scenario, there is no causal relationship between the broken clock and the fact that it was 1:17. Therefore, we wouldn’t consider it knowledge.&lt;/p&gt;
&lt;p&gt;This definition also works for less obvious knowledge. For instance, every educated adult knows that Julius Caesar was assassinated, but most couldn’t tell you where they heard about it. However, there is still a causal chain that connects the fact of Caesar’s assassination to eyewitnesses, to ancient historians, to history books, and finally to history teachers or pop culture, which pass the knowledge on to us.&lt;/p&gt;
&lt;p&gt;However, the causal theory has a major flaw. Imagine the following scenario: Henry and his son are driving through the countryside. While driving, Henry points to different objects such as barns and tells his son what they are. Henry is causally linked to the actual barn through his visual perception. But here&amp;rsquo;s the twist: they are driving through &amp;ldquo;Fake Barn Country,&amp;rdquo; where residents put up fake barns by only placing their facades, and through sheer luck, Henry is currently looking at the only real barn.&lt;/p&gt;
&lt;p&gt;Does Henry know he is looking at a barn? Many people would say no, since there are thousands of fake barns, and he was just lucky enough to be looking at the only real one. But according to the causal theory, Henry knows it’s a barn because he is causally linked to the barn through his vision.&lt;/p&gt;
&lt;p&gt;In other words, the causal theory of knowledge does not account for environmental factors.&lt;/p&gt;
&lt;h2 id="reliabilism"&gt;Reliabilism&lt;/h2&gt;
&lt;p&gt;Reliabilism argues that what makes knowledge knowledge is the fact that it is arrived at through a reliable mechanism that creates true beliefs.&lt;/p&gt;
&lt;p&gt;More formally, we can write it as:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;A subject S knows that a proposition P is true if and only if:
(i) P is true.
(ii) S believes that P is true.
(iii) One has arrived at the belief that P is true through some &lt;em&gt;reliable process&lt;/em&gt;.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;The problem, however, is how reliable the process needs to be. Does the process need to create a true belief with an 80% likelihood, or does it need to be 99% reliable?&lt;/p&gt;
&lt;p&gt;Let’s imagine a scenario: You have a lottery ticket with a chance of 1:1000 to win. The winner has not been announced yet, but with a likelihood of over 99.9%, you have lost. However, most people would say you don’t &lt;em&gt;know&lt;/em&gt; you have lost before the announcement is made.&lt;/p&gt;
&lt;h2 id="knowledge-first-approach"&gt;Knowledge First Approach&lt;/h2&gt;
&lt;p&gt;The &lt;em&gt;knowledge first approach&lt;/em&gt; argues that knowledge is fundamental—something so basic that it cannot be analyzed further, similar to an axiom in mathematics. Instead of knowledge being made up of belief and additional conditions, this theory holds that belief is made up of knowledge.&lt;/p&gt;
&lt;p&gt;To illustrate this, consider the question: what is more fundamental, a perfect circle or rounded corners? A perfect circle can be used to define rounded corners, but the opposite is not true. As such, the circle is the fundamental starting block.&lt;/p&gt;
&lt;h2 id="nozicks-tracking-theory"&gt;Nozick&amp;rsquo;s Tracking Theory&lt;/h2&gt;
&lt;p&gt;In knowledge theory, there are two camps: the &lt;em&gt;internalists&lt;/em&gt;, who believe that without supporting evidence, you do not know something (think back to the example of Julius Caesar’s assassination—we know it, but we don&amp;rsquo;t know from where we learned it), and the &lt;em&gt;externalists&lt;/em&gt;, who believe that knowledge is a relationship between a person and a fact, and that one does not need to always know where one&amp;rsquo;s belief comes from for it to count as knowledge.&lt;/p&gt;
&lt;p&gt;Nozick&amp;rsquo;s tracking theory is an externalist theory, which argues that knowledge is the tendency to believe something when it&amp;rsquo;s true and not to believe it when it&amp;rsquo;s false.&lt;/p&gt;
&lt;p&gt;For example, if a doctor always prescribes the same medicine to every patient they meet, they will likely be wrong more times than right, and thus they wouldn&amp;rsquo;t be said to &amp;ldquo;know&amp;rdquo; what the correct treatment is.&lt;/p&gt;
&lt;p&gt;More formally, we can write it as:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;A subject S knows that a proposition P is true if and only if:
(i) P is true.
(ii) S believes that P is true.
(iii) If P were not true, S would not believe that P.
(iv) If P were true, S would believe P.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;If someone has a constant delusion of reading, they can&amp;rsquo;t know that they are reading because (iv) is satisfied but not (iii). In other words, (iii) and (iv) together suggest that knowledge is belief that tracks some fact.&lt;/p&gt;
&lt;p&gt;However, this theory also faces challenges. Imagine a nephew is visiting his grandmother in the hospital. The grandmother forms the belief that her grandson is healthy enough to visit her because he&amp;rsquo;s there. However, the family could be so concerned about her health that the nephew would visit even if he were sick, and the grandmother wouldn&amp;rsquo;t know. This scenario violates (iii), meaning she can&amp;rsquo;t know if her grandson is healthy or not. Yet, it feels like a family plan shouldn’t influence whether the grandmother can know it or not.&lt;/p&gt;
&lt;p&gt;The theory can be amended by adding that the method of belief formation should be reliable or good. However, this raises the question of how reliable or good the method needs to be.&lt;/p&gt;
&lt;h2 id="relevant-alternatives-theory-rat"&gt;Relevant Alternatives Theory (RAT)&lt;/h2&gt;
&lt;p&gt;The &lt;em&gt;Relevant Alternatives Theory&lt;/em&gt; (RAT) of knowledge suggests that knowing involves excluding all possible relevant alternatives.&lt;/p&gt;
&lt;p&gt;More formally:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;A subject S knows that a proposition p is true if and only if:
(i) p is true.
(ii) S believes that p is true.
(iii) S is able to rule out all relevant alternatives to p.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Consider the following scenario: You are at the zoo, and in the enclosure in front of you, you see a black-and-white striped animal. Do you know that the animal is a zebra?&lt;/p&gt;
&lt;p&gt;Intuitively, we would say yes, and the Relevant Alternatives Theory would agree, considering all other animals that could possibly be in a zoo. However, a skeptic might pose the challenge: How do you know it isn’t a donkey painted to look like a zebra?&lt;/p&gt;
&lt;p&gt;If we want to know it’s a zebra, we need to rule out this scenario, which can be difficult. How relevant is it to know whether the zoo owner is a prankster? Do we need to consider and exclude this possibility?&lt;/p&gt;
&lt;p&gt;The challenge is determining which alternatives are &lt;em&gt;relevant&lt;/em&gt; and which are not. But there’s an even bigger problem for this theory.&lt;/p&gt;
&lt;p&gt;Relevant Alternatives Theory tells us that if we are standing 20 meters away from the zebra, we know the animal is a zebra, and we know that if it’s a zebra, it’s not a cleverly disguised donkey. But at the same time, we do not know if it’s a painted donkey. This violates the principle of &lt;em&gt;closure&lt;/em&gt;, which is fundamental to logic.&lt;/p&gt;
&lt;h2 id="contextualism"&gt;Contextualism&lt;/h2&gt;
&lt;p&gt;Contextualism emerged as a way of keeping the parts of the Relevant Alternatives Theory without violating closure.&lt;/p&gt;
&lt;p&gt;Words are slippery. What does &lt;em&gt;tall&lt;/em&gt; or &lt;em&gt;small&lt;/em&gt; mean? Is a banana small? Compared to a skyscraper, definitely. Compared to a crumb of dust, probably not. Another example is the word &lt;em&gt;tomorrow&lt;/em&gt;, which refers to a different day depending on the context.&lt;/p&gt;
&lt;p&gt;Even though the meaning of words can change depending on the context, we don’t need a completely different dictionary.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Contextualism&lt;/em&gt; is the belief that words like &lt;em&gt;know&lt;/em&gt; are context-sensitive. In other words, once the context of the word is established, we know what it means. The standard needed for belief to count as knowledge can be much lower in some contexts (e.g., a street encounter) than in others (e.g., a formal academic debate).&lt;/p&gt;
&lt;p&gt;In a context where we are concerned that the zebra in the zoo might be a donkey painted to look like a zebra, it would be incorrect to say we &lt;em&gt;know&lt;/em&gt; it is a zebra. However, if we are not concerned about that possibility, it would be correct to say we &lt;em&gt;know&lt;/em&gt; it is a zebra.&lt;/p&gt;
&lt;p&gt;For example, if someone says they know the sandwich in front of them is a chicken sandwich, normal people might wonder if it’s really chicken or tuna, while a skeptic might question if the sandwich is a hologram. Both are valid concerns but require different standards of evidence to count as knowledge.&lt;/p&gt;
&lt;p&gt;The idea of contextualism is that when we use the word &lt;em&gt;know&lt;/em&gt;, we express something different depending on the situation. This is not necessarily a theory of knowledge, but more about the language of &lt;em&gt;knowing&lt;/em&gt;, which can be used in various other theories.&lt;/p&gt;
&lt;p&gt;The biggest objection to contextualism is that it may be seen as a form of skepticism in disguise. Skeptics don’t have a problem with the lower standard of knowledge in certain contexts, but with the higher standard in others.&lt;/p&gt;
&lt;p&gt;The counterargument is that the higher standard is not more valuable than the lower standard; they simply have different use cases. A lower standard is faster to reach with less expenditure but is less accurate, while the higher standard is slower and more accurate. For contextualists, asking which is better is like asking which weekday tomorrow ultimately is.&lt;/p&gt;
&lt;h2 id="internal-relative-invariantism"&gt;Internal Relative Invariantism&lt;/h2&gt;
&lt;p&gt;Imagine you&amp;rsquo;re heading to work and suddenly ask yourself, &amp;ldquo;Did I turn off the oven?&amp;rdquo; You then remember and say, &amp;ldquo;I know I turned off the oven.&amp;rdquo; Now, picture a detective from the police finds you and asks, &amp;ldquo;Did you turn off the oven?&amp;rdquo; You might respond, &amp;ldquo;I &lt;em&gt;think&lt;/em&gt; I did turn off the oven,&amp;rdquo; replacing the word &lt;em&gt;know&lt;/em&gt; with the weaker version &lt;em&gt;think&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;Another example is the famous idiom &amp;ldquo;treat every gun like it is loaded.&amp;rdquo; In a normal situation, one might act as though they know the gun is loaded. However, if a robber breaks into your home, you will need to check twice whether the gun is loaded or not.&lt;/p&gt;
&lt;p&gt;In both situations, you know whether the gun is loaded or not, but when the situation becomes more serious and your life might be at stake, you need more evidence before making a judgment.&lt;/p&gt;
&lt;p&gt;While contextualism is only a theory about the language of the word &lt;em&gt;know&lt;/em&gt;, internal relative invariantism is a theory about how knowledge works. In this view, a judgment is not true just based on the situation, but true full stop. A skeptic would be wrong in saying that you lack knowledge in the first scenario, and that they are merely using a different standard of evidence.&lt;/p&gt;
&lt;p&gt;A problem with this theory is how easily intuitions can shift. In the story with the oven, how can the meaning of the word &lt;em&gt;know&lt;/em&gt; change so easily based on what a skeptic might say?&lt;/p&gt;
&lt;h1 id="testimony"&gt;Testimony&lt;/h1&gt;
&lt;p&gt;How does testimony play a role in knowledge? Can we gain knowledge by listening to others?&lt;/p&gt;
&lt;p&gt;Just like with everything in philosophy, there are many approaches to these questions. I will briefly mention some of them but not go into depth:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;John Locke&lt;/strong&gt; argues that testimony never provides you with knowledge. At best, it provides a high probability, which can later be disproven. For Locke, you can never &lt;em&gt;know&lt;/em&gt; if you were born, because your beliefs about this come from family members or your birth certificate. You can only say it is highly probable that you were born.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Reductionism&lt;/strong&gt; claims that we can gain knowledge through testimony and that it should not be treated differently from any other sensory information. We use past experiences to collaborate and verify the testimony.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Default View&lt;/strong&gt; holds that testimony is a special kind of information gathering that is independent of other factors. This view argues that testimony is distinct, just like reason is distinct from perception.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Imagine a Wikipedia page, created by many volunteers. A Lockean would say that the information we get from Wikipedia is a highly probable &lt;em&gt;opinion&lt;/em&gt; rather than knowledge. A reductionist would say that any knowledge we gain depends on the character we infer the creators of the Wikipedia pages to have. Finally, a default view theorist would say that Wikipedia provides knowledge of the facts it reports.&lt;/p&gt;
&lt;h2 id="conclusion"&gt;Conclusion&lt;/h2&gt;
&lt;p&gt;With this article on knowledge, I have now explored three major philosophical topics: meta-ethics, normative ethics, and epistemology. While I found certain problems in the popular positions of the first two areas, I feel a greater sense of dissatisfaction with the theories of knowledge. The issues in epistemology seem harder to reconcile, and I find myself unhappy with all the positions explored.&lt;/p&gt;
&lt;p&gt;I find some merit in contextualism and believe it makes sense, but it doesn&amp;rsquo;t provide a clear definition of what knowledge is. For now, I must be content with viewing &lt;em&gt;knowledge&lt;/em&gt; as a fundamental building block and accepting that the standard of evidence differs depending on the situation.&lt;/p&gt;


&lt;figure&gt;
 &lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width:50%" src="https://monkemanx.github.io/attachments/plagued_by_concepts.png"&gt;
&lt;/figure&gt;


&lt;hr&gt;
&lt;p&gt;References:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.amazon.de/-/en/Knowledge-Very-Short-Introduction-Introductions/dp/019966126X"&gt;Knowledge: A Very Short Introduction&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://en.wikipedia.org/wiki/Gettier_problem"&gt;Gettier Problem&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://en.wikipedia.org/wiki/Here_is_one_hand"&gt;Moorean Shift&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>My Methaethical Position</title><link>https://monkemanx.github.io/articles/metaethical_position/</link><pubDate>Thu, 26 Dec 2024 00:00:00 +0000</pubDate><author>monkeman@cock.li (MonkeMan)</author><guid>https://monkemanx.github.io/articles/metaethical_position/</guid><description>&lt;style&gt;
 .info {
 background-color: #e6f7ff; 
 padding: 15px; 
 border-radius: 5px; 
 margin-bottom: 15px; 
 }

 .info-title {
 font-size: 20px; 
 margin-bottom: 10px; 
 color: #000080; 
 font-weight: bold; 
 }
&lt;/style&gt;

&lt;div class="info"&gt;
 &lt;div class="info-title"&gt;Info&lt;/div&gt;
 &lt;p&gt;The last time I updated this article was on 05.02.2025. Some of the content I no longer fully agree with, but the last section on &lt;strong&gt;&lt;a href="#my-metaethical-position"&gt;My Metaethical Position&lt;/a&gt;&lt;/strong&gt; is still accurate.&lt;/p&gt;
&lt;/div&gt;

&lt;style&gt;
 .warning {
 background-color: #ffe4e1; 
 padding: 15px; 
 border-radius: 5px; 
 margin-bottom: 15px; 
 }

 .warning-title {
 font-size: 20px; 
 margin-bottom: 10px; 
 color: #8b0000; 
 font-weight: bold; 
 }
&lt;/style&gt;

&lt;div class="warning"&gt;
 &lt;div class="warning-title"&gt;Warning&lt;/div&gt;
 &lt;p&gt;Update 21.06.2025: &lt;a href="#my-metaethical-position"&gt;My Metaethical Position&lt;/a&gt; still holds, but I have expanded it see &lt;a href="https://monkemanx.github.io/tangled_thoughts/philosophy_philosophical_ramblings_morality/"&gt;Philosophical Ramblings #05: Morality and Intentions &lt;/a&gt;.&lt;/p&gt;
&lt;/div&gt;

&lt;p&gt;In a &lt;a href="https://monkemanx.github.io/articles/what_is_morality/"&gt;recent post&lt;/a&gt;, I discussed metaethics: what it is, the various contemporary metaethical positions that exist today, and how one can categorize them. For a short recap, metaethics is a branch of philosophy that grapples with the question &lt;em&gt;What is morality?&lt;/em&gt; — i.e., the ontology, or the study of the essence, of morality. Metaethics is distinct from ethics, which addresses the question &lt;em&gt;What ought one to do?&lt;/em&gt; or &lt;em&gt;What is the most moral action one can take?&lt;/em&gt; Metaethics, on the other hand, seeks to understand what morality is made of.&lt;/p&gt;
&lt;p&gt;This brings me to how one can categorize metaethical positions. For a comprehensive explanation, I recommend my aforementioned article. Broadly, we can differentiate between &lt;em&gt;cognitivist&lt;/em&gt; positions, which hold that moral statements are matters of truth, and &lt;em&gt;non-cognitivist&lt;/em&gt; positions, which argue that moral statements are not about truth but about something else, such as emotions.&lt;/p&gt;
&lt;p&gt;We can further subdivide these categories based on whether one believes that moral values are objective—that is, they exist independently of human minds. Such a stance is called &lt;em&gt;realism&lt;/em&gt;. Conversely, the belief that moral values are not objective is referred to as &lt;em&gt;non-realism&lt;/em&gt;. While there are additional distinctions that can be made, these are the most significant ones.&lt;/p&gt;
&lt;h1 id="constructivism"&gt;Constructivism&lt;/h1&gt;
&lt;p&gt;With all of this out of the way, we can finally discuss my position on metaethics. I believe that moral statements are cognitivist, meaning they are statements of truth. However, I do not think that morality exists outside of individual minds, whether as a natural or non-natural property, which aligns with an anti-realist position. That said, I do not subscribe to total relativism, such as speaker relativism, which holds that the truth of morality depends entirely on the speaker. Instead, I believe that our morality is constructed at different levels, ranging from small structures like families to the broader society as a whole, also called Constructivism.&lt;/p&gt;
&lt;p&gt;So, what is Constructivism more broadly? Constructivism holds that moral statements are:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Sentences that are true or false.&lt;/li&gt;
&lt;li&gt;Some statements are true (in contrast with error theory).&lt;/li&gt;
&lt;li&gt;The truth or falsity of the statement arises from a constructive process.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;In other words, the correctness of a moral judgment is based on principles determined by a constructive procedure. What this procedure entails varies depending on the specific theory of constructivism one adheres to.&lt;/p&gt;


&lt;figure&gt;
 &lt;img style="display: block; margin-left: auto; margin-right: auto; width:60%" src="https://monkemanx.github.io/attachments/constructivism_process.png"&gt;
&lt;/figure&gt;


&lt;p&gt;In general, we can differentiate between &lt;em&gt;Restricted constructivists&lt;/em&gt;, who argue that only certain aspects of morality are constructed—such as justice. This position can be compatible with various other metaethical positions, including moral realism. On the other hand, we have &lt;em&gt;metaethical constructivism&lt;/em&gt;, which argues that morality as a whole is constructed, mostly for practical reasons.&lt;/p&gt;
&lt;p&gt;Metaethical constructivism further differentiates between &lt;em&gt;Kantian constructivism&lt;/em&gt;, which posits that the morality of all humans will converge through the constructive process, independent of factors like birthplace, and &lt;em&gt;Humean constructivism&lt;/em&gt;, which believes that humans are born with certain attitudes and that the constructive process brings out morality from these attitudes, influenced by cultural and societal factors. Importantly, Humean constructivists believe that this process is not convergent, meaning multiple sets of morality can exist simultaneously while still being true.&lt;/p&gt;


&lt;figure&gt;
 &lt;img style="display: block; margin-left: auto; margin-right: auto; width:60%" src="https://monkemanx.github.io/attachments/constructivism_taxonomy.png"&gt;
&lt;/figure&gt;


&lt;p&gt;There are two important questions remaining: first, what is the constructive process, and second, what are the arguments in favor of this position?&lt;/p&gt;
&lt;p&gt;I want to start with an illustration of the constructive process. Imagine millions of years ago when the first humans began to appear, or even when we were still primates. There are two groups of people: in the first group, everyone acted egoistically—stealing, lying, murdering, and engaging in all the bad things we would now consider immoral in order to gain an advantage. In the second group, however, people followed certain principles; for example, they adhered to the &lt;a href="https://en.wikipedia.org/wiki/Golden_Rule"&gt;Golden Rule&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;In this world, where humans didn&amp;rsquo;t yet have sophisticated weapons or knowledge of agriculture, which group is more likely to survive?&lt;/p&gt;
&lt;p&gt;I would argue that the second group is more likely to survive. In this group, it is possible to hunt large animals, like mammoths, in cooperation without the fear of being murdered by a fellow human. Murder would violate their principles, leading to the punishment of the attacker, thus ensuring cooperation within the group. This cooperation, I argue, is not possible in the first group, where a constant state of mistrust would prevail.&lt;/p&gt;
&lt;p&gt;Thus, there is evolutionary pressure (through the &lt;a href="https://en.wikipedia.org/wiki/Baldwin_effect"&gt;Baldwin effect&lt;/a&gt;) for human groups to learn behaviors that we would now call morality.&lt;/p&gt;
&lt;p&gt;As such, I argue that the first constructive process that led us to develop a core set of moral principles is evolution. This process has led all humans (or humans that evolved in one place) to share the same set of core moral beliefs. However, I believe this core set is relatively small, only including very general and broad statements. Yet, as humans, we have many more specific moral rules. So, where do these additional rules come from?&lt;/p&gt;
&lt;p&gt;For this, I argue that there is a second constructive process, which works at the societal level, based on shared practices and culture. The core set of moral beliefs was sufficient when humans lived in small groups and society was simple. However, as societies became more complex and the number of members in a given society grew (think villages, cities, and nations), the core set of morality was no longer enough. More complex moral rules were required. Thus, moral rules developed in each society based on practical reasons—what worked and what didn&amp;rsquo;t. How exactly this happened, I am not sure.&lt;/p&gt;
&lt;p&gt;These metaethical statements have some important implications that need to be addressed.
First, the truth of a moral statement is based on its practical value, meaning there is no objective morality out there. Instead, different societies adopt different rules based on what works. This position is, to some extent, relativistic, but I want to make it very clear that this is only the case at the societal level. In other words, two different societies might have different moral rules that are both true, but within a society, only one set of moral rules is true.
Second, when I speak about society, I mean a group of people that have developed together—that is, people with shared cultures and history.
Third, these moral values do not have to develop entirely independently within each society. If there was communication between societies, morality could also be exchanged, influencing the moral values of other societies.&lt;/p&gt;
&lt;p&gt;Next, I want to go over the arguments for why I believe the metaethical framework I have stated is true. I will only address arguments that I find convincing. For a more complete list of arguments for and against a particular metaethical position, you can read my prior article on metaethics.&lt;/p&gt;
&lt;p&gt;I think the strongest argument in favor of my position is that there are large differences in moral rules between societies. For example, in Aztec society, human sacrifice was considered a moral duty, which most Western societies would frown upon. Another example is the difference between Eastern societies like China and Japan, and more Western countries. Eastern societies place much more emphasis on collectivism, such as filial piety, while Western societies focus more on individualism, which also reflects in their moralities. Societies in the Middle East tend to place much more focus on honor. Such differences cannot easily be explained by a &lt;em&gt;realist&lt;/em&gt; position.&lt;/p&gt;
&lt;p&gt;A non-cognitivist explanation also seems unlikely, because when we use moral statements, we treat them as if they are matters of truth. What is the meaning of language, if not how we use it and what we associate with it? The &lt;a href="https://monkemanx.github.io/articles/what_is_morality/#the-frege-geach-problem"&gt;Frege-Geach Problem&lt;/a&gt;, which tells us that Modus Ponens doesn’t work in non-cognitivism, is another issue that non-cognitivists face.&lt;/p&gt;
&lt;p&gt;Furthermore, the already mentioned Baldwin effect provides a plausible theory of why morality could develop through evolution via a constructivist process.&lt;/p&gt;
&lt;p&gt;Thus, I believe that a cognitivist, anti-realist position, like constructivism, is true.&lt;/p&gt;
&lt;p&gt;Lastly, I want to counter some arguments against constructivism. One argument that non-cognitivists often use is the following: if you see someone kick an innocent homeless man on the street, most people would think this is wrong. But where is this wrongness? It is not a cognitive process where we assess logical statements to reach a true conclusion; instead, it is more intuitive and emotional. A counter to this is that we have already done the logical reasoning and assessment beforehand about its truth value, internalized it so well that it is now intuitive knowledge for us.&lt;/p&gt;
&lt;p&gt;Another problematic point for constructivism is how to handle disagreements between societies. If there are truly multiple sets of moralities that are all true, how do we resolve conflicts that arise from them? My answer is that we resolve them by showing that your moral system works in practice better than the other. If another society adopts your moral system, you can then work within the same framework and engage in moral arguments. How would one show that one moral system is superior to another? I think a good example of this is how Western liberalism, especially in America, tries to spread democracy around the world by showing other nations the benefits of adopting it.&lt;/p&gt;
&lt;h1 id="more-on-constructivism"&gt;More on Constructivism&lt;/h1&gt;
&lt;p&gt;In my previous section, I made the observation: &lt;em&gt;&amp;ldquo;Different groups have different moral systems.&amp;rdquo;&lt;/em&gt; From this, I concluded that morality cannot be objective. I want to expand on that idea further. A common response to this line of thinking is to assert that morality is not relative, but rather that one group is wrong and another is right. The argument goes that just because two groups have different moral systems, it does not necessarily mean that morality is relative.&lt;/p&gt;
&lt;p&gt;I want to counter this. In the prior section, I already mentioned that we can observe societies with radically different moral systems. The &lt;em&gt;radical&lt;/em&gt; part is crucial here. If morality were objective, the question arises: how could two groups of people arrive at radically different ideas of what morality is?
If there were some &amp;ldquo;meta-morality&amp;rdquo; rule underlying these differences, it might explain the divergence, but moral systems vary so widely that this seems implausible. The existence of radical differences suggests a relative moral system. If morality were objective and real, we would expect it to have some observable impact on the world. And if it did, morality should, to some extent, converge over time. Claiming morality is objective while also asserting that it remains non-convergent feels like a contradiction.&lt;/p&gt;
&lt;p&gt;One could also claim that morality is objective but has no impact on the world whatsoever. However, this seems even stranger. What is an objective property that has no effect on anything? The idea itself appears contradictory.&lt;/p&gt;
&lt;p&gt;Another argument that strongly supports an anti-realist position is the &lt;em&gt;argument from queerness&lt;/em&gt;. This argument posits that if morality were a real property, it would be very strange. Morality would need to be a property that intrinsically motivates us to act, independent of our state of mind. Furthermore, if morality were a property of things, we would need some organ or sense to detect it. Since traditional senses like sight or hearing do not detect morality, what would this mysterious organ be?&lt;/p&gt;
&lt;h1 id="fictionalism"&gt;Fictionalism&lt;/h1&gt;
&lt;p&gt;Broadly speaking, moral fictionalism is the theory that morality is an invented fiction, akin to the rules of a game or the narrative of a book. When we make moral statements, we can regard them as &amp;ldquo;true&amp;rdquo; within the context of this fiction. For example, in the game &lt;em&gt;Risk&lt;/em&gt;, every player must take turns in sequence. Is this rule &amp;ldquo;true&amp;rdquo;? No, it is an invented fiction for the purpose of the game.&lt;/p&gt;
&lt;p&gt;Morality is similar. When we say, &lt;em&gt;&amp;ldquo;Murder is wrong,&amp;rdquo;&lt;/em&gt; this is an assertion with truth value only within the context of the fiction of morality.&lt;/p&gt;
&lt;p&gt;There are many branches of fictionalism. For instance, &lt;strong&gt;meta-fictionalism&lt;/strong&gt; is the thesis that, when making moral statements, the speaker is essentially asserting that, according to a particular fiction, the statement is true.&lt;/p&gt;
&lt;p&gt;For example, &lt;em&gt;&amp;ldquo;Murder is wrong&amp;rdquo;&lt;/em&gt; means, for a meta-fictionalist, something like: &lt;em&gt;&amp;ldquo;According to the morality fiction, murder is wrong.&amp;rdquo;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;This theory raises several questions, the first being: what is this fiction? Here, constructivist claims about morality fit neatly. Morality, as a fiction, is developed through a constructive process, shaped by mechanisms such as evolution. Why would such a fiction develop? As argued earlier in this article, morality aids group survival by fostering improved cooperation.&lt;/p&gt;
&lt;p&gt;One objection to this theory is that it seems absurd to claim that morality is just a fiction. A counterargument is that there is evolutionary and societal pressure to enforce the belief that moral statements are objectively true. If people believed morality was merely a fiction, they might act immorally. Therefore, it is in society’s best interest to pressure individuals into believing morality is objective and real.&lt;/p&gt;
&lt;h1 id="my-metaethical-position"&gt;My Metaethical Position&lt;/h1&gt;
&lt;p&gt;I believe that when someone says, &amp;ldquo;Murder is wrong,&amp;rdquo; they genuinely believe murder is wrong. However, I argue that what morality actually refers to is a fiction. This fiction was created through a constructive process and is reinforced by societal pressure to ensure people perceive morality as objective and real. This enforcement helps maintain adherence to the moral fiction.&lt;/p&gt;
&lt;p&gt;Central to why I believe this is that when we speak about morality, we speak about &amp;ldquo;What do I owe other people?&amp;rdquo; But where should this owe come from? Why do I owe you not to kill you? Owing implies having some kind of debt toward another, but where should this debt originate? For theists, the answer is easier—God creates us with this debt. But if you are not a theist, then this explanation doesn’t work.&lt;/p&gt;
&lt;p&gt;One way this owe could arise is if we, as a society, agree to have rules imposed upon us—morality as a social contract. In this case, we say, &amp;ldquo;I owe you not to kill you because we made a contract in which I promised not to kill you.&amp;rdquo; In this sense, morality is a fiction, just like laws—something we created to ensure societal flourishing and our own survival.&lt;/p&gt;


&lt;figure&gt;
 &lt;img style="display: block; margin-left: auto; margin-right: auto; width:80%" src="https://monkemanx.github.io/attachments/pepe_writing.jpg"&gt;
&lt;/figure&gt;


&lt;hr&gt;
&lt;p&gt;Resources:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&amp;ldquo;Fictionalism&amp;rdquo; Stanford Encylopedia&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>The Meaning of Ought</title><link>https://monkemanx.github.io/articles/the_meaning_of_ought/</link><pubDate>Fri, 20 Dec 2024 00:00:00 +0000</pubDate><author>monkeman@cock.li (MonkeMan)</author><guid>https://monkemanx.github.io/articles/the_meaning_of_ought/</guid><description>&lt;h2 id="where-does-ought-come-from"&gt;Where Does &lt;em&gt;Ought&lt;/em&gt; Come From?&lt;/h2&gt;
&lt;p&gt;In the modern moral landscape, theories like &lt;em&gt;egoism&lt;/em&gt;, &lt;em&gt;deontology&lt;/em&gt;, and &lt;em&gt;utilitarianism&lt;/em&gt; gain a wide array of support from Western philosophers. One central word in all of these theories is &lt;em&gt;ought&lt;/em&gt;. In &lt;em&gt;rational egoism&lt;/em&gt;, which tells us the most moral action is what benefits oneself the most, we say one &lt;em&gt;ought&lt;/em&gt; to maximize their self-interest. In &lt;em&gt;deontological&lt;/em&gt; ethics, where we are asked to follow rules, we say we &lt;em&gt;ought&lt;/em&gt; to follow them. Finally, in &lt;em&gt;utilitarianism&lt;/em&gt;, which tells us to maximize the benefit for all, we say we &lt;em&gt;ought&lt;/em&gt; to maximize the happiness of all those affected.&lt;/p&gt;
&lt;p&gt;But when we say &lt;em&gt;ought&lt;/em&gt;, what do we actually mean? What do we evoke with it?&lt;/p&gt;
&lt;p&gt;When we say &lt;em&gt;ought&lt;/em&gt;, we do not mean one &lt;em&gt;can&lt;/em&gt; follow the deontological rules or not. Instead, it is commonly interpreted as an imperative. If we look at the etymology of the word &lt;em&gt;ought&lt;/em&gt;, this interpretation makes sense. It comes from the Old English word &lt;em&gt;agan&lt;/em&gt;, which means something like &lt;em&gt;to owe&lt;/em&gt;. So when we say, &lt;em&gt;we ought not to kill&lt;/em&gt;, we are saying something akin to &lt;em&gt;we owe it not to kill&lt;/em&gt;. Here, the word &lt;em&gt;owe&lt;/em&gt; implies more of an obligation than a choice.&lt;/p&gt;
&lt;p&gt;But when we say we &lt;em&gt;owe it&lt;/em&gt;, two questions immediately come to mind:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Whom do we owe it to?&lt;/li&gt;
&lt;li&gt;Why do we owe someone, or where does this obligation (or debt) come from?&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;To answer these questions, we need to look at history. Rigorous moral theory began with the Greeks, such as Aristotle. For Aristotle, the word &lt;em&gt;ought&lt;/em&gt; held a slightly different meaning—it was closer to &lt;em&gt;need&lt;/em&gt;. So when someone said, &lt;em&gt;we ought not to kill&lt;/em&gt;, what was conveyed was that exemplary humans do not kill (more on this later).&lt;/p&gt;
&lt;p&gt;However, over time, Western philosophy became dominated by Judeo-Christian ways of thinking, particularly with the rise of Christianity, and this influence became deeply rooted in our language.&lt;/p&gt;
&lt;p&gt;In Christianity, which is based on the Jewish &lt;a href="https://en.wikipedia.org/wiki/Torah"&gt;Torah&lt;/a&gt; full of rules and regulations, morality became a matter of following &lt;a href="https://en.wikipedia.org/wiki/Divine_command_theory"&gt;God&amp;rsquo;s commands&lt;/a&gt;, laid out in rules such as the Ten Commandments. As such, when we say &lt;em&gt;ought&lt;/em&gt;, what we mean is that there is a divine rule one must follow. &lt;em&gt;One ought not to kill&lt;/em&gt; becomes &lt;em&gt;killing is against the divine moral law&lt;/em&gt;.&lt;/p&gt;
&lt;h2 id="contemporary-moral-philosophy"&gt;Contemporary Moral Philosophy&lt;/h2&gt;
&lt;p&gt;The meaning of &lt;em&gt;ought&lt;/em&gt; made sense within the Christian paradigm. However, contemporary moral philosophers have made a conscious effort to free themselves from the &lt;em&gt;&amp;ldquo;shackles of religion&amp;rdquo;&lt;/em&gt;. In other words, they have attempted to reinvent moral philosophy without relying on religious axioms.&lt;/p&gt;
&lt;p&gt;In this secular world, the word &lt;em&gt;ought&lt;/em&gt; begins to lose its meaning. It once evoked a sense of obligation—as though breaking a divine rule or command. Without such rules, to whom does this obligation apply? Why do we owe anything to anyone? To ourselves? And if so, where does this &lt;em&gt;debt&lt;/em&gt; originate?&lt;/p&gt;
&lt;p&gt;It&amp;rsquo;s as if, in today&amp;rsquo;s climate, we removed the word &lt;em&gt;verdict&lt;/em&gt; from its association with judges, laws, courts, and the entire legal system—while simultaneously trying to preserve its original meaning. Certainly, we could still apply the word &lt;em&gt;verdict&lt;/em&gt; to situations without courts or judges, but it would have lost much of its essence and clarity.&lt;/p&gt;
&lt;p&gt;The same is true of the word &lt;em&gt;ought&lt;/em&gt;. We have removed &lt;em&gt;ought&lt;/em&gt; from its Judeo-Christian context and now use it in modern moral theories that lack a solid foundation. When we make moral claims today, we often rely on a chain of logical arguments, but these arguments seem to float freely, ungrounded and unsupported by any ultimate foundation.&lt;/p&gt;
&lt;p&gt;Systems like &lt;em&gt;egoism&lt;/em&gt; and &lt;em&gt;utilitarianism&lt;/em&gt; may provide us with rules or principles to follow, but these systems are ultimately arbitrary. There is no consistent or objective way to determine which moral theory is superior to the other.&lt;/p&gt;
&lt;h2 id="virtue-ethics"&gt;Virtue Ethics&lt;/h2&gt;
&lt;p&gt;If &lt;em&gt;ought&lt;/em&gt; no longer makes sense when speaking about moral claims, what other word could we use? One alternative is &lt;em&gt;need&lt;/em&gt;. While &lt;em&gt;need&lt;/em&gt; may not carry the same force and urgency as &lt;em&gt;ought&lt;/em&gt;, it possesses other features that make it attractive.&lt;/p&gt;
&lt;p&gt;What does &lt;em&gt;need&lt;/em&gt; mean? We always use &lt;em&gt;need&lt;/em&gt; in connection with the concept of a flourishing life. For example, what does a plant &lt;em&gt;need&lt;/em&gt; to flourish? It needs water, sunlight, and nutrients. In that sense, we could say it &lt;em&gt;ought&lt;/em&gt; to have these things, but the language of &lt;em&gt;need&lt;/em&gt; is more fitting and natural.&lt;/p&gt;
&lt;p&gt;We can apply the same reasoning to humans. Using psychology and philosophy, we can examine ourselves to identify what humans as a species &lt;em&gt;need&lt;/em&gt; to flourish.&lt;/p&gt;
&lt;p&gt;In this framework, we would move away from &lt;em&gt;deontological&lt;/em&gt; claims—like labeling actions as &lt;em&gt;good&lt;/em&gt; or &lt;em&gt;bad&lt;/em&gt;. Instead, we would use &lt;em&gt;evaluative language&lt;/em&gt; such as &lt;em&gt;just&lt;/em&gt;, &lt;em&gt;truthful&lt;/em&gt;, &lt;em&gt;loyal&lt;/em&gt;, or &lt;em&gt;patient&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;This approach not only provides a more expressive moral language, but it also allows us to extend the discussion to non-humans, such as animals. Asking questions like, &lt;em&gt;What does an animal need?&lt;/em&gt; makes far more sense than &lt;em&gt;What do we owe an animal?&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;One method of identifying what humans need to flourish is through &lt;a href="https://en.wikipedia.org/wiki/Virtue_ethics"&gt;virtue ethics&lt;/a&gt;. Virtue ethics addresses not only the question, &lt;em&gt;How can one be moral?&lt;/em&gt; but also &lt;em&gt;How can one live a good life?&lt;/em&gt; The answer to both is the same: a virtuous person achieves both morality and happiness.&lt;/p&gt;
&lt;p&gt;A virtuous person is someone who embodies qualities such as truthfulness, loyalty, courage, patience, and so on. One might question why a person &lt;em&gt;needs&lt;/em&gt; to be truthful (or possess any other virtue) to flourish—after all, could one not lie and still gain something?&lt;/p&gt;
&lt;p&gt;The answer is twofold. First, being virtuous leads to a deep sense of contentment with oneself. Second, it results in stronger and more meaningful relationships with others. Friends and loved ones will feel they can rely on you because you are virtuous.&lt;/p&gt;
&lt;p&gt;I want to end with a thought from Aristotle. He suggested that every action a human takes shapes their character, much like a sculptor chiseling marble into form.&lt;/p&gt;
&lt;p&gt;Thus, whether the final statue—your character—becomes a beautiful masterpiece or something rotten and sinister depends entirely on your virtuous or vicious actions.&lt;/p&gt;


&lt;figure&gt;
 &lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width:60%" src="https://monkemanx.github.io/attachments/Aristotle.jpg"&gt;
&lt;/figure&gt;


&lt;hr&gt;
&lt;p&gt;Resources:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;em&gt;Modern Moral Philosophy&lt;/em&gt; by GEM Anscombe, 1958&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>Killing Dream People!</title><link>https://monkemanx.github.io/articles/killing_dream_people/</link><pubDate>Tue, 17 Dec 2024 00:00:00 +0000</pubDate><author>monkeman@cock.li (MonkeMan)</author><guid>https://monkemanx.github.io/articles/killing_dream_people/</guid><description>&lt;style&gt;
 .info {
 background-color: #e6f7ff; 
 padding: 15px; 
 border-radius: 5px; 
 margin-bottom: 15px; 
 }

 .info-title {
 font-size: 20px; 
 margin-bottom: 10px; 
 color: #000080; 
 font-weight: bold; 
 }
&lt;/style&gt;

&lt;div class="info"&gt;
 &lt;div class="info-title"&gt;Info&lt;/div&gt;
 &lt;p&gt;Addendum: &lt;a href="https://monkemanx.github.io/tangled_thoughts/philosophy_philosophical_ramblings_pain_conciousness_animals/"&gt;Philosophical Ramblings #07: Pain, Consciousnessand the Value of Animals&lt;/a&gt;&lt;/p&gt;
&lt;/div&gt;

&lt;h1 id="dreams-morality-and-the-value-of-life"&gt;Dreams, Morality, and the Value of Life&lt;/h1&gt;
&lt;p&gt;A while ago, I had a rather vivid &lt;a href="https://monkemanx.github.io/tangled_thoughts/random_dream/"&gt;dream&lt;/a&gt;, but I will spare you the details. What was important about this dream was the presence of a dying girl. Who she was isn&amp;rsquo;t crucial; what&amp;rsquo;s important is the dying part.&lt;/p&gt;
&lt;p&gt;This dream led me to wonder: What is the morally relevant factor that allows for the killing of dream people, but forbids the killing of &amp;ldquo;real&amp;rdquo; people? In other words, how can I define the value of human life in such a way that it includes real people but excludes dream people? And if I can&amp;rsquo;t, shouldn&amp;rsquo;t we give dream people the same moral consideration as real people? And what would this entail?&lt;/p&gt;
&lt;p&gt;If you&amp;rsquo;ve read Peter Singer&amp;rsquo;s paper &lt;a href="https://monkemanx.github.io/paper-summary/all_animals_are_the_same/"&gt;&amp;ldquo;All Animals Are Equal,&amp;rdquo;&lt;/a&gt; you may find certain parallels. Just as he tries to include animals in moral consideration, I am attempting to include dream people.&lt;/p&gt;
&lt;p&gt;The underlying question of this article is a value question: &lt;em&gt;What do we value?&lt;/em&gt; Most people would likely answer this question with some variation of &amp;ldquo;Human life&amp;rdquo; or &amp;ldquo;Persons.&amp;rdquo; But this leads us to another question: &lt;em&gt;What is a &amp;ldquo;Human Life&amp;rdquo; or a &amp;ldquo;Person&amp;rdquo;?&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;I have already tried to address this question in a &lt;a href="https://monkemanx.github.io/articles/when_does_a_something_deserve_moral_considerations/"&gt;previous article&lt;/a&gt;, where I proposed a definition: &amp;ldquo;We say &lt;em&gt;something&lt;/em&gt; is &lt;em&gt;someone&lt;/em&gt; if and only if it has the &lt;em&gt;capability&lt;/em&gt; to deploy consciousness,&amp;rdquo; and that something deserves moral consideration (i.e., should not be killed) if and only if it is someone. In this article, however, I will attempt to find a broader, morally acceptable principle that differentiates dream people from &amp;ldquo;real&amp;rdquo; people.&lt;/p&gt;
&lt;p&gt;Before we proceed, I want to clarify that when I refer to &amp;ldquo;personhood&amp;rdquo; in this article, I mean it as a shorthand for &amp;ldquo;something deserving moral consideration,&amp;rdquo; but I do not intend to imply any additional connotations that come with the word &amp;ldquo;personhood.&amp;rdquo;&lt;/p&gt;
&lt;p&gt;Another point that needs clarification is what I mean when I say &amp;ldquo;moral consideration.&amp;rdquo; Imagine a device capable of extracting dreams and displaying them in some kind of showbox for people to watch and enjoy. Do we have a moral obligation toward the people in these dreams? For example, if the same device can also manipulate dreams, would it be morally justified to change the dream into a hellscape where the dream people eternally suffer, just for my amusement? Or am I allowed to destroy their &amp;ldquo;property&amp;rdquo;? Kill them?&lt;/p&gt;
&lt;p&gt;If the people in the dream have intrinsic value, then the answer is obviously no. But do they have intrinsic value?&lt;/p&gt;
&lt;p&gt;If a being deserves moral consideration, it means that when we, as agents, perform actions in the world (or dream world), we must first consider the moral implications for that being. For example, a stone does not have moral consideration, so the question &amp;ldquo;Is it morally wrong to destroy a stone?&amp;rdquo; doesn&amp;rsquo;t make sense. We could still imagine that the stone is owned by someone who would mind its destruction, but importantly, the stone itself doesn&amp;rsquo;t have moral consideration—its owner does, and by extension, we need to consider their property. On the other hand, when we ask, &amp;ldquo;Is it morally wrong to kill this human?&amp;rdquo; the question makes sense because we do consider humans when making moral decisions—in other words, they have moral consideration.&lt;/p&gt;
&lt;p&gt;It’s important to note that even if dream people do deserve moral consideration, there might still be arguments as to why certain actions (like those mentioned above) are morally permissible. For example, one could argue that dream people have &lt;a href="https://iep.utm.edu/animals-and-ethics/#SSH3aiii"&gt;different interests&lt;/a&gt; from us, and these interests may not include their continued existence or &amp;ldquo;suffering.&amp;rdquo;&lt;/p&gt;
&lt;p&gt;You might think that all of this doesn&amp;rsquo;t matter since the girl in my dream was just a fiction of my imagination. To that, I have several rebuttals, which you will see later. But to begin with: Who’s to say that you are not a fiction in the dream landscape called the Universe, dreamed by a greater entity, more commonly referred to as God?&lt;/p&gt;


&lt;figure&gt;
 &lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width: 80%" src="https://monkemanx.github.io/attachments/mc_donald_dream.jpg"&gt;
&lt;/figure&gt;


&lt;h1 id="personhood-defined-as-human-life"&gt;Personhood Defined as Human Life&lt;/h1&gt;
&lt;p&gt;One of the first arguments against dream people having inherent value is that they are not living people, i.e., they do not have human life, and thus are not worth protecting. But as I alluded to earlier, I do not think this is a viable definition for personhood. Instead, I believe we ought to protect the &amp;ldquo;continued conscious experience&amp;rdquo; of a subject.&lt;/p&gt;
&lt;p&gt;But why should we value consciousness over life in general? When debating a definition, one aims to find something that includes all possible instances of the thing and excludes all non-instances. So, if I want to challenge the definition, I can either show that there is something we would call a person that is not included in the definition, or that the definition includes something that should not be a person.&lt;/p&gt;
&lt;p&gt;What do I mean by human life? I mean the biological processes that occur in living humans. I do not want to specify this further, since the question of what exactly constitutes &amp;ldquo;human life&amp;rdquo; may be complicated and is not the focus of this article.&lt;/p&gt;
&lt;p&gt;With this definition of personhood, it would exclude:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Conscious artificial intelligence&lt;/li&gt;
&lt;li&gt;Simulated humans&lt;/li&gt;
&lt;li&gt;Uploaded human consciousness&lt;/li&gt;
&lt;li&gt;Alien life forms&lt;/li&gt;
&lt;li&gt;Animals&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;And it would include:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Brain-dead patients&lt;/li&gt;
&lt;li&gt;Individuals with anencephaly (humans born without a pre-frontal cortex)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;One might disagree about whether all of the listed examples should or should not deserve moral consideration (or even argue about whether they should be on the list at all). However, remember that showing even one instance of something that should be considered a person but is not included in the definition—or that is included but should not be—is enough to show that the definition is insufficient. In so far as no one is willing to &amp;ldquo;bite the bullet&amp;rdquo; on all of these points, &lt;em&gt;human life&lt;/em&gt; as an indicator of personhood is not a good definition.&lt;/p&gt;
&lt;p&gt;To highlight the importance of a correct definition of personhood, I offer the following motivational thought experiment:&lt;/p&gt;
&lt;p&gt;Imagine we are far years in the future. Mankind has made tremendous advances in both science and technology, and has never stopped researching improvements to computers and understanding brain physiology. Sure, during this time, progress stagnated or slowed down at times, but research continued, making incremental advancements. One day, through advanced surveillance technology, we successfully map an entire human brain, capturing every neuron and synapse. Not only that, but we also figure out the exact principles of how and when neurons fire. Equipped with that knowledge, researchers run simulations on supercomputers using the brain map.&lt;/p&gt;
&lt;p&gt;Before long, these simulated brains are used everywhere as a cheap way to automate tasks. But because society has defined personhood as human life, and simulated brains are not included in that definition, these simulated brains can be kept and employed in slave-like conditions, working 24/7 without rest, having no rights to refuse requests or stop working.&lt;/p&gt;
&lt;p&gt;One might disagree that consciousness is a purely materialistic and deterministic process or argue that humans would not survive long enough to reach such a position. However, if this scenario were possible and we defined personhood incorrectly, we could find ourselves confronted with a &lt;em&gt;malum morale&lt;/em&gt; on a scale as great as, or greater than, the transatlantic slave trade.&lt;/p&gt;
&lt;h1 id="does-the-length-of-life-determine-moral-worth"&gt;Does the Length of Life Determine Moral Worth?&lt;/h1&gt;
&lt;p&gt;One claim I&amp;rsquo;ve heard that differentiates dream people from &amp;ldquo;real&amp;rdquo; people is time. A friend of mine put it like this:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&amp;ldquo;They only exist for the few minutes of the dream, and after that, they are gone.&amp;rdquo;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Another user I asked on a message board replied:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&amp;ldquo;[&amp;hellip;] Their lifespan is only until you wake up. But if they&amp;rsquo;re with you when you&amp;rsquo;re awake, you can take their claims seriously.&amp;rdquo;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Is this really true? Is time a &lt;em&gt;relevant&lt;/em&gt; moral factor that differentiates dream people from &amp;ldquo;real&amp;rdquo; people?&lt;/p&gt;
&lt;p&gt;Imagine a woman, with no living family or friends, gives birth and dies during childbirth. The baby is diagnosed with an incurable disease that will cause it to die in a few days. Assuming the baby will indeed die and has no one to care for it, is it wrong for me to do as I please with the baby, simply because of its limited lifespan?&lt;/p&gt;
&lt;p&gt;Most people would agree that the answer is obviously &lt;em&gt;no&lt;/em&gt;. But if that’s the case, then &amp;ldquo;time&amp;rdquo; or &amp;ldquo;limited lifespan&amp;rdquo; can&amp;rsquo;t really be the differentiation factor.&lt;/p&gt;
&lt;p&gt;We can also imagine a thought experiment in the opposite direction. Suppose we put a person into a state of deep sleep and administer a medication that prolongs their dream (such a medication might be developed in the future—it&amp;rsquo;s not completely absurd, considering that today, we have medicines like some antidepressants that can intensify dreams). We also take care of all their dietary needs. In this scenario, one person might experience a dream that lasts for 50 years or more.&lt;/p&gt;
&lt;p&gt;Would the lifespan of the character in the dream, in this case, be extended? If so, would that suddenly make them worthy of moral consideration?&lt;/p&gt;
&lt;p&gt;I would argue that most people would say that just because the character in your dream exists for a longer period does not mean we should suddenly start treating them like a person.&lt;/p&gt;
&lt;p&gt;Furthermore, think about the implications it would have for moral consideration if it were based on lifespan. Would that mean that rich people, who through their wealth have access to better healthcare and thus a longer life expectancy, would be more valuable than poorer people who can&amp;rsquo;t afford the same healthcare?&lt;/p&gt;
&lt;h1 id="the-role-of-the-body-in-defining-personhood"&gt;The Role of the Body in Defining Personhood&lt;/h1&gt;
&lt;p&gt;Another possible distinction we could make is that dream people do not have their own bodies; they are instead &amp;ldquo;guests&amp;rdquo; in a house called the brain or consciousness.&lt;/p&gt;
&lt;p&gt;However, this argument doesn&amp;rsquo;t hold up to scrutiny any more than the previous one.&lt;/p&gt;
&lt;p&gt;First of all, the concept of an &amp;ldquo;own body&amp;rdquo; is not clearly defined. Where does one&amp;rsquo;s body end and another&amp;rsquo;s begin? Are the bacteria inside me part of my body, or not? If they are part of my body, what if I stand inside the mouth of a blue whale—am I then part of its body? What if I remove my arm and replace it with a mechanical one? What if I transplant my brain into someone else&amp;rsquo;s body? There are many such questions, but they highlight a common problem with many philosophical definitions. I will set this issue aside for now. (Though it’s worth noting that having precise definitions is one of the most important aspects of science, which works through the falsifiability principle. After all, how can you falsify something that is imprecise? Or as Wittgenstein would say, &amp;ldquo;Any philosophical debate is just semantics.&amp;rdquo;)&lt;/p&gt;
&lt;p&gt;Similar to the &amp;ldquo;human life&amp;rdquo; argument, we can imagine scenarios where we would say a person deserves moral consideration even though they don&amp;rsquo;t have their own body. For example, imagine in the future, we are able to upload minds into computers, creating &lt;a href="https://en.wikipedia.org/wiki/Mind_uploading"&gt;digital minds&lt;/a&gt;. Would we now say that just because we changed the outward form of a person, they are no longer a person? Would it be morally permissible to torture or kill these minds?&lt;/p&gt;
&lt;p&gt;Again, most people would say no—just because we change the body of a person from a biological one to a mechanical or digital one, they do not lose their rights or personhood.&lt;/p&gt;
&lt;h1 id="creation-and-moral-rights"&gt;Creation and Moral Rights&lt;/h1&gt;
&lt;p&gt;One possible argument is that a dream person is created by something else and is therefore artificial, in contrast to a human.&lt;/p&gt;
&lt;p&gt;But this is a tenuous argument at best, and simply wrong at worst. Are humans any less artificially created than dream people? And what does &amp;ldquo;artificial&amp;rdquo; even mean?&lt;/p&gt;
&lt;p&gt;There are many parallels between them:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;A human is created by their parents; a dream person is created by the dreamer.&lt;/li&gt;
&lt;li&gt;A human can&amp;rsquo;t choose how or as what they are created, and neither can a dream person.&lt;/li&gt;
&lt;li&gt;The human species is created by evolution, and dream people are created by &amp;ldquo;real&amp;rdquo; people.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Religious people claim that humans were created by God. How is this any different from a dream person being dreamed up by a real person? Is being created by God less artificial than being created through evolution?&lt;/p&gt;
&lt;p&gt;If, in the future, we train a neural network on a large amount of data and it gains consciousness (however we may measure it), does it deserve any fewer rights because it was created by people rather than parents, and through &lt;a href="https://en.wikipedia.org/wiki/Gradient_descent"&gt;gradient descent&lt;/a&gt; instead of evolution?&lt;/p&gt;
&lt;p&gt;If, through &lt;a href="https://en.wikipedia.org/wiki/Boltzmann_brain"&gt;random quantum fluctuation&lt;/a&gt;, a fully-formed human were to appear in front of you, indistinguishable from a &amp;ldquo;normal&amp;rdquo; human in terms of external appearance, memories, and full consciousness, would it have less value just because of how it came to exist?&lt;/p&gt;
&lt;p&gt;I would answer, &amp;ldquo;No!&amp;rdquo;, to all of these questions. How consciousness or human life was created, or by whom, does not matter in the consideration of whether they should have moral rights.&lt;/p&gt;
&lt;h1 id="location-and-moral-rights"&gt;Location and Moral Rights&lt;/h1&gt;
&lt;p&gt;We could argue, what separates &amp;ldquo;real&amp;rdquo; people from dream people is the location or place they inhabit. This is true in a sense: dream people live in dreams, while &amp;ldquo;real&amp;rdquo; people live in the &amp;ldquo;real&amp;rdquo; physical world. But simply pointing to a difference in location is not enough to establish a moral distinction. The distinction needs to be &lt;em&gt;morally relevant&lt;/em&gt;, and it clearly is not.&lt;/p&gt;
&lt;p&gt;Do we say it&amp;rsquo;s morally less wrong to kill someone from America than someone from Asia? Is it morally permissible to kill someone on the International Space Station simply because they are in space and we are not?&lt;/p&gt;
&lt;p&gt;Obviously, the answer is no. So why should it be morally permissible to kill a dream person just because they exist in a different place (the dream) than we do? This is similar to the &lt;a href="https://stanforddaily.com/2019/02/05/how-to-think-about-a-drowning-child/"&gt;drowning child thought experiment&lt;/a&gt;, where the moral consideration does not change based on the location of the child.&lt;/p&gt;
&lt;p&gt;A proponent of the location argument might try to modify it by suggesting that they are not referring to a different physical location between dream and &amp;ldquo;real&amp;rdquo; people, but rather to different &amp;ldquo;dimensions&amp;rdquo; or &amp;ldquo;realms&amp;rdquo; (whatever that might mean).&lt;/p&gt;
&lt;p&gt;We can again refer to the example of uploaded digital consciousness or simulated human consciousness. Don&amp;rsquo;t they exist in a different dimension? The medium in which they exist is digital and electronic, compared to our biological medium. One might counter by saying that they both still exist in the physical world and as such do not count.&lt;/p&gt;
&lt;p&gt;But do we really think that if we discovered another plane of existence, populated by conscious agents, it would be morally acceptable to kill them? People who consume the drug DMT often claim to encounter &lt;a href="https://www.monsterchildren.com/articles/what-are-the-machine-elves"&gt;mechanical elves&lt;/a&gt; from different dimensions, and they certainly don&amp;rsquo;t think it&amp;rsquo;s morally permissible to harm them. Religious believers of various faiths also posit conscious agents that exist beyond our physical world. As long as they are not evil (e.g., demons), most would argue that this does not give anyone the right to kill them.&lt;/p&gt;
&lt;p&gt;In summary, we can conclude that personhood and moral consideration do not depend on location—whether in a physical or &amp;ldquo;interdimensional&amp;rdquo; sense.&lt;/p&gt;
&lt;h1 id="the-experience-of-pain-in-dreams-and-its-conenction-to-morality"&gt;The Experience of Pain in Dreams and it&amp;rsquo;s Conenction to Morality&lt;/h1&gt;
&lt;p&gt;To experience pain, a sensation must first be detected by sensory neurons through a chemical process. These signals are then translated into electrical impulses and transmitted through the spinal cord to the brain, where they are interpreted as the feeling we call &amp;ldquo;pain.&amp;rdquo;&lt;/p&gt;
&lt;p&gt;When a dream person is physically harmed, none of these biological mechanisms exist. For example, the brain does not have the necessary sensory neurons to detect pain. Importantly, if a dream person is harmed in a dream, you do not experience the pain yourself.&lt;/p&gt;
&lt;p&gt;So, how can a being that has no capacity for pain be considered worthy of moral consideration? In Peter Singer&amp;rsquo;s paper, &lt;a href="https://monkemanx.github.io/paper-summary/all_animals_are_the_same/"&gt;&lt;em&gt;All Animals Are Equal&lt;/em&gt;&lt;/a&gt;, he argues that the capacity to suffer is a requirement for moral consideration.&lt;/p&gt;
&lt;p&gt;First, the feeling of pain does not solely depend on special sensory neurons; it can also be triggered by electrical signals entirely within the brain (e.g., phantom pains, migraines). Second, just because a being does not experience the phenomenon of pain does not mean it cannot experience suffering. For example, a simulated human consciousness might not feel pain but could still experience emotional suffering, such as the loss of a loved one.&lt;/p&gt;
&lt;p&gt;Lastly, it is possible that the dream person is experiencing pain, but that pain remains confined to the brain region responsible for their consciousness, rather than being transmitted to your entire brain. In other words, the pain of the dream person could be isolated from you, without you even being aware of it.&lt;/p&gt;
&lt;h1 id="are-dream-people-conscious"&gt;Are Dream People Conscious?&lt;/h1&gt;
&lt;p&gt;With the superficial arguments out of the way, we can now focus on the core of the argument.&lt;/p&gt;
&lt;p&gt;Earlier, when I discussed &amp;ldquo;human life,&amp;rdquo; I implicitly made the assumption that &amp;ldquo;dream people&amp;rdquo; are conscious. This is important because, if dream people aren&amp;rsquo;t conscious and we value consciousness, then the argument loses its relevance.&lt;/p&gt;
&lt;p&gt;So, the central question is: Are dream people conscious? Or should we act as though they are conscious?&lt;/p&gt;
&lt;p&gt;To begin, let me offer a motivational account of why it makes sense, at least initially, to consider that dream people may indeed possess consciousness.&lt;/p&gt;
&lt;h2 id="motivation-biological-imperative-to-simulate-conciousness"&gt;Motivation: Biological Imperative to simulate Conciousness&lt;/h2&gt;
&lt;p&gt;In every living biological organism, there is a feedback loop between it and the world. It emits &lt;em&gt;actions&lt;/em&gt; that change the environment and receives information through its &lt;em&gt;senses&lt;/em&gt;. There are many possibilities for how the organism can engage with this feedback loop, but most ways are not useful. Nevertheless, organisms have developed strategies, though they vary in both sophistication and timescale.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://en.wikipedia.org/wiki/Free_energy_principle#Active_inference"&gt;Active inference&lt;/a&gt; proposes a model that unifies all these different strategies into one. Its basic idea is that &lt;em&gt;all living organisms minimize the surprise of their sensory observations&lt;/em&gt;. When speaking about &lt;em&gt;surprise&lt;/em&gt;, it is used as a technical term, measuring how much an agent&amp;rsquo;s current sensory observation differs from its preferred sensory observation (e.g., a fish prefers to be in water).&lt;/p&gt;
&lt;p&gt;In this model, one can see the brain as a &amp;ldquo;predictive machine,&amp;rdquo; where perception is a combination of prior information (current information in the brain) about what most likely caused the sensation and the sensory stimuli itself. As such, perception is a constructive process, where sensory information is used to confirm or disconfirm hypotheses, thus minimizing surprise.&lt;/p&gt;
&lt;p&gt;Thus, this process needs some &lt;em&gt;generative/forward model&lt;/em&gt;, which generates predictions based on its observations, called a &lt;em&gt;prior&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;For example, let&amp;rsquo;s assume that I currently think, with 90% probability, that the object in front of me is a frog and 10% probability that it is an apple. I now observe this object with my senses and realize that it was not a frog, but an apple instead. I update the probabilities in my head, so that the next time I see an object, I’ll think with higher likelihood that the object is an apple than before. In the same way, actions, like perception, can also be used to minimize surprise. Instead of updating beliefs, one can change the world—by exchanging the apple for a frog, for instance, we bring the perceived world in harmony with the predicted world.&lt;/p&gt;
&lt;p&gt;The brain does this surprise minimization with all the objects that exist in the world; therefore, it tries to have the best possible &lt;a href="https://arxiv.org/abs/1803.10122"&gt;world model&lt;/a&gt;, a generative model that attempts to predict the world.&lt;/p&gt;
&lt;p&gt;One of the most difficult things to predict in the world is human behavior. It is of critical importance to understand when a person is happy, when they are sad, and so on. Because if you know a person is angry, you can infer they might attack you, thus minimizing surprise. The human mind does this through the &lt;a href="https://en.wikipedia.org/wiki/Theory_of_mind"&gt;theory of mind&lt;/a&gt;, in which humans have developed instinctively formed models to recognize how someone currently feels, helping to better predict the world and the people in it by reading microexpressions on people&amp;rsquo;s faces and other stimuli.&lt;/p&gt;
&lt;p&gt;But reading facial expressions is not enough to predict human behavior in its entirety. To know if a person will attack me or if I can trust them, I need to model their motivations, their character—e.g., do they have a disposition to lying? The more information and characteristics I model of other humans, the easier it becomes to predict their behavior, thus minimizing surprise.&lt;/p&gt;
&lt;p&gt;With all this said, if we now imagine what would be the best possible model for predicting future human behavior, what would it be?&lt;/p&gt;
&lt;p&gt;The answer is that the best possible model is a full simulation of the consciousness of a human being.&lt;/p&gt;
&lt;p&gt;So when we ask the question: Are dream people conscious? We should keep in mind that there is a biological and evolutionary incentive for the dream person to be conscious. Namely, when the brain uses dreams to process past interactions with other people, what better way to learn how one should behave in the future than by interacting with a conscious being?&lt;/p&gt;
&lt;p&gt;I want to caveat this by saying that active inference is a model, so it doesn&amp;rsquo;t claim to know the truth about how things are, but rather serves as a good approximation. Future evidence may show that minimizing surprise is not, in fact, what is happening in organisms.&lt;/p&gt;
&lt;p&gt;Also noteworthy is that this assumes it is even possible to simulate human consciousness in the first place. One should also be mindful that evolutionary arguments can help motivate an argument, but they shouldn&amp;rsquo;t be used as the main thrust of the argument (e.g., see &lt;a href="https://www.reddit.com/r/PhilosophyofScience/comments/1bjs6yf/why_is_evolutionary_psychology_so_controversial/"&gt;why evolutionary psychology is so controversial&lt;/a&gt;).&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;The human brain is divided at the level of the cerebrum (everything above the brain stem) into right and left hemispheres. [&amp;hellip;]
The right and left hemispheres of all vertebrate brains are connected by several nerve tracts called commissures, the function of which, we now know, is to pass information back and forth between them. [&amp;hellip;]&lt;/p&gt;
&lt;p&gt;Certain people have had their forebrain commissures surgically severed. This is generally undertaken as a treatment for severe epilepsy, though other surgeries occasionally require that some of these fibers be cut. As a treatment for epilepsy, patients usually receive a callosotomy, a procedure whereby most or all of the corpus callosum is severed to prevent local storms of unregulated activity from spreading throughout the brain and producing a seizure. [&amp;hellip;]&lt;/p&gt;
&lt;p&gt;Once patients recover from this surgery, they generally appear quite normal, even on neurological exam. [&amp;hellip;] Two principal findings emerged. First, the left and right hemispheres of the brain display a high degree of functional specialization. [&amp;hellip;]
The second finding was that when the forebrain commissures are cut, the hemispheres display an altogether astonishing functional independence, including separate memories, learning processes, behavioral intentions, and— it seems all but certain—centers of conscious experience. [&amp;hellip;]&lt;/p&gt;
&lt;p&gt;Everything that falls in the left visual field of each eye, for instance, is projected to the right hemisphere of the brain, and everything in the right visual field is projected to the left hemisphere.
Thus, each hemisphere relies on intact commissures to receive information from its own side of the world. While it can rarely speak, because speech is usually confined to the left hemisphere, the right hemisphere can respond to questions by pointing to written words and objects with the left hand.&lt;/p&gt;
&lt;p&gt;The classic demonstration of hemispheric independence in a split-brain patient runs as follows: Show the right hemisphere a word—egg, say—by briefly flashing it in the left half of the visual field, and the subject (speaking from his language-dominant left hemisphere) will claim to have seen nothing
at all. Ask him to reach behind a partition and select with his left hand (which is predominantly controlled by the right hemisphere) the thing that he “did not
see,” and he will succeed in picking out an egg from among a multitude of objects.
Ask him to name the item he now holds in his left hand without allowing the left hemisphere to get a look at it, and he will be unable to reply. If shown the egg and asked why he selected it from among the available materials, he will probably confabulate an answer (again, with his language- dominant left hemisphere), saying something like “Oh, I picked it because I had eggs for breakfast yesterday.” [&amp;hellip;]
In the acute phase after surgery, patients’ left and right hands sometimes engage in a tug-of-war over an object or sabotage each other’s work. [&amp;hellip;]&lt;/p&gt;
&lt;p&gt;When the lateralization of inputs to the brain is exploited in this way, it becomes difficult to say that the person whose brain has been split is a single subject, for everything about his behavior suggests that a silent intelligence lurks in his right hemisphere, about which the articulate left hemisphere knows nothing. [&amp;hellip;]&lt;/p&gt;
&lt;p&gt;Even many years after surgery, the left hemispheres of these subjects express surprise or irritation when their right hemispheres respond to an experimenter’s instructions. To ask the left hemisphere what it is like to not know what the right hemisphere is thinking is rather like asking a normal subject what it is like to not know what another person is thinking: He simply does not know what the other person is thinking (or even, perhaps, that he or she exists).&lt;/p&gt;
&lt;p&gt;What is most startling about the split-brain phenomenon is that we have every reason to believe that the isolated right hemisphere is independently conscious. [&amp;hellip;]&lt;/p&gt;
&lt;p&gt;In a famous example, a young patient was asked what he wanted to be when he grew up: His left brain replied, “A draftsman,” while his right brain used letter cards to spell out “racing driver.”[&amp;hellip;]&lt;/p&gt;
&lt;p&gt;The question of whether there is “something that it is like” to be the right hemisphere of a split-brain patient must be answered in the only way that it is ever answered in science: We can merely observe that its behavior and underlying neurology are sufficiently similar to that which we know to be
correlated with consciousness in our own case. [&amp;hellip;]&lt;/p&gt;
&lt;p&gt;The question of whether the right hemisphere is conscious is really a pseudo-mystery used to bar the door to a great one: the uncanny fact that the &lt;strong&gt;human mind can be divided with a knife.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Imagine undergoing a complete callosotomy. Like most such surgeries, you could be kept awake, because there are no pain receptors in the brain. There is also no reason to think that you would lose consciousness during the procedure, because a person can have an entire hemisphere removed (hemispherectomy) without loss of consciousness. Nor would you suffer a
lapse in memory. After surgery, you would tend to speak in a way
characteristic of alexithymia (the inability to describe your emotional life), and you might also demonstrate an inappropriate degree of politeness.
Whether or not you had occasion to notice these changes in yourself, it seems all but certain that you would retain your sense of being a “self” throughout the experience.
Given that each hemisphere in your divided brain would have its own point of view, whereas now you appear to have only one, it is natural to wonder which side of the longitudinal fissure “you” would find yourself on once the corpus callosum was cut. Would you land on the right or on the left? It is hard to resist the uncanny demands of arithmetic here. Assuming that you were not simply extinguished and replaced by two new subjects—which seems ruled out by the fact that you would probably remain conscious throughout the procedure and retain your memories—it is tempting to conclude that your subjectivity must collapse to a single hemisphere. Once the surgery was over,
it would be obvious that you can’t be on both sides of the great divide.[&amp;hellip;]&lt;/p&gt;
&lt;p&gt;I think this riddle admits of a rather straightforward solution. Consciousness—whatever its relation to neural events—is divisible. And just as it isn’t shared between the brains of separate individuals, it need not be shared between the hemispheres of a single brain once the structures that facilitate such sharing have been cut.&lt;/p&gt;
&lt;p&gt;~ Sam Harris, Waking Up&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2 id="consciousness-in-consciousness-information-flow-and-ownership"&gt;Consciousness in Consciousness: Information Flow and Ownership&lt;/h2&gt;
&lt;p&gt;If we assume that the dream person has an independent consciousness, then there exists an information flow between this subconsciousness and the &amp;ldquo;main&amp;rdquo; consciousness. This is rather obvious, as dreams and the people in them are not random but are highly influenced by our lived experiences.&lt;/p&gt;
&lt;p&gt;But is this separation &lt;em&gt;morally relevant&lt;/em&gt;?&lt;/p&gt;
&lt;p&gt;Let’s assume we keep developing and improving brain-machine interfaces (BMIs) like Neuralink, and in the future, every person has one, working just like a USB-C port. We can connect two ports and exchange messages and other information. If I were to connect myself to you via this interface, would this grant me the moral right to kill you? Clearly not. As such, we can’t say that just because there is an information flow between two entities, this somehow makes the other entity not worthy of moral consideration.&lt;/p&gt;
&lt;p&gt;We could argue, though, that this information flow is so deeply intertwined between us that I have a certain part of &amp;ldquo;ownership&amp;rdquo; over the subconsciousness, and as such, it grants me certain rights over it. This may be true, but even then, one still needs to at least morally consider the other entity. For example, during slavery, even though one person may have been owned by another, it did not mean the slave lost all rights. There were still certain principles the slave owner had to adhere to. Thus, even though the slave might have been owned by someone else, they did not lose moral consideration.&lt;/p&gt;
&lt;p&gt;Another example might be Siamese twins, a condition where the bodies of two twins are fused together, and thus one body houses two consciousnesses. Again, just because two consciousnesses are tightly integrated with each other does not mean we have the right to kill the other consciousness.&lt;/p&gt;
&lt;p&gt;I want to remind the reader that I am not arguing that dream people deserve certain rights, e.g., not to be killed or harmed. I am simply arguing that one should consider the impact one&amp;rsquo;s actions have on them, as we do with other humans.&lt;/p&gt;
&lt;h2 id="the-resolution-argument"&gt;The Resolution Argument&lt;/h2&gt;
&lt;p&gt;The counterargument I would regard as the strongest against the consciousness of dream people is what I dub the &amp;ldquo;resolution argument.&amp;rdquo; It argues that the &amp;ldquo;resolution&amp;rdquo; of a dream is significantly lower than that of reality, just as one might reduce resolution in a video game. If I walk around in reality and talk to another person, I can clearly see how they look, what clothes they wear, what their hair color is, I can hear the cadence of their voice, see special mannerisms, and much more. If I compare this to a dream, everything becomes much more muddied. If I wake up, I might remember that I talked to someone and maybe even some rough outlines, but far fewer details than when I talk to real people.&lt;/p&gt;
&lt;p&gt;Now, if the resolution of dreams is really so much lower than in reality, why would we assume that the same does not apply to the people in the dream? And since the resolution of dream people is so much lower, why would we assume that they have consciousness, the argument goes.&lt;/p&gt;
&lt;p&gt;There are multiple avenues of attack I want to use against this.&lt;/p&gt;
&lt;p&gt;First, let&amp;rsquo;s start by acknowledging that there are various methods that can help increase the vividness—and with that, the &amp;ldquo;resolution&amp;rdquo;—of a dream, and how well one remembers them. These methods include the &lt;a href="https://journals.ub.uni-heidelberg.de/index.php/IJoDR/article/view/47120"&gt;importance one places on dreams&lt;/a&gt;, drugs such as some antidepressants, and lucid dreaming &lt;a href="https://www.sciencedirect.com/science/article/pii/S0306987723000622"&gt;which can be learned&lt;/a&gt;. These techniques either actually make dreams more vivid or help in recalling dreams better (though they could also affect both factors at the same time, which I&amp;rsquo;ll ignore for the sake of simplification). If the first case is true, then would this mean some of these techniques would lead to more vivid dreams, thus making the dream people also have more details, hence making it more likely that dream people could gain consciousness? (Assumption: higher vividness means more brain capacity is allocated, and more brain power leads to a higher chance for consciousness to emerge. This seems reasonable, since in animals, intelligence is correlated with levels of consciousness.) On the other hand, if it&amp;rsquo;s the second case, then dreams might have a rather high resolution, we just don’t remember them well, thus defeating the argument.&lt;/p&gt;
&lt;p&gt;Second, we could imagine that there are beings of higher levels of consciousness and intelligence, for whom dreams have a more &amp;ldquo;upscaled resolution&amp;rdquo;—be it aliens, simulated consciousnesses in the future, where we could ourselves choose the computational capacity of the simulation and thus the &amp;ldquo;resolution,&amp;rdquo; or gods (see Brahma&amp;rsquo;s Dream). This idea is also deeply rooted in &lt;a href="https://www.jstor.org/stable/1399947"&gt;Chinese philosophical thought&lt;/a&gt;, particularly through the &lt;a href="https://en.wikipedia.org/wiki/Zhuangzi_(book)#%22The_Butterfly_Dream%22"&gt;Butterfly Dream&lt;/a&gt;.&lt;/p&gt;
&lt;blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;Daoist interpretation of the allegorical meaning of the story [Butterfly Dream] is this: just as dreaming is not less &amp;ldquo;authentic&amp;rdquo; than being awake, being dead is no less &amp;ldquo;authentic&amp;rdquo; than being alive.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;The idea of &amp;ldquo;presence&amp;rdquo; is that whatever &lt;em&gt;is&lt;/em&gt; is just what it is and nothing but what it is.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;The thought behind this is that most Western philosophers define presence in terms of ontology, the study of the essence of a thing, and separate the &amp;ldquo;I&amp;rdquo; from the &amp;ldquo;am.&amp;rdquo; Meanwhile, in Eastern philosophy, these concepts are more tightly linked together: what currently is, the presence, is simply what it is—no split between &amp;ldquo;I&amp;rdquo; and &amp;ldquo;am.&amp;rdquo;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;And if we can imagine that consciousness arises in dream people in &amp;ldquo;upscaled resolution,&amp;rdquo; why couldn’t consciousness also arise in the symmetrical case of &amp;ldquo;downscaled resolution&amp;rdquo; in dreams?&lt;/p&gt;
&lt;p&gt;As a final point, outward &amp;ldquo;resolution&amp;rdquo; gives us no knowledge of the inner workings of a thing. Just because a thing does not have many outward details does not mean it is not intricate. A video game producer might decide to have worse graphics but better AI in the non-playable characters (NPCs) as a performance trade-off. Or a phone might look simple on the outside, but its inner workings couldn&amp;rsquo;t be further from the truth. The same could be true for dream people: they might have &amp;ldquo;lower resolution&amp;rdquo; in appearance and mannerisms, but have an impressive inner life.&lt;/p&gt;
&lt;p&gt;I do not argue that dream people are conscious (see the next section for this). Instead, I argue that just because the &amp;ldquo;resolution is lower&amp;rdquo; for dream people does not mean we can exclude the possibility that they are conscious.&lt;/p&gt;
&lt;h2 id="the-philosophical-zombie-or-why-we-should-assume-dream-people-are-conscious-even-if-they-are-not"&gt;The Philosophical Zombie: Or Why We Should Assume Dream People Are Conscious, Even If They Are Not&lt;/h2&gt;
&lt;p&gt;A &lt;a href="https://en.wikipedia.org/wiki/Philosophical_zombie"&gt;philosophical zombie&lt;/a&gt; is a thought experiment in which there is a human who is completely normal and the same as every other human, except for one aspect: they are not conscious. A philosophical zombie, just like a normal human, can react to stimuli with actions, hold conversations, do a handstand, and go to work every day.&lt;/p&gt;
&lt;p&gt;One basic question we might ask is: how do you know that other humans, e.g., your friends, family, or even complete strangers, are conscious and not just philosophical zombies that act as if they are conscious?&lt;/p&gt;
&lt;p&gt;This problem exists because we can only observe the outside of other humans but have no tools to inquire into their inner lives. We may see that they are engaged in an active conversation, but we don’t know if, while doing this, they are conscious—i.e., aware of themselves.&lt;/p&gt;
&lt;p&gt;We do have various tests that can check how conscious a being is. For example, the &lt;a href="https://en.wikipedia.org/wiki/Mirror_test"&gt;mirror test&lt;/a&gt; can be used to test if an animal recognizes itself. But in the end, all we measure is their behavior, outward indicators, never truly piercing the veil to the inner life.&lt;/p&gt;
&lt;p&gt;The question of when something is conscious is of utmost importance if one defines personhood as the &lt;em&gt;capacity for consciousness&lt;/em&gt;. For example, if a dog whimpers or yelps when hurt, we don’t know if this is simply a reaction to a stimulus, like a sunflower turning to face the sun, or if the dog has an actual subjective experience of being and pain.&lt;/p&gt;
&lt;p&gt;Nonetheless, whether a thing is conscious or not lies at the bedrock of our moral theory. Every day, we make moral decisions about people and animals, even if we do not know if a thing is conscious or not. So how do we decide if a thing deserves moral consideration? Why do we believe that other humans are conscious? Or that intelligent animals, like dolphins, possess a low form of consciousness and, with that, some moral consideration?&lt;/p&gt;
&lt;p&gt;We do it based on outward behavior. I do not have any guarantee that the reader reading this is conscious or not, but I can say that you are probably similar to me both in what we are and in our behavior. Since I know that I am conscious and we are roughly similar to each other, I can assume you are conscious or at least act like you are. The same goes for animals. We make various behavioral tests and can see that a dolphin recognizes itself in the mirror, that &lt;a href="https://www.huffpost.com/entry/dolphin-commits-suicide_n_5491513"&gt;dolphins may commit suicide&lt;/a&gt;, that &lt;a href="https://www.smithsonianmag.com/smart-news/dolphins-seem-to-use-toxic-pufferfish-to-get-high-180948219/"&gt;dolphins use pufferfish to get high&lt;/a&gt;, &lt;a href="https://www.mpg.de/19793111/0125-ornr-cooperation-between-dolphins-and-humans-987453-x"&gt;dolphins cooperate with humans&lt;/a&gt;, and many more behaviors we recognize as things we humans do. And just like with humans, we extrapolate from that that they are, to some extent, conscious.&lt;/p&gt;
&lt;p&gt;We can do the same thing regarding dream people. If in a dream I am an action hero, fighting against villains, and I shoot them, I can see the dream people call out in pain and fall to the ground. I can talk to them, hold conversations, and so on. All of this is to say that dream people exhibit behaviors we would expect from conscious agents, and since we do not have a reliable way to investigate whether something is conscious or not, all that leaves us to decide that, is their behavior.&lt;/p&gt;
&lt;p&gt;Or, in other words, from the &lt;a href="https://en.wikipedia.org/wiki/Duck_test"&gt;duck test&lt;/a&gt;: If it looks like a duck, swims like a duck, and quacks like a duck, then it probably is a duck.&lt;/p&gt;
&lt;p&gt;Because the only other alternative is to live in epistemological nihilism, embracing &lt;a href="https://en.wikipedia.org/wiki/Solipsism"&gt;solipsism&lt;/a&gt;, and just assume the only conscious agent is me and me alone.&lt;/p&gt;
&lt;h2 id="imagining-people-vs-dream-people"&gt;Imagining People vs. Dream People&lt;/h2&gt;
&lt;p&gt;Lastly, I want to mention a problem that arises if one thinks that dream people have personhood, i.e., moral consideration. This problem concerns the differentiation between dream people and imagined people. If one day you day-dream or rehash an old conversation, the mind may conjure up an imagined person with whom you have the conversation.&lt;/p&gt;
&lt;p&gt;But just like I asked what the distinction between dream people and &amp;ldquo;real&amp;rdquo; people is, I can ask the same about imagined people and dream people. The only thing that comes to mind is that the latter feel more part of you than the former. But one could argue that this is the exact problematic issue already discussed in the section &lt;a href="#conciousness-in-conciousness-information-flow-and-ownership"&gt;&amp;ldquo;Consciousness in Consciousness: Information Flow and Ownership&amp;rdquo;&lt;/a&gt;. The imagined person feels more intimate because the information flow is bigger, but as already discussed, this is not a &lt;em&gt;relevant moral factor&lt;/em&gt;. As such, if we grant dream people moral consideration, we would need to do the same for imagined people for the sake of consistency.&lt;/p&gt;
&lt;p&gt;Just like with dream people, there might be an escape. One can argue that the interests of imagined people more closely align with one&amp;rsquo;s own. As such, most things I do to them are in their interest. But this is just an assumption. The interests of both dream and imagined people is an epistemological question, and I will not further inquire into it.&lt;/p&gt;
&lt;h1 id="conclusion"&gt;Conclusion&lt;/h1&gt;
&lt;p&gt;So, what have we learned?&lt;/p&gt;
&lt;p&gt;There is no real principle that differentiates &amp;ldquo;real&amp;rdquo; people from people in dreams. The only thing we can hope for is that dream people are not conscious, but even for that, it is not clear how one determines that. Maybe, just like we assume with animals of higher intelligence, like dolphins, that they are conscious to a certain extent, we should do the same with dream people. Thus, granting dream people some form of moral consideration. I didn’t scrutinize what rights exactly they should be granted or need, as this depends on their interests, as mentioned in the first section of this article. This seems even more difficult to explore than whether they have consciousness or not.&lt;/p&gt;
&lt;p&gt;But I hope I made you think, and that next time you plan to hurt a dream person, you’ll think twice.&lt;/p&gt;
&lt;p&gt;Looking back at the dream I had that I mentioned at the beginning, I wonder if waking up instead of continuing the dream (not like I had the choice) was an act of mercy. Because she never had to experience her agonizing death; instead, she just vanished out of existence. But maybe this too is just forcing my human notion of what &lt;em&gt;good&lt;/em&gt; and &lt;em&gt;bad&lt;/em&gt; are onto the dream person’s worldview, which would feel completely alien to us. Because maybe, by waking up, I exactly destroyed her interest for which she was created.&lt;/p&gt;


&lt;figure&gt;
 &lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width: 60%" src="https://monkemanx.github.io/attachments/dream2.jpg"&gt;
&lt;/figure&gt;


&lt;hr&gt;
&lt;p&gt;Ressources:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Active Inference: The Free Energy Principle in Mind, Brain, and Behavior&lt;/li&gt;
&lt;li&gt;&lt;a href="https://writing.rochester.edu/celebrating/2017/NAShonorable.pdf"&gt;The Connection Between Intelligence and Consciousness&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.thecollector.com/arthur-schopenhauers-idealism-is-our-world-just-a-dream/"&gt;Our World just a dream&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>Family Pets/Animals</title><link>https://monkemanx.github.io/articles/pets/</link><pubDate>Tue, 10 Dec 2024 00:00:00 +0000</pubDate><author>monkeman@cock.li (MonkeMan)</author><guid>https://monkemanx.github.io/articles/pets/</guid><description>&lt;p&gt;Recently, I had the idea to make a list of all the important animals and pets that my family has had. I’m not sure why I felt the impulse to do it; I guess it’s a form of remembrance.&lt;/p&gt;
&lt;h1 id="pets-and-animals"&gt;Pets and Animals&lt;/h1&gt;
&lt;h2 id="doggo-balu"&gt;Doggo Balu&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Name:&lt;/strong&gt; Balu&lt;br&gt;
&lt;strong&gt;Species:&lt;/strong&gt; Dog&lt;br&gt;
&lt;strong&gt;Notes:&lt;/strong&gt;&lt;br&gt;
This was the dog of my mother and grandparents. I don’t know much about the dog, as it passed away when I was very young.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Gallery:&lt;/strong&gt;&lt;/p&gt;







	






































	
	

	
		&lt;script src="https://monkemanx.github.io/shortcode-gallery/jquery-3.7.1.min.js"&gt;&lt;/script&gt;
	

	

	&lt;script src="https://monkemanx.github.io/shortcode-gallery/swipebox/js/jquery.swipebox.min.js"&gt;&lt;/script&gt;
	&lt;link rel="stylesheet" href="https://monkemanx.github.io/shortcode-gallery/swipebox/css/swipebox.min.css"&gt;

	&lt;script src="https://monkemanx.github.io/shortcode-gallery/justified_gallery/jquery.justifiedGallery.min.js"&gt;&lt;/script&gt;
	&lt;link rel="stylesheet" href="https://monkemanx.github.io/shortcode-gallery/justified_gallery/justifiedGallery.min.css"/&gt;


&lt;style&gt;
	

	
&lt;/style&gt;





&lt;div id="gallery-39169233936f33ba953746740abc21d4-0-wrapper" class="gallery-wrapper"&gt;
&lt;div id="gallery-39169233936f33ba953746740abc21d4-0" class="justified-gallery"&gt;
	
		

			
			

			
			
				
			

			
				
			

			
			
				
					
				
			


			
			

			&lt;div&gt;
				
				
					
					
				

				
				
					
					
				

				&lt;a href="https://monkemanx.github.io/animals/old_dog/SAM_2112.JPG"
					class="galleryImg"
					
					&gt;
					&lt;img
						width="600" height="450"

						
							src="https://monkemanx.github.io/animals/old_dog/SAM_2112_hu_42062ba3ec473543.JPG"
						

						
					&gt;
				&lt;/a&gt;
			&lt;/div&gt;
		
	
		

			
			

			
			
				
			

			
				
			

			
			
				
					
				
			


			
			

			&lt;div&gt;
				
				
					
					
				

				
				
					
					
				

				&lt;a href="https://monkemanx.github.io/animals/old_dog/SAM_2120.JPG"
					class="galleryImg"
					
					&gt;
					&lt;img
						width="600" height="450"

						
							src="https://monkemanx.github.io/animals/old_dog/SAM_2120_hu_56af7999b70724ae.JPG"
						

						
					&gt;
				&lt;/a&gt;
			&lt;/div&gt;
		
	
&lt;/div&gt;
&lt;/div&gt;

&lt;script&gt;
	if (!("HSCGjQuery" in window)) {
		if (!window.jQuery) {
			throw new Error("jQuery is not loaded, hugo-shortcode-gallery wont work without it!");
		}
		window.HSCGjQuery = window.jQuery.noConflict(true);
	}

	
	
	
	
	
	;(function($) {

		$( document ).ready(() =&gt; {
			const gallery = $("#gallery-39169233936f33ba953746740abc21d4-0");
			

			
			let swipeboxInstance = null;

			
			
			gallery.on('jg.complete', () =&gt; {
				

				swipeboxInstance = $('.galleryImg').swipebox(
					$.extend({},
						{ }
					)
				);
			});

			
			gallery.justifiedGallery($.extend(
				{
					rowHeight : "150",
					margins : "5",
					border : 0,
					randomize : false ,
					waitThumbnailsLoad : false,
					lastRow : "justify",
					captions : false,
					
					
				},
				{ }
			));

			
			
		});

	
	
	
	})(window.HSCGjQuery)
&lt;/script&gt;

&lt;h2 id="first-group-of-chickens"&gt;First Group of Chickens&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Name:&lt;/strong&gt; / &lt;br&gt;
&lt;strong&gt;Species:&lt;/strong&gt; Chicken&lt;br&gt;
&lt;strong&gt;Notes:&lt;/strong&gt;&lt;br&gt;
I live in a small village. From time to time, a traveling chicken salesman comes to our village; this is where my family bought them.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Gallery:&lt;/strong&gt;&lt;/p&gt;







	







































&lt;style&gt;
	

	
&lt;/style&gt;





&lt;div id="gallery-39169233936f33ba953746740abc21d4-1-wrapper" class="gallery-wrapper"&gt;
&lt;div id="gallery-39169233936f33ba953746740abc21d4-1" class="justified-gallery"&gt;
	
		

			
			

			
			
				
			

			
				
			

			
			
				
					
				
			


			
			

			&lt;div&gt;
				
				
					
					
				

				
				
					
					
				

				&lt;a href="https://monkemanx.github.io/animals/chicken_1/100_2326.JPG"
					class="galleryImg"
					
					&gt;
					&lt;img
						width="600" height="400"

						
							src="https://monkemanx.github.io/animals/chicken_1/100_2326_hu_bae1a9e24e9e0690.JPG"
						

						
					&gt;
				&lt;/a&gt;
			&lt;/div&gt;
		
	
		

			
			

			
			
				
			

			
				
			

			
			
				
					
				
			


			
			

			&lt;div&gt;
				
				
					
					
				

				
				
					
					
				

				&lt;a href="https://monkemanx.github.io/animals/chicken_1/100_2328.JPG"
					class="galleryImg"
					
					&gt;
					&lt;img
						width="600" height="400"

						
							src="https://monkemanx.github.io/animals/chicken_1/100_2328_hu_1f7c5ae227a5ee7b.JPG"
						

						
					&gt;
				&lt;/a&gt;
			&lt;/div&gt;
		
	
		
	
&lt;/div&gt;
&lt;/div&gt;

&lt;script&gt;
	if (!("HSCGjQuery" in window)) {
		if (!window.jQuery) {
			throw new Error("jQuery is not loaded, hugo-shortcode-gallery wont work without it!");
		}
		window.HSCGjQuery = window.jQuery.noConflict(true);
	}

	
	
	
	
	
	;(function($) {

		$( document ).ready(() =&gt; {
			const gallery = $("#gallery-39169233936f33ba953746740abc21d4-1");
			

			
			let swipeboxInstance = null;

			
			
			gallery.on('jg.complete', () =&gt; {
				

				swipeboxInstance = $('.galleryImg').swipebox(
					$.extend({},
						{ }
					)
				);
			});

			
			gallery.justifiedGallery($.extend(
				{
					rowHeight : "150",
					margins : "5",
					border : 0,
					randomize : false ,
					waitThumbnailsLoad : false,
					lastRow : "justify",
					captions : false,
					
					
				},
				{ }
			));

			
			
		});

	
	
	
	})(window.HSCGjQuery)
&lt;/script&gt;

&lt;h2 id="bees"&gt;Bee&amp;rsquo;s&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Name:&lt;/strong&gt; /&lt;br&gt;
&lt;strong&gt;Species:&lt;/strong&gt; Bees &lt;br&gt;
&lt;strong&gt;Notes:&lt;/strong&gt;&lt;br&gt;
My father is a beekeeper; he does it as a hobby but also sells the honey to friends and acquaintances. The honey is very yummy. Twice a year, you can extract the honey by putting the honeycombs in a centrifuge, which slings the honey out of the comb, and it can then be collected.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Gallery:&lt;/strong&gt;&lt;/p&gt;







	







































&lt;style&gt;
	

	
&lt;/style&gt;





&lt;div id="gallery-39169233936f33ba953746740abc21d4-2-wrapper" class="gallery-wrapper"&gt;
&lt;div id="gallery-39169233936f33ba953746740abc21d4-2" class="justified-gallery"&gt;
	
		

			
			

			
			
				
			

			
				
			

			
			
				
					
				
			


			
			

			&lt;div&gt;
				
				
					
					
				

				
				
					
					
				

				&lt;a href="https://monkemanx.github.io/animals/bee/IMG_20160507_130941804.jpg"
					class="galleryImg"
					
					&gt;
					&lt;img
						width="600" height="337"

						
							src="https://monkemanx.github.io/animals/bee/IMG_20160507_130941804_hu_ca672ef2d23189a2.jpg"
						

						
					&gt;
				&lt;/a&gt;
			&lt;/div&gt;
		
	
		

			
			

			
			
				
			

			
				
			

			
			
				
					
				
			


			
			

			&lt;div&gt;
				
				
					
					
				

				
				
					
					
				

				&lt;a href="https://monkemanx.github.io/animals/bee/IMG_20160816_182406494.jpg"
					class="galleryImg"
					
					&gt;
					&lt;img
						width="600" height="337"

						
							src="https://monkemanx.github.io/animals/bee/IMG_20160816_182406494_hu_400529aa8b62854a.jpg"
						

						
					&gt;
				&lt;/a&gt;
			&lt;/div&gt;
		
	
		

			
			

			
			
				
			

			
				
			

			
			
				
					
				
			


			
			

			&lt;div&gt;
				
				
					
					
				

				
				
					
					
				

				&lt;a href="https://monkemanx.github.io/animals/bee/IMG_20190717_075121517.jpg"
					class="galleryImg"
					
					&gt;
					&lt;img
						width="600" height="338"

						
							src="https://monkemanx.github.io/animals/bee/IMG_20190717_075121517_hu_a8e42395f5ec48c0.jpg"
						

						
					&gt;
				&lt;/a&gt;
			&lt;/div&gt;
		
	
		

			
			

			
			
				
			

			
				
			

			
			
				
					
				
			


			
			

			&lt;div&gt;
				
				
					
					
				

				
				
					
					
				

				&lt;a href="https://monkemanx.github.io/animals/bee/IMG_20200425_141829258.jpg"
					class="galleryImg"
					
					&gt;
					&lt;img
						width="600" height="450"

						
							src="https://monkemanx.github.io/animals/bee/IMG_20200425_141829258_hu_efd4cd8263e433f8.jpg"
						

						
					&gt;
				&lt;/a&gt;
			&lt;/div&gt;
		
	
&lt;/div&gt;
&lt;/div&gt;

&lt;script&gt;
	if (!("HSCGjQuery" in window)) {
		if (!window.jQuery) {
			throw new Error("jQuery is not loaded, hugo-shortcode-gallery wont work without it!");
		}
		window.HSCGjQuery = window.jQuery.noConflict(true);
	}

	
	
	
	
	
	;(function($) {

		$( document ).ready(() =&gt; {
			const gallery = $("#gallery-39169233936f33ba953746740abc21d4-2");
			

			
			let swipeboxInstance = null;

			
			
			gallery.on('jg.complete', () =&gt; {
				

				swipeboxInstance = $('.galleryImg').swipebox(
					$.extend({},
						{ }
					)
				);
			});

			
			gallery.justifiedGallery($.extend(
				{
					rowHeight : "150",
					margins : "5",
					border : 0,
					randomize : false ,
					waitThumbnailsLoad : false,
					lastRow : "justify",
					captions : false,
					
					
				},
				{ }
			));

			
			
		});

	
	
	
	})(window.HSCGjQuery)
&lt;/script&gt;

&lt;h2 id="flocke"&gt;Flocke&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Name:&lt;/strong&gt; Flocke&lt;br&gt;
&lt;strong&gt;Species:&lt;/strong&gt; Cat&lt;br&gt;
&lt;strong&gt;Notes:&lt;/strong&gt;&lt;br&gt;
Our first family cat was named &amp;lsquo;Flocke,&amp;rsquo; which is German and means &amp;lsquo;flake,&amp;rsquo; like a snowflake in English. The cat lived to be very old, almost 20 years. Flocke wasn’t very trusting of me; she was a bit grumpy and slept all day. Though, I can understand the trust issues, because when I was a child, I pulled the cat by its tail from beneath a wardrobe.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Gallery:&lt;/strong&gt;&lt;/p&gt;







	







































&lt;style&gt;
	

	
&lt;/style&gt;





&lt;div id="gallery-39169233936f33ba953746740abc21d4-3-wrapper" class="gallery-wrapper"&gt;
&lt;div id="gallery-39169233936f33ba953746740abc21d4-3" class="justified-gallery"&gt;
	
		

			
			

			
			
				
			

			
				
			

			
			
				
					
				
			


			
			

			&lt;div&gt;
				
				
					
					
				

				
				
					
					
				

				&lt;a href="https://monkemanx.github.io/animals/flocke/IMG_20181117_182156262.jpg"
					class="galleryImg"
					
					&gt;
					&lt;img
						width="600" height="338"

						
							src="https://monkemanx.github.io/animals/flocke/IMG_20181117_182156262_hu_16d5657fa88a2050.jpg"
						

						
					&gt;
				&lt;/a&gt;
			&lt;/div&gt;
		
	
		

			
			

			
			
				
			

			
				
			

			
			
				
			


			
			

			&lt;div&gt;
				
				
					
					
				

				
				
					
					
				

				&lt;a href="https://monkemanx.github.io/animals/flocke/IMG-20150217-WA0002.jpg"
					class="galleryImg"
					
					&gt;
					&lt;img
						width="600" height="337"

						
							src="https://monkemanx.github.io/animals/flocke/IMG-20150217-WA0002_hu_dd8b814a23516c93.jpg"
						

						
					&gt;
				&lt;/a&gt;
			&lt;/div&gt;
		
	
		

			
			

			
			
				
			

			
				
			

			
			
				
			


			
			

			&lt;div&gt;
				
				
					
					
				

				
				
					
					
				

				&lt;a href="https://monkemanx.github.io/animals/flocke/IMG-20160214-WA0002.jpg"
					class="galleryImg"
					
					&gt;
					&lt;img
						width="600" height="450"

						
							src="https://monkemanx.github.io/animals/flocke/IMG-20160214-WA0002_hu_934d6824b8a9c1c3.jpg"
						

						
					&gt;
				&lt;/a&gt;
			&lt;/div&gt;
		
	
		

			
			

			
			
				
			

			
				
			

			
			
				
			


			
			

			&lt;div&gt;
				
				
					
					
				

				
				
					
					
				

				&lt;a href="https://monkemanx.github.io/animals/flocke/IMG-20180326-WA0001.jpg"
					class="galleryImg"
					
					&gt;
					&lt;img
						width="338" height="600"

						
							src="https://monkemanx.github.io/animals/flocke/IMG-20180326-WA0001_hu_d778304f15aafc7d.jpg"
						

						
					&gt;
				&lt;/a&gt;
			&lt;/div&gt;
		
	
		

			
			

			
			
				
			

			
				
			

			
			
				
			


			
			

			&lt;div&gt;
				
				
					
					
				

				
				
					
					
				

				&lt;a href="https://monkemanx.github.io/animals/flocke/IMG-20200114-WA0007.jpg"
					class="galleryImg"
					
					&gt;
					&lt;img
						width="337" height="600"

						
							src="https://monkemanx.github.io/animals/flocke/IMG-20200114-WA0007_hu_47bb4af915382f8c.jpg"
						

						
					&gt;
				&lt;/a&gt;
			&lt;/div&gt;
		
	
&lt;/div&gt;
&lt;/div&gt;

&lt;script&gt;
	if (!("HSCGjQuery" in window)) {
		if (!window.jQuery) {
			throw new Error("jQuery is not loaded, hugo-shortcode-gallery wont work without it!");
		}
		window.HSCGjQuery = window.jQuery.noConflict(true);
	}

	
	
	
	
	
	;(function($) {

		$( document ).ready(() =&gt; {
			const gallery = $("#gallery-39169233936f33ba953746740abc21d4-3");
			

			
			let swipeboxInstance = null;

			
			
			gallery.on('jg.complete', () =&gt; {
				

				swipeboxInstance = $('.galleryImg').swipebox(
					$.extend({},
						{ }
					)
				);
			});

			
			gallery.justifiedGallery($.extend(
				{
					rowHeight : "150",
					margins : "5",
					border : 0,
					randomize : false ,
					waitThumbnailsLoad : false,
					lastRow : "justify",
					captions : false,
					
					
				},
				{ }
			));

			
			
		});

	
	
	
	})(window.HSCGjQuery)
&lt;/script&gt;

&lt;h2 id="luna"&gt;Luna&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Name:&lt;/strong&gt; Luna&lt;br&gt;
&lt;strong&gt;Species:&lt;/strong&gt; Dog&lt;br&gt;
&lt;strong&gt;Notes:&lt;/strong&gt;&lt;br&gt;
Luna, which is Latin for &amp;lsquo;Moon,&amp;rsquo; was a Labrador. We went on many adventures with her, whether we were hiking or traveling. Just like the cat, Luna became a bit grumpier as she got older. Luna loved to eat; if there was any food on the ground, she would scarf it down as if there were no tomorrow.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Gallery:&lt;/strong&gt;&lt;/p&gt;







	







































&lt;style&gt;
	

	
&lt;/style&gt;





&lt;div id="gallery-39169233936f33ba953746740abc21d4-4-wrapper" class="gallery-wrapper"&gt;
&lt;div id="gallery-39169233936f33ba953746740abc21d4-4" class="justified-gallery"&gt;
	
		

			
			

			
			
				
			

			
				
			

			
			
				
					
				
			


			
			

			&lt;div&gt;
				
				
					
					
				

				
				
					
					
				

				&lt;a href="https://monkemanx.github.io/animals/luna/BILD0027.JPG"
					class="galleryImg"
					
					&gt;
					&lt;img
						width="600" height="450"

						
							src="https://monkemanx.github.io/animals/luna/BILD0027_hu_cea5d53d9401d20a.JPG"
						

						
					&gt;
				&lt;/a&gt;
			&lt;/div&gt;
		
	
		

			
			

			
			
				
			

			
				
			

			
			
				
					
				
			


			
			

			&lt;div&gt;
				
				
					
					
				

				
				
					
					
				

				&lt;a href="https://monkemanx.github.io/animals/luna/BILD0427.JPG"
					class="galleryImg"
					
					&gt;
					&lt;img
						width="600" height="450"

						
							src="https://monkemanx.github.io/animals/luna/BILD0427_hu_f356bef7879c7717.JPG"
						

						
					&gt;
				&lt;/a&gt;
			&lt;/div&gt;
		
	
		

			
			

			
			
				
			

			
				
			

			
			
				
					
				
			


			
			

			&lt;div&gt;
				
				
					
					
				

				
				
					
					
				

				&lt;a href="https://monkemanx.github.io/animals/luna/CIMG0177.JPG"
					class="galleryImg"
					
					&gt;
					&lt;img
						width="600" height="450"

						
							src="https://monkemanx.github.io/animals/luna/CIMG0177_hu_5a27d606ff7537a1.JPG"
						

						
					&gt;
				&lt;/a&gt;
			&lt;/div&gt;
		
	
		
	
		

			
			

			
			
				
			

			
				
			

			
			
				
					
				
			


			
			

			&lt;div&gt;
				
				
					
					
				

				
				
					
					
				

				&lt;a href="https://monkemanx.github.io/animals/luna/IMG_0040.JPG"
					class="galleryImg"
					
					&gt;
					&lt;img
						width="600" height="450"

						
							src="https://monkemanx.github.io/animals/luna/IMG_0040_hu_2c137f9eadd9f49a.JPG"
						

						
					&gt;
				&lt;/a&gt;
			&lt;/div&gt;
		
	
		

			
			

			
			
				
			

			
				
			

			
			
				
					
				
			


			
			

			&lt;div&gt;
				
				
					
					
				

				
				
					
					
				

				&lt;a href="https://monkemanx.github.io/animals/luna/IMG_20150412_165319200.jpg"
					class="galleryImg"
					
					&gt;
					&lt;img
						width="600" height="337"

						
							src="https://monkemanx.github.io/animals/luna/IMG_20150412_165319200_hu_79964ec0eee15188.jpg"
						

						
					&gt;
				&lt;/a&gt;
			&lt;/div&gt;
		
	
		

			
			

			
			
				
			

			
				
			

			
			
				
					
				
			


			
			

			&lt;div&gt;
				
				
					
					
				

				
				
					
					
				

				&lt;a href="https://monkemanx.github.io/animals/luna/IMG_20150529_155339698.jpg"
					class="galleryImg"
					
					&gt;
					&lt;img
						width="337" height="600"

						
							src="https://monkemanx.github.io/animals/luna/IMG_20150529_155339698_hu_380922bed200f619.jpg"
						

						
					&gt;
				&lt;/a&gt;
			&lt;/div&gt;
		
	
		

			
			

			
			
				
			

			
				
			

			
			
				
					
				
			


			
			

			&lt;div&gt;
				
				
					
					
				

				
				
					
					
				

				&lt;a href="https://monkemanx.github.io/animals/luna/IMG_20150815_115910950.jpg"
					class="galleryImg"
					
					&gt;
					&lt;img
						width="600" height="337"

						
							src="https://monkemanx.github.io/animals/luna/IMG_20150815_115910950_hu_e455ccf5ddc358b.jpg"
						

						
					&gt;
				&lt;/a&gt;
			&lt;/div&gt;
		
	
		

			
			

			
			
				
			

			
				
			

			
			
				
					
				
			


			
			

			&lt;div&gt;
				
				
					
					
				

				
				
					
					
				

				&lt;a href="https://monkemanx.github.io/animals/luna/IMG_20160203_082842654.jpg"
					class="galleryImg"
					
					&gt;
					&lt;img
						width="600" height="337"

						
							src="https://monkemanx.github.io/animals/luna/IMG_20160203_082842654_hu_f58b07df2cba2ec3.jpg"
						

						
					&gt;
				&lt;/a&gt;
			&lt;/div&gt;
		
	
		

			
			

			
			
				
			

			
				
			

			
			
				
					
				
			


			
			

			&lt;div&gt;
				
				
					
					
				

				
				
					
					
				

				&lt;a href="https://monkemanx.github.io/animals/luna/IMG_20160415_144724143.jpg"
					class="galleryImg"
					
					&gt;
					&lt;img
						width="337" height="600"

						
							src="https://monkemanx.github.io/animals/luna/IMG_20160415_144724143_hu_f4bca8a13132bc6a.jpg"
						

						
					&gt;
				&lt;/a&gt;
			&lt;/div&gt;
		
	
		

			
			

			
			
				
			

			
				
			

			
			
				
					
				
			


			
			

			&lt;div&gt;
				
				
					
					
				

				
				
					
					
				

				&lt;a href="https://monkemanx.github.io/animals/luna/IMG_20161001_073814163.jpg"
					class="galleryImg"
					
					&gt;
					&lt;img
						width="600" height="337"

						
							src="https://monkemanx.github.io/animals/luna/IMG_20161001_073814163_hu_e5dc2b0a58006742.jpg"
						

						
					&gt;
				&lt;/a&gt;
			&lt;/div&gt;
		
	
		

			
			

			
			
				
			

			
				
			

			
			
				
					
				
			


			
			

			&lt;div&gt;
				
				
					
					
				

				
				
					
					
				

				&lt;a href="https://monkemanx.github.io/animals/luna/IMG-20150326-WA0000.jpg"
					class="galleryImg"
					
					&gt;
					&lt;img
						width="600" height="337"

						
							src="https://monkemanx.github.io/animals/luna/IMG-20150326-WA0000_hu_46fa57f9fb61b6a5.jpg"
						

						
					&gt;
				&lt;/a&gt;
			&lt;/div&gt;
		
	
		

			
			

			
			
				
			

			
				
			

			
			
				
			


			
			

			&lt;div&gt;
				
				
					
					
				

				
				
					
					
				

				&lt;a href="https://monkemanx.github.io/animals/luna/IMG-20220221-WA0000.jpg"
					class="galleryImg"
					
					&gt;
					&lt;img
						width="600" height="600"

						
							src="https://monkemanx.github.io/animals/luna/IMG-20220221-WA0000_hu_bb8bf7773562546c.jpg"
						

						
					&gt;
				&lt;/a&gt;
			&lt;/div&gt;
		
	
		

			
			

			
			
				
			

			
				
			

			
			
				
					
				
			


			
			

			&lt;div&gt;
				
				
					
					
				

				
				
					
					
				

				&lt;a href="https://monkemanx.github.io/animals/luna/P1020903.JPG"
					class="galleryImg"
					
					&gt;
					&lt;img
						width="600" height="398"

						
							src="https://monkemanx.github.io/animals/luna/P1020903_hu_fd625be4e970bc01.JPG"
						

						
					&gt;
				&lt;/a&gt;
			&lt;/div&gt;
		
	
		

			
			

			
			
				
			

			
				
			

			
			
				
					
				
			


			
			

			&lt;div&gt;
				
				
					
					
				

				
				
					
					
				

				&lt;a href="https://monkemanx.github.io/animals/luna/P1040317.JPG"
					class="galleryImg"
					
					&gt;
					&lt;img
						width="600" height="398"

						
							src="https://monkemanx.github.io/animals/luna/P1040317_hu_5a41a43a75e4a34e.JPG"
						

						
					&gt;
				&lt;/a&gt;
			&lt;/div&gt;
		
	
&lt;/div&gt;
&lt;/div&gt;

&lt;script&gt;
	if (!("HSCGjQuery" in window)) {
		if (!window.jQuery) {
			throw new Error("jQuery is not loaded, hugo-shortcode-gallery wont work without it!");
		}
		window.HSCGjQuery = window.jQuery.noConflict(true);
	}

	
	
	
	
	
	;(function($) {

		$( document ).ready(() =&gt; {
			const gallery = $("#gallery-39169233936f33ba953746740abc21d4-4");
			

			
			let swipeboxInstance = null;

			
			
			gallery.on('jg.complete', () =&gt; {
				

				swipeboxInstance = $('.galleryImg').swipebox(
					$.extend({},
						{ }
					)
				);
			});

			
			gallery.justifiedGallery($.extend(
				{
					rowHeight : "150",
					margins : "5",
					border : 0,
					randomize : false ,
					waitThumbnailsLoad : false,
					lastRow : "justify",
					captions : false,
					
					
				},
				{ }
			));

			
			
		});

	
	
	
	})(window.HSCGjQuery)
&lt;/script&gt;

&lt;h2 id="lumithai"&gt;Lumithai&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Name:&lt;/strong&gt; Lumithai&lt;br&gt;
&lt;strong&gt;Species:&lt;/strong&gt; Cat&lt;br&gt;
&lt;strong&gt;Notes:&lt;/strong&gt;&lt;br&gt;
This is the cat my older sister wanted. I always called the cat &amp;lsquo;Dummi,&amp;rsquo; meaning &amp;lsquo;dumb&amp;rsquo; in English, both to tease my sister and because the cat&amp;rsquo;s name was too long. This cat was so trusting that you could almost do anything with him, and he wouldn’t care. Lumi also loved to go on walks with Luna. Sadly, the cat died too young, just a little over 10 years old.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Gallery:&lt;/strong&gt;&lt;/p&gt;







	







































&lt;style&gt;
	

	
&lt;/style&gt;





&lt;div id="gallery-39169233936f33ba953746740abc21d4-5-wrapper" class="gallery-wrapper"&gt;
&lt;div id="gallery-39169233936f33ba953746740abc21d4-5" class="justified-gallery"&gt;
	
		

			
			

			
			
				
			

			
				
			

			
			
				
					
				
			


			
			

			&lt;div&gt;
				
				
					
					
				

				
				
					
					
				

				&lt;a href="https://monkemanx.github.io/animals/dumi/IMG_20141101_212226530.jpg"
					class="galleryImg"
					
					&gt;
					&lt;img
						width="600" height="337"

						
							src="https://monkemanx.github.io/animals/dumi/IMG_20141101_212226530_hu_e1406050cd219201.jpg"
						

						
					&gt;
				&lt;/a&gt;
			&lt;/div&gt;
		
	
		

			
			

			
			
				
			

			
				
			

			
			
				
					
				
			


			
			

			&lt;div&gt;
				
				
					
					
				

				
				
					
					
				

				&lt;a href="https://monkemanx.github.io/animals/dumi/IMG_20150520_192805110.jpg"
					class="galleryImg"
					
					&gt;
					&lt;img
						width="600" height="337"

						
							src="https://monkemanx.github.io/animals/dumi/IMG_20150520_192805110_hu_a2739757c37191e1.jpg"
						

						
					&gt;
				&lt;/a&gt;
			&lt;/div&gt;
		
	
		

			
			

			
			
				
			

			
				
			

			
			
				
					
				
			


			
			

			&lt;div&gt;
				
				
					
					
				

				
				
					
					
				

				&lt;a href="https://monkemanx.github.io/animals/dumi/IMG_20150619_142309713.jpg"
					class="galleryImg"
					
					&gt;
					&lt;img
						width="600" height="337"

						
							src="https://monkemanx.github.io/animals/dumi/IMG_20150619_142309713_hu_4e436d2610b5f838.jpg"
						

						
					&gt;
				&lt;/a&gt;
			&lt;/div&gt;
		
	
		

			
			

			
			
				
			

			
				
			

			
			
				
					
				
			


			
			

			&lt;div&gt;
				
				
					
					
				

				
				
					
					
				

				&lt;a href="https://monkemanx.github.io/animals/dumi/IMG_20160104_182141203.jpg"
					class="galleryImg"
					
					&gt;
					&lt;img
						width="600" height="337"

						
							src="https://monkemanx.github.io/animals/dumi/IMG_20160104_182141203_hu_c57c3e6e4676211f.jpg"
						

						
					&gt;
				&lt;/a&gt;
			&lt;/div&gt;
		
	
		

			
			

			
			
				
			

			
				
			

			
			
				
					
				
			


			
			

			&lt;div&gt;
				
				
					
					
				

				
				
					
					
				

				&lt;a href="https://monkemanx.github.io/animals/dumi/IMG_20160803_120502421.jpg"
					class="galleryImg"
					
					&gt;
					&lt;img
						width="600" height="337"

						
							src="https://monkemanx.github.io/animals/dumi/IMG_20160803_120502421_hu_40cbb51cd8dfca30.jpg"
						

						
					&gt;
				&lt;/a&gt;
			&lt;/div&gt;
		
	
		

			
			

			
			
				
			

			
				
			

			
			
				
					
				
			


			
			

			&lt;div&gt;
				
				
					
					
				

				
				
					
					
				

				&lt;a href="https://monkemanx.github.io/animals/dumi/IMG_20200723_065219.jpg"
					class="galleryImg"
					
					&gt;
					&lt;img
						width="450" height="600"

						
							src="https://monkemanx.github.io/animals/dumi/IMG_20200723_065219_hu_ad4f00dbb95dd429.jpg"
						

						
					&gt;
				&lt;/a&gt;
			&lt;/div&gt;
		
	
		

			
			

			
			
				
			

			
				
			

			
			
				
			


			
			

			&lt;div&gt;
				
				
					
					
				

				
				
					
					
				

				&lt;a href="https://monkemanx.github.io/animals/dumi/IMG-20140910-WA0023.jpg"
					class="galleryImg"
					
					&gt;
					&lt;img
						width="600" height="450"

						
							src="https://monkemanx.github.io/animals/dumi/IMG-20140910-WA0023_hu_ade36736ed6721e4.jpg"
						

						
					&gt;
				&lt;/a&gt;
			&lt;/div&gt;
		
	
		

			
			

			
			
				
			

			
				
			

			
			
				
					
				
			


			
			

			&lt;div&gt;
				
				
					
					
				

				
				
					
					
				

				&lt;a href="https://monkemanx.github.io/animals/dumi/IMG-20150202-WA0000.jpg"
					class="galleryImg"
					
					&gt;
					&lt;img
						width="600" height="337"

						
							src="https://monkemanx.github.io/animals/dumi/IMG-20150202-WA0000_hu_1df238b82d313e01.jpg"
						

						
					&gt;
				&lt;/a&gt;
			&lt;/div&gt;
		
	
		

			
			

			
			
				
			

			
				
			

			
			
				
					
				
			


			
			

			&lt;div&gt;
				
				
					
					
				

				
				
					
					
				

				&lt;a href="https://monkemanx.github.io/animals/dumi/IMG-20150325-WA0000.jpg"
					class="galleryImg"
					
					&gt;
					&lt;img
						width="600" height="337"

						
							src="https://monkemanx.github.io/animals/dumi/IMG-20150325-WA0000_hu_befcae838ab2e1b3.jpg"
						

						
					&gt;
				&lt;/a&gt;
			&lt;/div&gt;
		
	
		

			
			

			
			
				
			

			
				
			

			
			
				
			


			
			

			&lt;div&gt;
				
				
					
					
				

				
				
					
					
				

				&lt;a href="https://monkemanx.github.io/animals/dumi/IMG-20160312-WA0002.jpg"
					class="galleryImg"
					
					&gt;
					&lt;img
						width="600" height="337"

						
							src="https://monkemanx.github.io/animals/dumi/IMG-20160312-WA0002_hu_185cfc5f0f4b1c0e.jpg"
						

						
					&gt;
				&lt;/a&gt;
			&lt;/div&gt;
		
	
		

			
			

			
			
				
			

			
				
			

			
			
				
			


			
			

			&lt;div&gt;
				
				
					
					
				

				
				
					
					
				

				&lt;a href="https://monkemanx.github.io/animals/dumi/IMG-20190516-WA0000.jpg"
					class="galleryImg"
					
					&gt;
					&lt;img
						width="450" height="600"

						
							src="https://monkemanx.github.io/animals/dumi/IMG-20190516-WA0000_hu_9368e7ac70819c9.jpg"
						

						
					&gt;
				&lt;/a&gt;
			&lt;/div&gt;
		
	
		

			
			

			
			
				
			

			
				
			

			
			
				
			


			
			

			&lt;div&gt;
				
				
					
					
				

				
				
					
					
				

				&lt;a href="https://monkemanx.github.io/animals/dumi/IMG-20220316-WA0000.jpg"
					class="galleryImg"
					
					&gt;
					&lt;img
						width="450" height="600"

						
							src="https://monkemanx.github.io/animals/dumi/IMG-20220316-WA0000_hu_9c37b5f879b5123a.jpg"
						

						
					&gt;
				&lt;/a&gt;
			&lt;/div&gt;
		
	
		

			
			

			
			
				
			

			
				
			

			
			
				
			


			
			

			&lt;div&gt;
				
				
					
					
				

				
				
					
					
				

				&lt;a href="https://monkemanx.github.io/animals/dumi/IMG-20240206-WA0002.jpg"
					class="galleryImg"
					
					&gt;
					&lt;img
						width="338" height="600"

						
							src="https://monkemanx.github.io/animals/dumi/IMG-20240206-WA0002_hu_aafb21a2128449da.jpg"
						

						
					&gt;
				&lt;/a&gt;
			&lt;/div&gt;
		
	
&lt;/div&gt;
&lt;/div&gt;

&lt;script&gt;
	if (!("HSCGjQuery" in window)) {
		if (!window.jQuery) {
			throw new Error("jQuery is not loaded, hugo-shortcode-gallery wont work without it!");
		}
		window.HSCGjQuery = window.jQuery.noConflict(true);
	}

	
	
	
	
	
	;(function($) {

		$( document ).ready(() =&gt; {
			const gallery = $("#gallery-39169233936f33ba953746740abc21d4-5");
			

			
			let swipeboxInstance = null;

			
			
			gallery.on('jg.complete', () =&gt; {
				

				swipeboxInstance = $('.galleryImg').swipebox(
					$.extend({},
						{ }
					)
				);
			});

			
			gallery.justifiedGallery($.extend(
				{
					rowHeight : "150",
					margins : "5",
					border : 0,
					randomize : false ,
					waitThumbnailsLoad : false,
					lastRow : "justify",
					captions : false,
					
					
				},
				{ }
			));

			
			
		});

	
	
	
	})(window.HSCGjQuery)
&lt;/script&gt;

&lt;h2 id="later-group-of-chickens"&gt;Later Group of Chickens&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Name:&lt;/strong&gt; /&lt;br&gt;
&lt;strong&gt;Species:&lt;/strong&gt; Chicken &lt;br&gt;
&lt;strong&gt;Notes:&lt;/strong&gt; &lt;br&gt;
My mom wanted chickens again. This time, the chickens weren’t bought as chicks. Instead, my mom used a machine and some purchased eggs to hatch them.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Gallery:&lt;/strong&gt;&lt;/p&gt;







	







































&lt;style&gt;
	

	
&lt;/style&gt;





&lt;div id="gallery-39169233936f33ba953746740abc21d4-6-wrapper" class="gallery-wrapper"&gt;
&lt;div id="gallery-39169233936f33ba953746740abc21d4-6" class="justified-gallery"&gt;
	
		

			
			

			
			
				
			

			
				
			

			
			
				
					
				
			


			
			

			&lt;div&gt;
				
				
					
					
				

				
				
					
					
				

				&lt;a href="https://monkemanx.github.io/animals/chicken_2/IMG_20141025_114839566.jpg"
					class="galleryImg"
					
					&gt;
					&lt;img
						width="600" height="337"

						
							src="https://monkemanx.github.io/animals/chicken_2/IMG_20141025_114839566_hu_104b584adadbe22c.jpg"
						

						
					&gt;
				&lt;/a&gt;
			&lt;/div&gt;
		
	
		

			
			

			
			
				
			

			
				
			

			
			
				
					
				
			


			
			

			&lt;div&gt;
				
				
					
					
				

				
				
					
					
				

				&lt;a href="https://monkemanx.github.io/animals/chicken_2/IMG_20160415_192104851.jpg"
					class="galleryImg"
					
					&gt;
					&lt;img
						width="600" height="337"

						
							src="https://monkemanx.github.io/animals/chicken_2/IMG_20160415_192104851_hu_d280f27e9e7d4c8a.jpg"
						

						
					&gt;
				&lt;/a&gt;
			&lt;/div&gt;
		
	
		

			
			

			
			
				
			

			
				
			

			
			
				
					
				
			


			
			

			&lt;div&gt;
				
				
					
					
				

				
				
					
					
				

				&lt;a href="https://monkemanx.github.io/animals/chicken_2/IMG_20160415_192144112.jpg"
					class="galleryImg"
					
					&gt;
					&lt;img
						width="600" height="337"

						
							src="https://monkemanx.github.io/animals/chicken_2/IMG_20160415_192144112_hu_6665e50414f530b9.jpg"
						

						
					&gt;
				&lt;/a&gt;
			&lt;/div&gt;
		
	
		

			
			

			
			
				
			

			
				
			

			
			
				
					
				
			


			
			

			&lt;div&gt;
				
				
					
					
				

				
				
					
					
				

				&lt;a href="https://monkemanx.github.io/animals/chicken_2/IMG_20160522_184528311.jpg"
					class="galleryImg"
					
					&gt;
					&lt;img
						width="600" height="337"

						
							src="https://monkemanx.github.io/animals/chicken_2/IMG_20160522_184528311_hu_182085a2932bdc25.jpg"
						

						
					&gt;
				&lt;/a&gt;
			&lt;/div&gt;
		
	
		

			
			

			
			
				
			

			
				
			

			
			
				
					
				
			


			
			

			&lt;div&gt;
				
				
					
					
				

				
				
					
					
				

				&lt;a href="https://monkemanx.github.io/animals/chicken_2/IMG_20200504_110849209.jpg"
					class="galleryImg"
					
					&gt;
					&lt;img
						width="450" height="600"

						
							src="https://monkemanx.github.io/animals/chicken_2/IMG_20200504_110849209_hu_157df95ea6230d83.jpg"
						

						
					&gt;
				&lt;/a&gt;
			&lt;/div&gt;
		
	
		

			
			

			
			
				
			

			
				
			

			
			
				
			


			
			

			&lt;div&gt;
				
				
					
					
				

				
				
					
					
				

				&lt;a href="https://monkemanx.github.io/animals/chicken_2/IMG-20200518-WA0005.jpg"
					class="galleryImg"
					
					&gt;
					&lt;img
						width="600" height="505"

						
							src="https://monkemanx.github.io/animals/chicken_2/IMG-20200518-WA0005_hu_9f9a6967ebcf0c7b.jpg"
						

						
					&gt;
				&lt;/a&gt;
			&lt;/div&gt;
		
	
&lt;/div&gt;
&lt;/div&gt;

&lt;script&gt;
	if (!("HSCGjQuery" in window)) {
		if (!window.jQuery) {
			throw new Error("jQuery is not loaded, hugo-shortcode-gallery wont work without it!");
		}
		window.HSCGjQuery = window.jQuery.noConflict(true);
	}

	
	
	
	
	
	;(function($) {

		$( document ).ready(() =&gt; {
			const gallery = $("#gallery-39169233936f33ba953746740abc21d4-6");
			

			
			let swipeboxInstance = null;

			
			
			gallery.on('jg.complete', () =&gt; {
				

				swipeboxInstance = $('.galleryImg').swipebox(
					$.extend({},
						{ }
					)
				);
			});

			
			gallery.justifiedGallery($.extend(
				{
					rowHeight : "150",
					margins : "5",
					border : 0,
					randomize : false ,
					waitThumbnailsLoad : false,
					lastRow : "justify",
					captions : false,
					
					
				},
				{ }
			));

			
			
		});

	
	
	
	})(window.HSCGjQuery)
&lt;/script&gt;

&lt;h2 id="cosmo"&gt;Cosmo&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Name:&lt;/strong&gt; Cosmo&lt;br&gt;
&lt;strong&gt;Species:&lt;/strong&gt; Dog&lt;br&gt;
&lt;strong&gt;Notes:&lt;/strong&gt;&lt;br&gt;
Our new dog. The name &amp;lsquo;Cosmo&amp;rsquo; comes from &amp;lsquo;cosmonaut,&amp;rsquo; referring to Russian astronauts. The dog is a stray that was rescued in Romania. Cosmos is a nervous and anxious dog, probably due to his time on the streets.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Gallery:&lt;/strong&gt;&lt;/p&gt;







	







































&lt;style&gt;
	

	
&lt;/style&gt;





&lt;div id="gallery-39169233936f33ba953746740abc21d4-7-wrapper" class="gallery-wrapper"&gt;
&lt;div id="gallery-39169233936f33ba953746740abc21d4-7" class="justified-gallery"&gt;
	
		

			
			

			
			
				
			

			
				
			

			
			
				
			


			
			

			&lt;div&gt;
				
				
					
					
				

				
				
					
					
				

				&lt;a href="https://monkemanx.github.io/animals/cosmo/IMG-20240115-WA0000.jpg"
					class="galleryImg"
					
					&gt;
					&lt;img
						width="338" height="600"

						
							src="https://monkemanx.github.io/animals/cosmo/IMG-20240115-WA0000_hu_911d8fcca4fc8d17.jpg"
						

						
					&gt;
				&lt;/a&gt;
			&lt;/div&gt;
		
	
		

			
			

			
			
				
			

			
				
			

			
			
				
			


			
			

			&lt;div&gt;
				
				
					
					
				

				
				
					
					
				

				&lt;a href="https://monkemanx.github.io/animals/cosmo/IMG-20240216-WA0000.jpg"
					class="galleryImg"
					
					&gt;
					&lt;img
						width="338" height="600"

						
							src="https://monkemanx.github.io/animals/cosmo/IMG-20240216-WA0000_hu_b58303fe2a8e3820.jpg"
						

						
					&gt;
				&lt;/a&gt;
			&lt;/div&gt;
		
	
		

			
			

			
			
				
			

			
				
			

			
			
				
			


			
			

			&lt;div&gt;
				
				
					
					
				

				
				
					
					
				

				&lt;a href="https://monkemanx.github.io/animals/cosmo/IMG-20240517-WA0002.jpg"
					class="galleryImg"
					
					&gt;
					&lt;img
						width="600" height="338"

						
							src="https://monkemanx.github.io/animals/cosmo/IMG-20240517-WA0002_hu_c00353958e52f0b3.jpg"
						

						
					&gt;
				&lt;/a&gt;
			&lt;/div&gt;
		
	
		
	
&lt;/div&gt;
&lt;/div&gt;

&lt;script&gt;
	if (!("HSCGjQuery" in window)) {
		if (!window.jQuery) {
			throw new Error("jQuery is not loaded, hugo-shortcode-gallery wont work without it!");
		}
		window.HSCGjQuery = window.jQuery.noConflict(true);
	}

	
	
	
	
	
	;(function($) {

		$( document ).ready(() =&gt; {
			const gallery = $("#gallery-39169233936f33ba953746740abc21d4-7");
			

			
			let swipeboxInstance = null;

			
			
			gallery.on('jg.complete', () =&gt; {
				

				swipeboxInstance = $('.galleryImg').swipebox(
					$.extend({},
						{ }
					)
				);
			});

			
			gallery.justifiedGallery($.extend(
				{
					rowHeight : "150",
					margins : "5",
					border : 0,
					randomize : false ,
					waitThumbnailsLoad : false,
					lastRow : "justify",
					captions : false,
					
					
				},
				{ }
			));

			
			
		});

	
	
	
	})(window.HSCGjQuery)
&lt;/script&gt;
</description></item><item><title>What is morality? An Overview of the Metaethical Landscape</title><link>https://monkemanx.github.io/articles/what_is_morality/</link><pubDate>Sat, 30 Nov 2024 00:00:00 +0000</pubDate><author>monkeman@cock.li (MonkeMan)</author><guid>https://monkemanx.github.io/articles/what_is_morality/</guid><description>&lt;style&gt;
 .info {
 background-color: #e6f7ff; 
 padding: 15px; 
 border-radius: 5px; 
 margin-bottom: 15px; 
 }

 .info-title {
 font-size: 20px; 
 margin-bottom: 10px; 
 color: #000080; 
 font-weight: bold; 
 }
&lt;/style&gt;

&lt;div class="info"&gt;
 &lt;div class="info-title"&gt;Info&lt;/div&gt;
 &lt;p&gt;I have only recently started exploring philosophy, so keep in mind that I might have gotten some things wrong. Please take everything written here with a grain of salt.&lt;/p&gt;
&lt;/div&gt;

&lt;h2 id="to-moralize-or-not-to-moralize-is-that-the-question"&gt;To Moralize or Not to Moralize: Is That the Question?&lt;/h2&gt;
&lt;p&gt;There are many theories about what actions are morally right or wrong. For example, &lt;a href="https://en.wikipedia.org/wiki/Utilitarianism"&gt;utilitarianism&lt;/a&gt; prescribes that the moral action is the one that minimizes suffering or maximizes the happiness of all parties involved. &lt;a href="https://en.wikipedia.org/wiki/Deontology"&gt;Deontology&lt;/a&gt;, on the other hand, argues that a set of rules defines what actions are right and wrong. For instance, many Christians fall into this camp through &lt;a href="https://en.wikipedia.org/wiki/Divine_command_theory"&gt;Divine Command Theory&lt;/a&gt;. Lastly, I want to mention &lt;a href="https://en.wikipedia.org/wiki/Virtue_ethics"&gt;virtue ethics&lt;/a&gt;, arguably one of the oldest moral theories. This approach, represented by ancient Greek philosophers such as Socrates, Plato, and Aristotle, asserts that an action is moral if it embodies virtues—i.e., a virtuous person performs virtuous actions.&lt;/p&gt;
&lt;p&gt;However, these theories (aside from Divine Command Theory) do not address where morality comes from or what morality fundamentally is. Instead, they focus on what one ought to do when faced with a moral question.&lt;/p&gt;
&lt;p&gt;While the question of how one ought to act is undoubtedly relevant to our daily lives, it does not provide the complete picture of morality in its divine and infinite form. Only by investigating the origins and nature of morality can one truly appreciate its beauty.&lt;/p&gt;
&lt;p&gt;Before I begin, I want to reiterate that the questions &lt;em&gt;How should one act?&lt;/em&gt;, &lt;em&gt;What is morality?&lt;/em&gt;, and &lt;em&gt;Where does morality come from?&lt;/em&gt; are all distinct. Although answers to the latter two questions might inform the first, they remain separate issues.&lt;/p&gt;
&lt;p&gt;In this article, I will attempt to provide an overview of the question &lt;em&gt;What is morality?&lt;/em&gt;&lt;/p&gt;


&lt;figure&gt;
 &lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width:50%" src="https://monkemanx.github.io/attachments/monke_smart_cigarette.jpg"&gt;
 &lt;figcaption style="margin-top: 10px;text-align:center"&gt;Me thinking about morality.&lt;/figcaption&gt;
&lt;/figure&gt;


&lt;h2 id="what-the-hell-is-metaethics"&gt;What the Hell is Metaethics?&lt;/h2&gt;
&lt;p&gt;I’ve already mentioned the question I aim to answer, but which branch of philosophy does this question belong to?&lt;/p&gt;
&lt;p&gt;The question &lt;em&gt;What is morality?&lt;/em&gt; is primarily addressed by &lt;em&gt;Metaethics&lt;/em&gt;. The term &amp;ldquo;metaethics&amp;rdquo; consists of the prefix &lt;em&gt;meta&lt;/em&gt;, which comes from Greek and means something like &amp;ldquo;beyond&amp;rdquo; or &amp;ldquo;about,&amp;rdquo; and the word &lt;em&gt;ethics&lt;/em&gt;, meaning &amp;ldquo;customs.&amp;rdquo;&lt;/p&gt;
&lt;p&gt;This reflects what this branch of philosophy seeks to study. While ethics focuses on what people ought to do or which behaviors are morally right, metaethics examines what this &lt;em&gt;ought&lt;/em&gt; means—in other words, the nature of moral judgments.&lt;/p&gt;
&lt;p&gt;As a branch of philosophy, metaethics is incredibly broad and encompasses many arguments and frameworks. I couldn’t possibly list all of them here, so I’ll highlight just a few of the most popular ones.&lt;/p&gt;
&lt;p&gt;Much of the information in this article comes from the excellent book by Andrew Fisher, &lt;a href="https://www.routledge.com/Metaethics-An-Introduction/Fisher/p/book/9781844652587"&gt;Metaethics: An Introduction&lt;/a&gt;, which I highly recommend checking out.&lt;/p&gt;
&lt;h2 id="on-categorizing-metaethics"&gt;On Categorizing Metaethics&lt;/h2&gt;
&lt;p&gt;Before diving into various metaethical frameworks, it’s helpful to get a rough overview of the kinds of questions that lead to different metaethical approaches.&lt;/p&gt;
&lt;p&gt;There is no definitive way to organize these questions into a hierarchical structure that allows one to follow a simple decision tree to arrive at a preferred metaethical framework. Many have tried, but most graphs you find online are either incorrect or incomplete.&lt;/p&gt;
&lt;p&gt;One of the challenges in categorizing metaethical frameworks is that they often don’t fit neatly into one category. Advocates of the same idea sometimes even disagree on where their framework should be placed in the broader landscape.&lt;/p&gt;
&lt;p&gt;It’s better to think of metaethical frameworks as having various properties that can be associated with different questions. Another disclaimer: these properties are not strictly defined, and there is frequent disagreement about how they should be characterized. Keep this in mind as we proceed.&lt;/p&gt;


&lt;figure&gt;
 &lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width:80%" src="https://monkemanx.github.io/attachments/put_em_up.jpg"&gt;
 &lt;figcaption style="margin-top: 10px;text-align:center"&gt;Me challenging metaethics to a fight.&lt;/figcaption&gt;
&lt;/figure&gt;


&lt;h2 id="properties-of-metaethical-frameworks"&gt;Properties of Metaethical Frameworks&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Moral Realism&lt;/strong&gt;&lt;br&gt;
One of the most fundamental questions one can ask about morality is: &lt;em&gt;Does morality exist independently of people&amp;rsquo;s judgments?&lt;/em&gt; If someone answers &amp;ldquo;yes&amp;rdquo; to this question, they are considered a &lt;em&gt;moral realist&lt;/em&gt;. Otherwise, they are classified as a &lt;em&gt;moral anti-realist&lt;/em&gt;. We can think of these labels as representing the kinds of properties I mentioned earlier. A basic example of this concept is the following: If I steal something from someone and moral realism is correct, we can say that stealing inherently possesses the property of wrongness.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Cognitivism&lt;/strong&gt;&lt;br&gt;
We label someone a &lt;em&gt;cognitivist&lt;/em&gt; if they claim, first, that moral judgments express beliefs, and second, that moral claims are either true or false. If either of these claims does not hold, they are called a &lt;em&gt;non-cognitivist&lt;/em&gt;. For example, a cognitivist believes that the statement &amp;ldquo;torture is wrong&amp;rdquo; is either true or false.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Moral Naturalism&lt;/strong&gt;&lt;br&gt;
A &lt;em&gt;moral naturalist&lt;/em&gt; argues that the properties of morality, or moral claims in general, can somehow be found in nature. In contrast, a &lt;em&gt;non-naturalist&lt;/em&gt; believes that morality cannot be found in nature but exists in something non-natural, such as God.&lt;/p&gt;
&lt;p&gt;These are some of the most basic properties a moral framework can have, but there are many more. A few others worth mentioning briefly include:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Internalism vs. Externalism&lt;/strong&gt; regarding motivation&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Descriptivism vs. Non-Descriptivism&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Atomic vs. Non-Atomic&lt;/strong&gt; moral properties&lt;/li&gt;
&lt;li&gt;How is truth defined?&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Epistemological questions&lt;/strong&gt;, e.g., &lt;em&gt;Can we ever discover truths about morality?&lt;/em&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="an-overview-of-metaethics"&gt;An Overview of Metaethics&lt;/h2&gt;
&lt;p&gt;Although I don’t think flowcharts provide the most accurate picture of the metaethical landscape, I’ve included one below because it helps to give a rough overview of what’s out there.&lt;/p&gt;


&lt;figure&gt;
 &lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width:100%" src="https://monkemanx.github.io/attachments/metaethics_chart.png"&gt;
 &lt;figcaption style="margin-top: 10px;text-align:center"&gt;Overview of common metaethical frameworks, created with &lt;a href="https://www.drawio.com/"&gt;draw.io&lt;/a&gt;. You can download the file &lt;a href="https://monkemanx.github.io/attachments/moral_chart.drawio" download&gt;here&lt;/a&gt;. Please feel free to send me your corrections :)&lt;/figcaption&gt;
&lt;/figure&gt;


&lt;p&gt;The chart might seem intimidating at first, but you already know some of the properties and the questions they are associated with. Once you’ve read the rest of this article, the chart should make a lot more sense.&lt;/p&gt;
&lt;p&gt;Here’s how I plan to structure the rest of the article: In the following sections, I will explain the metaethical positions shown in the chart. Additionally, I will provide links to arguments that support and challenge these positions. Please note that I won’t list every possible argument here, but rather a selection of key ones. Also keep in mind that arguments against a realism position, strengthens non-realism approaches, but I wont list them there explicitly, this goes for other positions aswell.&lt;/p&gt;
&lt;p&gt;By the end, you can reflect on which position makes the most sense to you and proudly declare your metaethical framework of choice!&lt;/p&gt;
&lt;div style="margin-bottom: 100px;"&gt;&lt;/div&gt;

&lt;h1 id="metaethical-positions"&gt;Metaethical Positions&lt;/h1&gt;
&lt;h2 id="emotivism"&gt;Emotivism&lt;/h2&gt;
&lt;h3 id="overview"&gt;Overview&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;Emotivism&lt;/strong&gt; (originating from A.J. Ayer) is the belief that when we make a moral judgment, we express a non-cognitive state. But what is a non-cognitive state? An example would be emotions. According to this view, when we say things like &amp;ldquo;stealing is wrong&amp;rdquo; or &amp;ldquo;killing is wrong,&amp;rdquo; we are not making a factual statement about the world. Instead, we are expressing an emotion. For example, saying &amp;ldquo;stealing is wrong&amp;rdquo; is equivalent to expressing &amp;ldquo;stealing, boo!&amp;rdquo; with a tone of disapproval or horror.&lt;/p&gt;
&lt;p&gt;It’s important to emphasize that this does not mean we are &lt;em&gt;describing&lt;/em&gt; an emotional state (e.g., &amp;ldquo;I feel angry about stealing&amp;rdquo;). Describing an emotion would make it a cognitive claim. Instead, in emotivism, we are &lt;em&gt;expressing&lt;/em&gt; an emotional reaction.&lt;/p&gt;
&lt;h3 id="moral-truth-and-disagreements"&gt;Moral Truth and Disagreements&lt;/h3&gt;
&lt;p&gt;For Ayer, moral judgments do not have truth values. This means there is no such thing as a &amp;ldquo;true&amp;rdquo; or &amp;ldquo;false&amp;rdquo; moral judgment. Ayer puts it like this:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&amp;ldquo;If a sentence makes no statement at all, then there is no sense in asking whether what it says is true or false.&amp;rdquo;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;But what about moral disagreements? People clearly argue about moral issues, such as animal suffering or gun control. How does emotivism account for this? According to Ayer, these disagreements are not about moral truths but about non-moral facts. For example, when debating gun ownership, the actual disagreement may center on whether gun ownership reduces or increases deaths, which is a factual question rather than a moral one.&lt;/p&gt;
&lt;h3 id="emotivism-and-relativism"&gt;Emotivism and Relativism&lt;/h3&gt;
&lt;p&gt;Emotivism is often confused with subjectivism, but they are distinct. Subjectivism holds that moral judgments like &amp;ldquo;murder is wrong&amp;rdquo; mean &amp;ldquo;&lt;em&gt;I&lt;/em&gt; disapprove of murder.&amp;rdquo; In this view, moral claims describe the speaker’s mental state and are therefore cognitive.&lt;/p&gt;
&lt;p&gt;Emotivism, by contrast, asserts that moral judgments do not &lt;em&gt;describe&lt;/em&gt; anything. Instead, they &lt;em&gt;express&lt;/em&gt; an emotional reaction. Consequently, questions about the truth or falsity of moral claims are irrelevant in emotivism.&lt;/p&gt;
&lt;p&gt;For example, in relativism, one person might say, &amp;ldquo;Murder is wrong,&amp;rdquo; and another might say, &amp;ldquo;Murder is right,&amp;rdquo; and both could be correct within their respective frameworks. Under emotivism, however, these statements are not about truth or correctness at all—they are simply expressions of opposing emotions.&lt;/p&gt;
&lt;h3 id="arguments"&gt;Arguments&lt;/h3&gt;
&lt;p&gt;Pro:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="#emotivism-oqa-approach"&gt;Emotivism OQA Approach&lt;/a&gt; via &lt;a href="#open-question-argument-oqa"&gt;Open Question Argument (OQA)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#motivation-argument"&gt;Motivation Argument&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#morality-location-challenge"&gt;Morality Location Challenge&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Contra:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="#emotions-and-motivation-of-others"&gt;Emotions and Motivation of Others&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#severity-of-moral-claims"&gt;Severity of Moral Claims&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#convergence-of-morality"&gt;Convergence of Morality&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#moral-claims-and-logic-in-non-cognitivism"&gt;Moral Claims and Logic in Non-Cognitivism&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#the-frege-geach-problem"&gt;The Frege-Geach Problem&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;figure&gt;
 &lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width:60%" src="https://monkemanx.github.io/attachments/emotivism.jpg"&gt;
&lt;/figure&gt;


&lt;div style="margin-bottom: 100px;"&gt;&lt;/div&gt;

&lt;h2 id="error-theory"&gt;Error Theory&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Error theory&lt;/strong&gt;, developed by J.L. Mackie, makes two core claims:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Moral judgments express beliefs and have truth values&lt;/strong&gt; (cognitivism).&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;There are no objective moral values&lt;/strong&gt; (anti-realism).&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;From these premises, Mackie concludes:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&amp;ldquo;All moral judgments are systematically and uniformly false.&amp;rdquo;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h3 id="understanding-the-position"&gt;Understanding the Position&lt;/h3&gt;
&lt;p&gt;An error theorist asserts that &lt;em&gt;all moral statements are false&lt;/em&gt;. This includes statements like:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&amp;ldquo;Torturing innocent children is morally wrong.&amp;rdquo;&lt;/li&gt;
&lt;li&gt;&amp;ldquo;Shooting random people in the street is morally wrong.&amp;rdquo;&lt;/li&gt;
&lt;li&gt;&amp;ldquo;Providing famine relief for starving children is morally good.&amp;rdquo;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Why does error theory hold that all these statements are false? The reasoning lies in its rejection of &lt;strong&gt;objective moral values&lt;/strong&gt;. Mackie argues that there is no such thing as &amp;ldquo;objective moral value&amp;rdquo; in the world. Thus, asking &amp;ldquo;Is X morally right?&amp;rdquo; is akin to asking, &amp;ldquo;Does this water bottle have a brain and two hands?&amp;rdquo; In both cases, the answer is &amp;ldquo;no&amp;rdquo; because the objects in question lack the properties being attributed to them. Similarly, Mackie claims that no action or object has the property of &amp;ldquo;moral wrongness&amp;rdquo; or &amp;ldquo;moral goodness.&amp;rdquo;&lt;/p&gt;
&lt;h3 id="why-be-moral-then"&gt;Why Be Moral, Then?&lt;/h3&gt;
&lt;p&gt;If all moral claims are false, does that mean we should abandon morality? Not necessarily. Mackie suggests that moral practice is still &lt;strong&gt;pragmatically justified&lt;/strong&gt;. Morality serves important purposes, such as:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Maintaining social harmony.&lt;/li&gt;
&lt;li&gt;Facilitating interpersonal relationships.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;In this view, the usefulness of morality—not its truthfulness—justifies its continued practice. While moral judgments may be false in a literal sense, their functional role in society makes them valuable.&lt;/p&gt;
&lt;h3 id="arguments-1"&gt;Arguments&lt;/h3&gt;
&lt;p&gt;Pro:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="#challenge-to-the-queerness-argument-1"&gt;Challenge to the Queerness Argument 1&lt;/a&gt; as response to &lt;a href="#the-queerness-argument"&gt;The Queerness Argument&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Contra:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="#insensitivity-of-psychology"&gt;Insensitivity of Psychology&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#moorean-shift"&gt;Moorean Shift&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;For more see my &lt;a href="https://monkemanx.github.io/paper-summary/inventing_right_wrong/"&gt;newest paper summary on it&lt;/a&gt;.&lt;/p&gt;
&lt;div style="margin-bottom: 100px;"&gt;&lt;/div&gt;

&lt;h2 id="moral-realism-and-naturalism"&gt;Moral Realism and Naturalism&lt;/h2&gt;
&lt;h3 id="overview-1"&gt;Overview&lt;/h3&gt;
&lt;p&gt;To be a moral realist is to believe that &lt;strong&gt;moral properties are real&lt;/strong&gt; and exist in some sense &lt;strong&gt;independent&lt;/strong&gt; of what people think.&lt;/p&gt;
&lt;p&gt;At first, the idea that moral properties exist may seem strange—after all, they don&amp;rsquo;t exist in the same way that chairs, oranges, or clothes do. However, we often accept the existence of abstract or less tangible concepts, such as:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Love&lt;/li&gt;
&lt;li&gt;Society&lt;/li&gt;
&lt;li&gt;Numbers&lt;/li&gt;
&lt;li&gt;Atoms&lt;/li&gt;
&lt;li&gt;Time&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If we agree that these concepts exist, despite their abstract nature, why shouldn&amp;rsquo;t moral properties also exist?&lt;/p&gt;
&lt;h3 id="naturalism"&gt;Naturalism&lt;/h3&gt;
&lt;p&gt;Within moral realism, &lt;strong&gt;naturalism&lt;/strong&gt; holds that moral properties are part of the natural world and can be understood through empirical or conceptual analysis. There are two main approaches to argue for naturalism:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Frank Jackson’s conceptual analysis.&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Cornell realism’s posteriori analysis.&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;h3 id="conceptual-analysis-frank-jackson"&gt;Conceptual Analysis (Frank Jackson)&lt;/h3&gt;
&lt;p&gt;Frank Jackson argues that moral properties are natural facts that can be identified through conceptual reasoning, independent of experience. He employs the &lt;a href="https://en.wikipedia.org/wiki/Ramsey%E2%80%93Lewis_method"&gt;Ramsey–Lewis method&lt;/a&gt;, a technique used to define theoretical entities by &amp;ldquo;telling a story&amp;rdquo; about them.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Example: Explaining an Electron&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;How might we define an electron, proton, or neutron without relying on the technical language of physics? By describing their roles and interactions:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&amp;ldquo;There is one kind of thing, and another, and yet another.&lt;br&gt;
Instances of the first kind orbit a clump of instances of the second and third kinds.&lt;br&gt;
The first and second kinds attract each other, but instances of the same kind repel each other.&lt;br&gt;
The third kind exhibits no attraction or repulsion to others of its kind, yet some force keeps the second kind together in a clump despite their mutual repulsion.&amp;rdquo;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;This &amp;ldquo;story&amp;rdquo; provides a definition without directly naming concepts like electrons or protons. When we observe phenomena in the real world that fit this description, we identify them as electrons, protons, and neutrons.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Applying the Method to Morality&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Jackson proposes using a similar method to define morality:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Collect Consensus Statements&lt;/strong&gt;&lt;br&gt;
Identify moral discussions where consensus has been reached.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;List Associated Truths&lt;/strong&gt;&lt;br&gt;
Write down all the truths associated with moral terms in these debates.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Abstract Moral Properties&lt;/strong&gt;&lt;br&gt;
Replace moral terms (e.g., &amp;ldquo;wrong,&amp;rdquo; &amp;ldquo;right&amp;rdquo;) with variables like \(a_w\) (for wrongness), \(a_r\) (for rightness), or \(a_g\) (for goodness).&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;For example, such a list might look like this:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Something cannot possess both \(a_w\) (wrongness) and \(a_r\) (rightness) simultaneously.&lt;/li&gt;
&lt;li&gt;If someone claims \(X\) has \(a_w\) and another claims it doesn’t, one of them must be mistaken.&lt;/li&gt;
&lt;li&gt;If we judge \(X\) to have \(a_w\), we are motivated to avoid \(X\).&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;By analyzing this list, Jackson argues that we can identify moral properties as whatever satisfies these conditions in the real world.&lt;/p&gt;
&lt;p&gt;For this method to succeed, the &amp;ldquo;story&amp;rdquo; about morality must be precise enough to uniquely identify one thing—&lt;strong&gt;moral properties&lt;/strong&gt;—in the natural world. If it fails to do so, the definition risks ambiguity or irrelevance.&lt;/p&gt;
&lt;h3 id="synthetic-moral-realism-cornell-railton"&gt;Synthetic Moral Realism (Cornell, Railton)&lt;/h3&gt;
&lt;p&gt;Synthetic moralists argue that the existence of morality and moral properties provides the best explanation for certain phenomena. By postulating that moral properties are real and exist in the natural world, they claim to improve our understanding, much like the atomic model in science—while it may not represent ultimate truth, it remains our best explanatory framework.&lt;/p&gt;
&lt;p&gt;Cornell realists hold that if natural moral properties offer the best explanatory account of morality, then moral properties are real, and &lt;strong&gt;moral realism&lt;/strong&gt; is correct.&lt;/p&gt;
&lt;p&gt;Their primary argument can be summarized as follows:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Why do we believe that a wrongful murder is morally wrong?&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;The best explanation, according to Cornell realists, is that moral properties like &amp;ldquo;wrongness&amp;rdquo; actually exist and are part of the natural world.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This explanatory role of moral properties supports their claim that moral realism is not just plausible but the most reasonable model we currently have.&lt;/p&gt;
&lt;h3 id="atomicness-and-explanatory-power"&gt;Atomicness and Explanatory Power&lt;/h3&gt;
&lt;p&gt;Cornell realists and Railton differ on two key aspects:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Explanatory Role of Moral Properties&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Cornell realists:&lt;/strong&gt; Moral properties having explanatory power is &lt;em&gt;sufficient&lt;/em&gt; to affirm their reality.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Railton:&lt;/strong&gt; Explanatory power is merely &lt;em&gt;necessary&lt;/em&gt; but not enough by itself (see &lt;a href="https://simple.wikipedia.org/wiki/Necessary_and_sufficient_conditions"&gt;necessary and sufficient conditions&lt;/a&gt;).&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Atomic vs. Non-Atomic Morality&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Railton:&lt;/strong&gt; Morality is &lt;strong&gt;non-atomic&lt;/strong&gt; and reducible—moral properties like &amp;ldquo;goodness&amp;rdquo; can be defined through hypotheses, trial, and error.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Cornell realists:&lt;/strong&gt; Morality is &lt;strong&gt;atomic&lt;/strong&gt; and irreducible—it cannot be broken down into simpler components.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Jackson offers a contrasting viewpoint by arguing that moral properties can only be defined &lt;strong&gt;a priori&lt;/strong&gt; (independent of evidence), emphasizing conceptual rather than empirical analysis.&lt;/p&gt;
&lt;h3 id="arguments-2"&gt;Arguments&lt;/h3&gt;
&lt;p&gt;Pro:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="#severity-of-moral-claims"&gt;Severity of Moral Claims&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#convergence-of-morality"&gt;Convergence of Morality&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#truth-of-morality"&gt;Truth of Morality&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#supervenience-argument-for-naturalism"&gt;Supervenience Argument for Naturalism&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Contra:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="#observed-relativism-argument"&gt;Observed &amp;lsquo;Relativism&amp;rsquo; Argument&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#the-queerness-argument"&gt;The Queerness Argument&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#epistemological-queerness"&gt;Epistemological Queerness&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#conceptual-analysis-counter"&gt;Conceptual Analysis Counter&lt;/a&gt; but can be countered.&lt;/li&gt;
&lt;li&gt;&lt;a href="#conceptual-analysis-and-oqa"&gt;Conceptual Analysis and OQA&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#counter-supervenience-arguments"&gt;Counter-Supervenience Arguments&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#motivation-and-natural-properties"&gt;Motivation and Natural Properties&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;figure&gt;
 &lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width:60%" src="https://monkemanx.github.io/attachments/its-a-meme-about-philosophy-realist-vs-nonrealist.webp"&gt;
&lt;/figure&gt;


&lt;div style="margin-bottom: 100px;"&gt;&lt;/div&gt;

&lt;h2 id="non-naturalism"&gt;Non-Naturalism&lt;/h2&gt;
&lt;p&gt;A moral non-naturalist would argue that &amp;ldquo;killing is wrong&amp;rdquo; is true because killing possesses the non-natural property of wrongness.&lt;/p&gt;
&lt;p&gt;What is meant by a non-natural property? A non-natural property is one that cannot be directly observed in nature; instead, it exists in &amp;ldquo;another plane of existence.&amp;rdquo; Examples of non-natural properties include:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Plato&amp;rsquo;s Theory of Forms&lt;/li&gt;
&lt;li&gt;Religious concepts, such as the idea of God in Christianity&lt;/li&gt;
&lt;li&gt;The astral plane&lt;/li&gt;
&lt;li&gt;Folklore about ghosts&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Why would anyone hold such a position? The motivations and arguments for moral realism still apply, but in addition, there are arguments supporting non-naturalism.&lt;/p&gt;
&lt;h3 id="divine-command-theory"&gt;Divine Command Theory&lt;/h3&gt;
&lt;p&gt;The underlying assumption of this theory is that God exists. This does not mean that simply believing in God necessitates accepting this theory. For example, the Christian philosopher Thomas Aquinas favored &lt;em&gt;natural law theory&lt;/em&gt; instead.&lt;/p&gt;
&lt;p&gt;The basic premise of Divine Command Theory is that what is moral is what is commanded by God.&lt;/p&gt;
&lt;p&gt;There are several distinctions that can be made within this theory:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Should one follow God’s will, or His commands?&lt;/li&gt;
&lt;li&gt;Do God’s commands make something right, or are God’s commands identical with what is right?&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="arguments-3"&gt;Arguments&lt;/h3&gt;
&lt;p&gt;Pro:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="#Severity-of-moral-claims"&gt;Severity of Moral Claims&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#counter-to-the-arbitrariness-of-morality-argument"&gt;Counter to the Arbitrariness of Morality Argument&lt;/a&gt; see contra.&lt;/li&gt;
&lt;li&gt;&lt;a href="#russ-shafer-landau-argument"&gt;Russ Shafer-Landau&amp;rsquo;s Argument&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Contra:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="#epistemological-divine-command-argument"&gt;Epistemological Divine Command Argument&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#arbitrariness-of-morality-argument"&gt;Arbitrariness of Morality Argument&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;figure&gt;
 &lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width:60%" src="https://monkemanx.github.io/attachments/divine_commandmend_theory.jpg"&gt;
&lt;/figure&gt;


&lt;div style="margin-bottom: 100px;"&gt;&lt;/div&gt;

&lt;h2 id="quasi-realism"&gt;Quasi-Realism&lt;/h2&gt;
&lt;p&gt;After G.E. Moore popularized the Open Question Argument (OQA), cognitivism lost favor, and non-cognitivism became more popular. However, later an argument emerged that left non-cognitivism in a difficult position: the Frege-Geach Problem.&lt;/p&gt;
&lt;p&gt;The main proponent of quasi-realism is Simon Blackburn. Importantly, &lt;em&gt;quasi-realism&lt;/em&gt; is not another moral framework, but rather an explanation for why our moral practices appear to be realist, even though realism is actually false.&lt;/p&gt;
&lt;p&gt;Do not be confused: this is still a non-cognitivist position. Blackburn argues only that we should give more respect to the realist position.&lt;/p&gt;
&lt;h3 id="arguments-4"&gt;Arguments&lt;/h3&gt;
&lt;p&gt;Pro:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="#Severity-of-moral-claims"&gt;Severity of Moral Claims&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#blackburn-counter-to-the-frege-geach-problem"&gt;Blackburn&amp;rsquo;s Counter to the Frege-Geach Problem&lt;/a&gt; via &lt;a href="#the-frege-geach-problem"&gt;The Frege-Geach Problem&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#why-realism-when-non-cognitivism-is-true"&gt;Why Realism When Non-Cognitivism Is True?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#why-non-cognitivism-instead-of-realism"&gt;Why Non-Cognitivism Instead of Realism&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Contra:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Quasi-Realism Dilemma: either quasi-realism cannot be identifies with non-cognitivism, or it can be identified with non-cognitivism, but it cannot capture all features of morality.&lt;/li&gt;
&lt;/ul&gt;
&lt;div style="margin-bottom: 100px;"&gt;&lt;/div&gt;

&lt;h2 id="agent-relativism"&gt;Agent-Relativism&lt;/h2&gt;
&lt;p&gt;The basic premise of agent-relativism is that something is right or wrong depending on the moral framework of the agent. For example, someone protesting against stealing is right &lt;a href="(https://en.wikipedia.org/wiki/If_and_only_if)"&gt;if and only if&lt;/a&gt; it is prescribed by their moral framework. This does not mean that what is right is simply whatever we want it to be, as it could still be forbidden by our moral framework.&lt;/p&gt;
&lt;p&gt;Agent-relativism makes two important claims:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;There is no shared universal moral framework between agents.&lt;/li&gt;
&lt;li&gt;It makes no sense to say that one moral framework is &amp;ldquo;more correct&amp;rdquo; than another.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Why agent-relativism?
We can look at different actions by non-humans to understand the motivation behind it:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Do we think a tiger is morally wrong for eating humans?&lt;/li&gt;
&lt;li&gt;Do we think a hurricane is morally wrong for killing humans?&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Most people would probably not say that the tiger or the hurricane has any kind of moral responsibility. What about people with severe mental illness? Can they do something wrong, i.e., be morally responsible?&lt;/p&gt;
&lt;p&gt;What agent-relativism allows us to say is that moral responsibility depends on the mental capacities of the agent.&lt;/p&gt;
&lt;p&gt;It is important to note that such a position would lead to the conclusion that, if Hitler was exterminating the Jews while following his own moral framework, we could not say he was morally wrong.&lt;/p&gt;
&lt;p&gt;Another motivation for agent-relativism is that, given there are many moral frameworks and no standard to judge which one is right or wrong, we should simply accept relativism.&lt;/p&gt;
&lt;h3 id="arguments-5"&gt;Arguments&lt;/h3&gt;
&lt;p&gt;Pro:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="#normative-reason-and-agent-relativism"&gt;Normative Reason and Agent Relativism&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Contra:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="#disagreements-in-relativism"&gt;Disagreements in Relativism&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;figure&gt;
 &lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width:60%" src="https://monkemanx.github.io/attachments/relativism.webp"&gt;
&lt;/figure&gt;


&lt;div style="margin-bottom: 100px;"&gt;&lt;/div&gt;

&lt;h2 id="speaker-relativism"&gt;Speaker-Relativism&lt;/h2&gt;
&lt;p&gt;Some non-moral claims are relative. For example, &amp;ldquo;Is a car fast?&amp;rdquo; is relative. Is a car fast compared to someone walking? Yes. Is a car fast compared to a rocket? No.&lt;/p&gt;
&lt;p&gt;Can we apply the same idea to moral claims?&lt;/p&gt;
&lt;p&gt;If we say &amp;ldquo;killing is wrong,&amp;rdquo; is this true for all species, all societies, and all times, or is it relative to different moral frameworks? A speaker-relativist would argue that it is relative.&lt;/p&gt;
&lt;p&gt;How does speaker-relativism differ from agent-relativism? Let’s imagine a scenario where a man is throwing puppies off a bridge. In an agent-relativist framework, what matters is the moral framework of the person doing the throwing. In comparison, in speaker-relativism, we would also be interested in the moral framework of the person saying that throwing puppies off the bridge is wrong.&lt;/p&gt;
&lt;h3 id="arguments-6"&gt;Arguments&lt;/h3&gt;
&lt;p&gt;Pro:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="#speaker-relativism-and-universality-of-moral-claims"&gt;Speaker Relativism and Universality of Moral Claims&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Contra:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="#disagreements-in-relativism"&gt;Disagreements in Relativism&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div style="margin-bottom: 100px;"&gt;&lt;/div&gt;

&lt;h2 id="fictionalism"&gt;Fictionalism&lt;/h2&gt;
&lt;p&gt;There are two main branches of fictionalism: &lt;strong&gt;hermeneutic fictionalism&lt;/strong&gt; and &lt;strong&gt;revolutionary fictionalism&lt;/strong&gt;. Hermeneutic fictionalism is a descriptive theory that explains what moral practice &lt;strong&gt;is&lt;/strong&gt; like, while revolutionary fictionalism is a prescriptive theory that explains what morals &lt;strong&gt;should&lt;/strong&gt; be like.&lt;/p&gt;
&lt;h3 id="hermeneutic-fictionalism"&gt;Hermeneutic Fictionalism&lt;/h3&gt;
&lt;p&gt;Our moral practice is based on make-believe. For example, when we say &amp;ldquo;giving money to charity is right,&amp;rdquo; we do not literally believe that giving money to charity is right, but rather we engage in a kind of make-believe about it.&lt;/p&gt;
&lt;p&gt;We can compare this to playing a game. When playing a game, one might ask, &amp;ldquo;What is the best path forward?&amp;rdquo; Certain things in the game are also true or false. These fictional claims are true within the context of the game, but not literally true.&lt;/p&gt;
&lt;p&gt;Thus, hermeneutic fictionalism allows for claims like:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;a) Moral claims can be true according to the moral fiction, which allows us to reject error theory.&lt;/li&gt;
&lt;li&gt;b) Moral claims can be true even if there are no moral properties or facts, allowing us to avoid ontological debates about what moral properties are.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The major challenge to hermeneutic fictionalism arises when we say things like &amp;ldquo;racism is wrong.&amp;rdquo; It does not feel like fiction. Even more so, when making decisions about life and death, it does not feel like fiction.&lt;/p&gt;
&lt;p&gt;A hermeneutic fictionalist would rebut by saying that we are so familiar with moral language that we do not realize we use it like fiction, much the same way we sometimes use metaphors without realizing it.&lt;/p&gt;
&lt;p&gt;But if this is true, how can we differentiate between reality and make-believe? Why isn’t math, science, love, or time also fiction by the same argument? Especially because studies have shown that most people can differentiate between fiction and non-fiction.&lt;/p&gt;
&lt;h3 id="revolutionary-fictionalism"&gt;Revolutionary Fictionalism&lt;/h3&gt;
&lt;p&gt;Revolutionary fictionalism believes that our moral judgments are systematically and uniformly false and that making false claims is not as beneficial as starting to engage in moral fiction. Imagine a history teacher teaching about hobbits as though they were historical fact—this would be wrong. Revolutionary fictionalism argues that we do something similar when making moral claims.&lt;/p&gt;
&lt;p&gt;Thus, we believe what we say, but it is wrong, which leads fictionalists to two options:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;a) Eliminativism: abandon moral talk altogether.&lt;/li&gt;
&lt;li&gt;b) Revolutionary fictionalism: agree that moral talk is systematically false, stop believing what we say, and start pretending.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;For revolutionary fictionalism, the challenge is to show that (b) is better than (a)—that it is more beneficial to engage with fiction and give up reality.&lt;/p&gt;
&lt;h3 id="arguments-7"&gt;Arguments&lt;/h3&gt;
&lt;p&gt;Pro:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="#moral-fiction-as-a-pragmatic-choice"&gt;Moral Fiction as a Pragmatic Choice&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Contra:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="#revolutionary-fictionalism-already-happened"&gt;Revolutionary Fictionalism Already Happened?&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div style="margin-bottom: 100px;"&gt;&lt;/div&gt;

&lt;h2 id="non-descriptive-expressivism"&gt;Non-Descriptive Expressivism&lt;/h2&gt;
&lt;p&gt;So far, we have assumed that if a moral judgment expresses a belief, then this judgment can be thought of as a description of some kind.&lt;/p&gt;
&lt;p&gt;Horgan and Timmons argue that this is a mistake. Instead, we should think of moral judgments as &lt;em&gt;non-descriptive&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;For example, the claim &amp;ldquo;murder is wrong&amp;rdquo; expresses a belief, but it does not have the property of wrongness.&lt;/p&gt;
&lt;p&gt;This view supports cognitivism and rejects realism, while not adhering to error theory. Beliefs do not describe the world as having any moral properties or facts. Instead, they are separated into two categories:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Is-commitments&lt;/strong&gt;: non-moral beliefs.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Ought-commitments&lt;/strong&gt;: moral beliefs.&lt;/li&gt;
&lt;/ul&gt;
&lt;div style="margin-bottom: 100px;"&gt;&lt;/div&gt;

&lt;h2 id="constructivismresponse-dependence-theory"&gt;Constructivism/Response-dependence Theory&lt;/h2&gt;
&lt;p&gt;See &lt;a href="https://monkemanx.github.io/articles/my_metaethical_position/"&gt;My metaethical position&lt;/a&gt;.&lt;/p&gt;
&lt;div style="margin-bottom: 100px;"&gt;&lt;/div&gt;

&lt;h2 id="moral-skepticism"&gt;Moral Skepticism&lt;/h2&gt;
&lt;p&gt;Moral skepticism is an &lt;a href="https://en.wikipedia.org/wiki/Epistemology"&gt;epistemological&lt;/a&gt; claim, meaning it pertains to the process of acquiring moral truths.&lt;/p&gt;
&lt;p&gt;One can be skeptical about various aspects of moral knowledge. For example, one could deny the possibility of acquiring moral knowledge, or one could deny that there is justification for morality.&lt;/p&gt;
&lt;p&gt;It asserts that we cannot know:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Whether testing suffocating gas on political prisoners is morally right or wrong.&lt;/li&gt;
&lt;li&gt;Whether the Holocaust is morally right or wrong.&lt;/li&gt;
&lt;li&gt;Whether producing artificial famine is morally right or wrong.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="arguments-8"&gt;Arguments&lt;/h3&gt;
&lt;p&gt;Pro:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="#Epistemological-regression-argument"&gt;Epistemological Regression Argument&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Contra:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="#moorean-shift"&gt;Moorean Shift&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div style="margin-bottom: 100px;"&gt;&lt;/div&gt;

&lt;h2 id="intuitionism"&gt;Intuitionism&lt;/h2&gt;
&lt;p&gt;Intuitionism holds that epistemological moral progress stops with moral beliefs that are justified through non-inferential means.&lt;/p&gt;
&lt;p&gt;So, how do we justify these claims?
An intuitionist answer is &lt;em&gt;prior reflection&lt;/em&gt;: Some moral beliefs are self-evident, and from there, we can make inferences.&lt;/p&gt;
&lt;h3 id="arguments-9"&gt;Arguments&lt;/h3&gt;
&lt;p&gt;Pro:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="#Epistemological-regression-argument"&gt;Epistemological Regression Argument&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div style="margin-bottom: 100px;"&gt;&lt;/div&gt;

&lt;h2 id="coherentism"&gt;Coherentism&lt;/h2&gt;
&lt;p&gt;The premise is that moral knowledge is possible. The basic idea is that moral beliefs are justified if they form a coherent set of beliefs.&lt;/p&gt;
&lt;p&gt;This idea might seem a bit circular, similar to how a Christian might argue that God is justified because of the Bible, and the Bible is justified because of God. However, there is an important difference: the Bible and God example relies on a &lt;em&gt;linear&lt;/em&gt; form of justification. Coherentism, on the other hand, relies on a &lt;em&gt;holistic&lt;/em&gt; account of justification. That is, a raft stays afloat not because of any one particular plank, but because of the combined structure of all the planks together.&lt;/p&gt;
&lt;p&gt;Thus, the belief that giving money to charity is right is correct if it is part of a coherent set of beliefs.&lt;/p&gt;
&lt;p&gt;The last thing we need to explain is: what does &amp;ldquo;coherent&amp;rdquo; mean?
We say something is coherent if it fulfills the following criteria:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Logical consistency&lt;/strong&gt;: The set cannot contain a belief and its negation.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Evidential consistency&lt;/strong&gt;: The weight of beliefs needs to be balanced.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Connectedness&lt;/strong&gt;: The set of beliefs cannot be completely unrelated (e.g., &amp;ldquo;humans have two arms&amp;rdquo; and &amp;ldquo;monkeys are beautiful&amp;rdquo;).&lt;/li&gt;
&lt;li&gt;If we have two sets of beliefs, the one that has more beliefs and is coherent is considered more coherent.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The biggest criticism of coherentism is that the coherent argument does not take truthfulness into account. This means that we may have a coherent set of beliefs that is actually false.&lt;/p&gt;
&lt;h3 id="arguments-10"&gt;Arguments&lt;/h3&gt;
&lt;p&gt;Pro:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="#Epistemological-regression-argument"&gt;Epistemological Regression Argument&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div style="margin-bottom: 100px;"&gt;&lt;/div&gt;

&lt;hr&gt;
&lt;h2 id="arguments-11"&gt;Arguments&lt;/h2&gt;
&lt;h3 id="open-question-argument-oqa"&gt;Open Question Argument (OQA)&lt;/h3&gt;
&lt;h4 id="introduction"&gt;Introduction&lt;/h4&gt;
&lt;p&gt;The &lt;a href="https://en.wikipedia.org/wiki/Open-question_argument"&gt;Open Question Argument&lt;/a&gt; (OQA) (although controversial, as not everyone agrees it&amp;rsquo;s valid) by G.E. Moore suggests that &amp;ldquo;good&amp;rdquo; can&amp;rsquo;t be defined through any natural property in the world but can only be understood as &amp;ldquo;good&amp;rdquo; in itself. This creates a gap: if the descriptive facts of the world don’t tell us what &amp;ldquo;good&amp;rdquo; is, then what does?&lt;/p&gt;
&lt;h4 id="the-argument"&gt;The Argument&lt;/h4&gt;
&lt;p&gt;Questions like &amp;ldquo;Does a triangle have three sides?&amp;rdquo; or &amp;ldquo;Did a virgin have sex?&amp;rdquo; or &amp;ldquo;Does a chessboard have four corners?&amp;rdquo; seem strange because the answer to these questions is already contained within the question itself. We know a triangle has three sides because it is a triangle. We know a chessboard has four corners because it’s a square. Moore calls such questions, where the answer is obvious from the question, &lt;em&gt;closed&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;He compares them to &lt;em&gt;open&lt;/em&gt; questions, where the answer is not clear from the question itself, such as &amp;ldquo;Who is the prettiest person alive?&amp;rdquo; or &amp;ldquo;Should everyone have a gun for self-protection?&amp;rdquo; These questions are open because terms like &amp;ldquo;prettiest&amp;rdquo; and &amp;ldquo;should&amp;rdquo; make the answers unclear.&lt;/p&gt;
&lt;p&gt;We can use this distinction to interrogate definitions of things. If I ask the question &amp;ldquo;Is X the same as Y?&amp;rdquo; and the question is open, we know that &lt;em&gt;X&lt;/em&gt; is not defined as &lt;em&gt;Y&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;We can now apply this to the concept of &amp;ldquo;good&amp;rdquo; in an attempt to define it. We might ask:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&amp;ldquo;Is good pleasure?&amp;rdquo;
&lt;ul&gt;
&lt;li&gt;A sadist might get pleasure from inflicting harm upon someone. Does this make it good?&lt;/li&gt;
&lt;li&gt;Understanding &amp;ldquo;good&amp;rdquo; and &amp;ldquo;pleasure&amp;rdquo; does not settle the matter.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&amp;ldquo;Is good what makes us happy?&amp;rdquo;
&lt;ul&gt;
&lt;li&gt;I might have planned a lazy evening relaxing on the couch, but when my parents call me to help them, I may be unhappy. Does this mean it&amp;rsquo;s not good because of that?&lt;/li&gt;
&lt;li&gt;How is &amp;ldquo;happy&amp;rdquo; defined?&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&amp;ldquo;Is good what makes the gods smile?&amp;rdquo;
&lt;ul&gt;
&lt;li&gt;Would this mean it’s good to sacrifice our child if the gods want it?&lt;/li&gt;
&lt;li&gt;What do terms like &amp;ldquo;sacrifice&amp;rdquo; and &amp;ldquo;wants to&amp;rdquo; mean in this case?&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Moore believes we can raise these types of objections to every possible definition of &amp;ldquo;good,&amp;rdquo; making it an open question. Thus, &amp;ldquo;good&amp;rdquo; is indefinable and can only be understood through itself.&lt;/p&gt;
&lt;h4 id="the-implications"&gt;The Implications&lt;/h4&gt;
&lt;p&gt;If &amp;ldquo;good&amp;rdquo; can&amp;rsquo;t be defined through anything besides itself, it can’t be defined through any properties, whether natural or non-natural.&lt;/p&gt;
&lt;p&gt;In a way, this is similar to &lt;a href="https://en.wikipedia.org/wiki/Is%E2%80%93ought_problem#Functionalist_counterexamples"&gt;Hume&amp;rsquo;s Law&lt;/a&gt;, which asserts that we can’t derive ethical statements from descriptive statements—meaning, you can’t get an &amp;ldquo;ought&amp;rdquo; from an &amp;ldquo;is.&amp;rdquo;&lt;/p&gt;
&lt;p&gt;This led to non-cognitivism becoming popular after G.E. Moore for two reasons. Non-cognitivism suggests that &amp;ldquo;good&amp;rdquo; is an expression of attitude, which aligns with Moore’s implication that moral values can&amp;rsquo;t be derived from natural facts.&lt;/p&gt;
&lt;h3 id="one-oqa-counter"&gt;One OQA Counter&lt;/h3&gt;
&lt;p&gt;The first counter to the OQA is the following: if a person believes that &amp;ldquo;that which is good is what we desire,&amp;rdquo; then the OQA is not an argument against it, but rather an assertion that the given definition is wrong.&lt;/p&gt;
&lt;p&gt;Moore would argue against this by saying that when defining moral statements, popular opinion is much more important than in fields like mathematics, where we can simply say that the person is confused. Thus, if people think that the question &amp;ldquo;What is good?&amp;rdquo; is open, this could be a good reason to think that it is truly open.&lt;/p&gt;
&lt;h3 id="motivation-argument"&gt;Motivation Argument&lt;/h3&gt;
&lt;p&gt;One counter to cognitivism and in favor of non-cognitivism, such as emotivism, is the motivational aspect of moral judgment.&lt;/p&gt;
&lt;p&gt;If morality is a fact—whether natural or non-natural—why are we motivated to follow it?&lt;/p&gt;
&lt;p&gt;For example, if you genuinely believe that vegetarianism is morally correct but then ask, &amp;ldquo;What does this have to do with me?&amp;rdquo; one might think that the person didn’t really understand what &lt;em&gt;morally correct&lt;/em&gt; means.&lt;/p&gt;
&lt;p&gt;Thus, it seems that moral judgments have something built into them that motivates us to act on the fact and do something with it.&lt;/p&gt;
&lt;p&gt;Emotivists do not have this problem. If moral judgments are emotions, it makes much more sense why one would act on them. For instance, one might think hitting a dog is wrong, but if it were just a fact, it wouldn’t motivate us. However, if morality were an emotion, it would motivate one to stop someone from hitting the dog.&lt;/p&gt;
&lt;h3 id="morality-location-challenge"&gt;Morality Location Challenge&lt;/h3&gt;
&lt;p&gt;Imagine you see a man on top of a bridge, throwing puppies from the bridge into the water to kill them. If we now take an empiricist approach, where can we sense the moral wrongness of this? We can see the puppies, we can perhaps hear them cry, and maybe feel their tears. We might even build a device to read their brain activity, and we could detect that the man is gleeful and fully aware of his actions. But again, where is the moral wrongness?&lt;/p&gt;
&lt;p&gt;To see the moral wrongness, we need to look within ourselves. There it is. This speaks to non-cognitivist theories and challenges moral realism.&lt;/p&gt;
&lt;h3 id="instinctual-emotions-argument"&gt;Instinctual Emotions Argument&lt;/h3&gt;
&lt;p&gt;Imagine you are outside wandering the streets and see an innocent, weak homeless man getting beaten. You would say, &amp;ldquo;This is wrong.&amp;rdquo; As we established previously (see &lt;a href="#morality-location-challenge"&gt;Morality Location Argument&lt;/a&gt;), this wrongness is not in the situation but within yourself. If you observe your thought pattern during this exchange, you will notice that you do not think about the situation analytically (e.g., &amp;ldquo;If P then Q, and P is true, so Q&amp;rdquo;). Instead, the wrongness you feel is more instinctual, i.e., emotional.&lt;/p&gt;
&lt;h3 id="emotivism-oqa-approach"&gt;Emotivism OQA Approach&lt;/h3&gt;
&lt;p&gt;If the &lt;a href="#open-question-argument-oqa"&gt;OQA&lt;/a&gt; is true, then moral judgments are not describing something natural; thus, they must describe something &lt;em&gt;non-natural&lt;/em&gt;. But this means they are not empirically verifiable; they would be something metaphysical, and metaphysics is often regarded as speaking nonsense (see Ayer’s paper &amp;ldquo;Claims of Philosophy&amp;rdquo;). Therefore, moral judgments cannot be described by non-naturalism either.&lt;/p&gt;
&lt;p&gt;Thus, we should reject cognitivism and accept non-cognitivism, specifically emotivism. Emotivism does not need to explain what moral properties are, because they do not exist (this is the non-cognitivist view).&lt;/p&gt;
&lt;h3 id="emotions-and-motivation-of-others"&gt;Emotions and Motivation of Others&lt;/h3&gt;
&lt;p&gt;If moral judgments are really just emotions, so that when I utter &amp;ldquo;Torturing is morally wrong,&amp;rdquo; I am simply expressing my feelings, why should anyone besides me be motivated to act against the injustice? Or why should anyone pay attention to me when I am expressing my feelings, especially if they do not care about them?&lt;/p&gt;
&lt;p&gt;If one utters a moral statement, do we not think that this is universally motivating—not only for me but also for others—even if they do not particularly care for me?&lt;/p&gt;
&lt;h3 id="observed-relativism-argument"&gt;Observed &amp;lsquo;Relativism&amp;rsquo; Argument&lt;/h3&gt;
&lt;p&gt;If there are objective moral theories, why do different societies not have the same moral judgments? For example, the Aztecs thought sacrificing humans was acceptable, and indigenous tribes in the Amazon left behind those who were too old to keep up. Even if both parties are fully informed—e.g., two people who are fully informed on the abortion debate—they might still have different views on it.&lt;/p&gt;
&lt;h3 id="the-queerness-argument"&gt;The Queerness Argument&lt;/h3&gt;
&lt;p&gt;What is morality? It should be &lt;em&gt;independent&lt;/em&gt; from our beliefs. Just because many people think something is wrong or right doesn’t make it right or wrong; it should be &lt;em&gt;accessible&lt;/em&gt; to us, meaning there needs to be a way through which we can determine whether actions are right or wrong. Lastly, it needs to give us a &lt;em&gt;reason to act&lt;/em&gt;, &lt;em&gt;irrespective of our desires&lt;/em&gt;—i.e., just because I &lt;em&gt;want&lt;/em&gt; to steal doesn’t mean I should.&lt;/p&gt;
&lt;p&gt;The argument against realism now is that, if &amp;ldquo;objective moral values exist, they would be utterly different from anything in the universe.&amp;rdquo; Why? We might say that a coffee machine fulfills all our prior defined properties: it exists independently from our mind, is accessible to us, and gives us a reason to act. However, this reason to act is not independent of us—it depends on our psychological state, namely, our desire for coffee. But if moral values existed, they would give us a reason to act &lt;em&gt;irrespective&lt;/em&gt; of our psychology. For example, we would know &amp;ldquo;stealing is wrong&amp;rdquo; regardless of our current desires.&lt;/p&gt;
&lt;h3 id="epistemological-queerness"&gt;Epistemological Queerness&lt;/h3&gt;
&lt;p&gt;If we accept that morality is &amp;ldquo;utterly different from anything else in this world,&amp;rdquo; wouldn’t it naturally follow that we would need an &amp;ldquo;utterly different way to access it&amp;rdquo;?&lt;/p&gt;
&lt;p&gt;Meaning, morality would become inaccessible by normal means.&lt;/p&gt;
&lt;h3 id="insensitivity-of-psychology"&gt;Insensitivity of Psychology&lt;/h3&gt;
&lt;p&gt;A friend promises to meet you at the pub, but he becomes depressed. Should he still go to the pub? Error theorists would say that if keeping a promise is good, then he should go, because &amp;ldquo;good&amp;rdquo; is &lt;em&gt;irrespective of psychology&lt;/em&gt;. But many people might not agree and would argue that if he&amp;rsquo;s depressed, he doesn&amp;rsquo;t have to keep his promise. This suggests that morality is not insensitive to people&amp;rsquo;s psychology.&lt;/p&gt;
&lt;h3 id="challenge-to-the-queerness-argument-1"&gt;Challenge to the Queerness Argument 1&lt;/h3&gt;
&lt;p&gt;Error theories and other theories that assume &lt;em&gt;naturalism&lt;/em&gt;—how would they argue against a Platonist who believes that the form of &amp;ldquo;god&amp;rdquo; exists? The Queerness argument that &amp;ldquo;morality is utterly different from anything else&amp;rdquo; is only as strong as the defense of naturalism.&lt;/p&gt;
&lt;h3 id="moorean-shift"&gt;Moorean Shift&lt;/h3&gt;
&lt;p&gt;This argument is called the &lt;em&gt;Moorean Shift&lt;/em&gt;. G.E. Moore first deployed it against skepticism:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;I know I have two hands and the sun is in the sky.&lt;/li&gt;
&lt;li&gt;If the skeptic is correct, then I cannot know that I have two hands and that the sun is in the sky.
Therefore: 3. There is a problem with the skeptic’s argument.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;You can apply the same logic to moral claims:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&amp;ldquo;Torturing children is wrong&amp;rdquo; is true.&lt;/li&gt;
&lt;li&gt;If error theory is correct, then &amp;ldquo;Torturing children is wrong&amp;rdquo; is false.
Therefore: 3. Error theory is wrong.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;For this argument to work, one needs to know at least that some moral claims are true.&lt;/p&gt;
&lt;h3 id="severity-of-moral-claims"&gt;Severity of Moral Claims&lt;/h3&gt;
&lt;p&gt;When deciding where to eat, if you and your friend disagree, you might flip a coin to decide.&lt;/p&gt;
&lt;p&gt;However, this would not be sufficient for moral decisions, such as &amp;ldquo;Is the death penalty moral or not?&amp;rdquo;&lt;br&gt;
It seems to us that moral judgments are more than simple preferences.&lt;/p&gt;
&lt;p&gt;One possible explanation for this is that moral statements point to something true that exists in the world, as moral natural realists claim.&lt;/p&gt;
&lt;h3 id="convergence-of-morality"&gt;Convergence of Morality&lt;/h3&gt;
&lt;p&gt;If we were to put individuals from around the world in a room and ask them to draft the ten most important moral rules, would we expect the rules they create to be relatively similar? Or not?&lt;/p&gt;
&lt;p&gt;If we think they would be similar, doesn’t this suggest some objectivity, and with it, some form of moral realism?&lt;/p&gt;
&lt;h3 id="truth-of-morality"&gt;Truth of Morality&lt;/h3&gt;
&lt;p&gt;If one person thinks late-stage abortion is wrong and another thinks it’s okay, and realism is false, meaning we can both be correct, then it&amp;rsquo;s hard to explain why we cannot accept that both are right.&lt;/p&gt;
&lt;p&gt;Another thing that points in the same direction is the concept of moral progress:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Women are allowed to vote.&lt;/li&gt;
&lt;li&gt;We abolished slavery.&lt;/li&gt;
&lt;li&gt;Children no longer need to work.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If we do have moral progress, then this would suggest we are moving toward something, and this &amp;ldquo;something&amp;rdquo; would be objective. Thus, this points toward realism.&lt;/p&gt;
&lt;h3 id="conceptual-analysis-counter"&gt;Conceptual Analysis Counter&lt;/h3&gt;
&lt;p&gt;Jackson used the Lewis-Ramsey method to define what &lt;em&gt;goodness&lt;/em&gt; is, but crucially, he only defined what it is; he didn&amp;rsquo;t claim that it existed.&lt;/p&gt;
&lt;p&gt;If I compare this to math, the Ramsey-Lewis method just gives a definition in the appropriate language, but it does not provide proof that something with this definition exists.&lt;/p&gt;
&lt;p&gt;One could use the same method to define unicorns, by telling a story about them.&lt;/p&gt;
&lt;h4 id="counter-to-the-counter"&gt;Counter to the Counter&lt;/h4&gt;
&lt;p&gt;Jackson would argue that the difference between a unicorn and morality, as described using this method, is that there is no proof for a unicorn. But there is proof for morality, since we use it regularly.&lt;/p&gt;
&lt;h3 id="conceptual-analysis-and-oqa"&gt;Conceptual Analysis and OQA&lt;/h3&gt;
&lt;p&gt;&lt;a href="#open-question-argument-oqa"&gt;OQA&lt;/a&gt; can possibly be used against Jackson. After we have defined morality using a story, we can ask whether the question of whether morality is defined over the story is open or closed.&lt;/p&gt;
&lt;p&gt;Jackson would argue that whoever thinks that morality, as defined in his story, is an open question and not a closed one, isn&amp;rsquo;t part of the mature folk who have discussed morality. In other words, they either didn&amp;rsquo;t understand it or are too ignorant.&lt;/p&gt;
&lt;h3 id="supervenience-argument-for-naturalism"&gt;Supervenience Argument for Naturalism&lt;/h3&gt;
&lt;p&gt;We say that \(X\) &lt;em&gt;supervenes&lt;/em&gt; on \(Y\) if, in any two situations (\(X\), \(Y\)), \(Y\) can only be different if \(X\) is also different.&lt;/p&gt;
&lt;p&gt;An example of this would be the following: only when the molecules of a table are different can the table itself be different.&lt;/p&gt;
&lt;p&gt;From this, we can establish the so-called &lt;em&gt;counterfactual test&lt;/em&gt;. For instance, if your friend starts drinking and you think it&amp;rsquo;s because his wife beats him, a good test to see if you&amp;rsquo;re right would be to ask yourself: would your friend stop drinking if his wife stopped beating him?&lt;/p&gt;
&lt;p&gt;We can then apply this test to understand why we think a wrongful murder is wrong. Would we still judge the murderer&amp;rsquo;s action as wrong if, as a matter of fact, the action was not wrong? The intuitive answer to the question is &amp;ldquo;no.&amp;rdquo; If the action were not wrong, we wouldn&amp;rsquo;t think it was wrong.&lt;/p&gt;
&lt;p&gt;This means that, if the counterfactual test is valid, then synthetic realism is correct, because the wrongness depends on the action, and asserting that the property of wrongness exists has a genuine explanatory role.&lt;/p&gt;
&lt;h3 id="counter-supervenience-arguments"&gt;Counter-Supervenience Arguments&lt;/h3&gt;
&lt;p&gt;If non-realists are right, there are no moral properties. Thus, asking how our belief would change if we removed the morality property doesn&amp;rsquo;t make sense.&lt;/p&gt;
&lt;h5 id="counter-to-the-counter-1"&gt;Counter to the Counter&lt;/h5&gt;
&lt;p&gt;If the synthetic-realist moral theory is true, then needless suffering has the property of moral wrongness.&lt;/p&gt;
&lt;p&gt;Because of &lt;em&gt;supervenience&lt;/em&gt;, if an action &lt;em&gt;did not&lt;/em&gt; have the property of being wrong, then it would not bring needless suffering. Why? Because the action supervenes on morality.&lt;/p&gt;
&lt;p&gt;In other words, if an action is right or wrong, then the moral property associated with it also needs to change.&lt;/p&gt;
&lt;p&gt;We can rewrite the &lt;em&gt;counterfactual test&lt;/em&gt; as follows: imagine a case where a murder didn&amp;rsquo;t involve needless suffering, and after being murdered, the victim jumped up and asked for more. Would this action then be wrong? Intuitively, we would say &amp;ldquo;no.&amp;rdquo;&lt;/p&gt;
&lt;p&gt;This means that, if the counterfactual test is valid, and if the moral theory is correct (i.e., needless suffering is morally wrong), then it seems that moral properties do have an explanatory role.&lt;/p&gt;
&lt;h3 id="motivation-and-natural-properties"&gt;Motivation and Natural Properties&lt;/h3&gt;
&lt;p&gt;When we use words like &amp;ldquo;ought&amp;rdquo; or &amp;ldquo;should,&amp;rdquo; we label them as &lt;em&gt;normative&lt;/em&gt;, in contrast to &lt;em&gt;descriptive&lt;/em&gt;. These words are used to persuade people to act in a certain way. Normativity allows us to talk about actions being blameworthy or praiseworthy.&lt;/p&gt;
&lt;p&gt;If realism is correct and moral properties exist, they would need to guide us toward action. It would be implausible to say that moral properties exist but do not move us in any way. Therefore, if normative properties exist, they must be intrinsically motivating.&lt;/p&gt;
&lt;p&gt;For example, if I lie to a friend and this action has the property of wrongness, then this wrongness should motivate me to refrain from lying. This is different from natural properties. If my bike is dirty, I might choose to clean it—or I might not. Moral properties, however, should motivate action regardless of one’s psychological state.&lt;/p&gt;
&lt;h4 id="counter"&gt;Counter&lt;/h4&gt;
&lt;p&gt;Moral properties do not necessarily have to be intrinsically motivating. Instead, the motivation could come from within us. For example, through evolutionary psychology, humans have evolved to respond to certain moral properties because such responses promote survival.&lt;/p&gt;
&lt;h3 id="epistemological-divine-command-argument"&gt;Epistemological Divine Command Argument&lt;/h3&gt;
&lt;p&gt;If something is right or wrong &lt;em&gt;if and only if&lt;/em&gt; God commands or forbids it, then it cannot be discovered through natural means because God is outside the universe and independent of the natural world.&lt;/p&gt;
&lt;h3 id="arbitrariness-of-morality-argument"&gt;Arbitrariness of Morality Argument&lt;/h3&gt;
&lt;p&gt;This argument is often used against utilitarianism but can also be applied to divine command theory.&lt;/p&gt;
&lt;p&gt;Because God is sovereign, He could theoretically command actions like child sacrifice, and in that case, child sacrifice would be considered moral. But if we say that anything can be deemed immoral, wouldn&amp;rsquo;t child sacrifice fall under this category?&lt;/p&gt;
&lt;p&gt;Thus, we are left with two options:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;We must either abandon divine command theory, or&lt;/li&gt;
&lt;li&gt;We must accept that certain things (like child sacrifice) are always immoral, regardless of God&amp;rsquo;s commands.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="counter-to-the-arbitrariness-of-morality-argument"&gt;Counter to the Arbitrariness of Morality Argument&lt;/h3&gt;
&lt;p&gt;In the arbitrariness argument, we posited that God could theoretically command us to do anything, and it would be moral, even if we felt it was immoral. For example:&lt;/p&gt;
&lt;p&gt;a) Some actions, such as genocide, are always morally wrong.&lt;br&gt;
b) God could command any action, including genocide.&lt;br&gt;
c) If divine command theory is true, then genocide could be morally right.&lt;/p&gt;
&lt;p&gt;We are left with two options:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;One could reject (a) and argue that moral intuitions are arbitrary.&lt;/li&gt;
&lt;li&gt;Or one could reject (b) and claim that God only commands actions that are good because God&amp;rsquo;s character is infinitely good.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="russ-shafer-landau-argument"&gt;Russ Shafer-Landau Argument&lt;/h3&gt;
&lt;p&gt;Russ Shafer-Landau argues that moral properties exist and are non-natural.&lt;/p&gt;
&lt;p&gt;He defines a non-natural property as one that would be eliminated once we have perfected science, meaning that only natural properties would remain in a perfected science.&lt;/p&gt;
&lt;p&gt;For example:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;If perfected physics requires quarks to exist, then quarks are natural properties.&lt;/li&gt;
&lt;li&gt;If perfected chemistry requires sodium to exist, then sodium is a natural property.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Shafer-Landau argues that morality is a property that would be eliminated, and thus it is non-natural. He believes this because ethics is not a natural or social science.&lt;/p&gt;
&lt;p&gt;The distinction between natural sciences and ethics is that natural sciences discover their principles or axioms &lt;em&gt;posterior&lt;/em&gt;—meaning through evidence and experimentation. In contrast, ethics discovers moral truths &lt;em&gt;a priori&lt;/em&gt;, meaning without relying on empirical experimentation but through reasoning.&lt;/p&gt;
&lt;h4 id="why-shafer-landau-believes-ethical-truths-are-discovered-a-priori"&gt;Why Shafer-Landau believes ethical truths are discovered &lt;em&gt;a priori&lt;/em&gt;:&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Multiple Realizability&lt;/strong&gt;: Any mental state can be realized in an indefinite number of ways. For instance, if an alien winced, we would say they are in pain, regardless of how their biology functions.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Shafer-Landau argues that this applies to moral properties as well. An action can be wrong even though it may have many different properties (e.g., it might cause pain or pleasure, it might be legal or illegal, etc.).&lt;/li&gt;
&lt;li&gt;Because there is no set of properties with which we can define morality, this leads him to think that morality is irreducible.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Property Dualism&lt;/strong&gt;: Philosophers who argue that mental states cannot be reduced to physical ones either follow Descartes, claiming the mind is a separate substance from the body (Substance Dualism), or follow Jackson, claiming that mental properties are distinct from physical ones (Property Dualism).&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Shafer-Landau&amp;rsquo;s non-naturalist moral realism follows the Jackson route. He believes that non-natural moral properties are properties of natural substances, as opposed to divine command theory, which argues that non-natural properties are properties of non-natural substances.&lt;/li&gt;
&lt;li&gt;This means that Shafer-Landau&amp;rsquo;s approach does not require the existence of non-natural substances, which would raise questions about their ontology (i.e., what they are).&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;In contrast to the natural sciences, philosophy does not rely on empirical results to make claims. A metaphysician does not need grant money to purchase lab equipment, for example. This supports the idea that philosophical claims are not dependent on empirical discoveries, further reinforcing Shafer-Landau&amp;rsquo;s belief that moral properties are non-natural rather than natural.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="moral-claims-and-logic-in-non-cognitivism"&gt;Moral Claims and Logic in Non-Cognitivism&lt;/h3&gt;
&lt;p&gt;If moral statements really express a non-cognitive state, such as emotions in emotivism, then statements like &amp;ldquo;stealing is wrong&amp;rdquo; would be translated to &amp;ldquo;stealing, boo!&amp;rdquo; or &amp;ldquo;boo!&amp;rdquo; expressing disapproval.&lt;/p&gt;
&lt;p&gt;However, this raises a question: how can we make sense of such statements in logical contexts?&lt;/p&gt;
&lt;p&gt;For example, consider the statement &amp;ldquo;Killing is wrong or lying is wrong.&amp;rdquo; Under emotivism, this would translate to &amp;ldquo;Killing, boo! or lying, boo!&amp;rdquo; This seems just as nonsensical as saying &amp;ldquo;WOW or Ugh!&amp;quot;—a combination of emotional exclamations that do not form a coherent logical proposition.&lt;/p&gt;
&lt;p&gt;It’s like trying to make logical arguments but replacing the statements with gibberish. In a logical framework, the use of emotive expressions in place of actual propositions doesn&amp;rsquo;t seem to preserve meaningful reasoning or coherence.&lt;/p&gt;
&lt;h3 id="the-frege-geach-problem"&gt;The Frege-Geach Problem&lt;/h3&gt;
&lt;p&gt;If non-cognitivism is true, then the &lt;em&gt;meaning&lt;/em&gt; of moral claims should vary depending on whether they are asserted or not. However, in practice, we don’t usually think this way.&lt;/p&gt;
&lt;p&gt;We can make moral claims by uttering a statement such as &amp;ldquo;Killing is wrong,&amp;rdquo; but we can also make moral claims using other features of language, such as &lt;em&gt;conditionals&lt;/em&gt; and &lt;em&gt;disjunctions&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;For example, consider a conditional: &amp;ldquo;&lt;strong&gt;If&lt;/strong&gt; child sacrifice is wrong, &lt;strong&gt;then&lt;/strong&gt; Abraham was wrong in attempting to sacrifice Isaac.&amp;rdquo; Importantly, in this case, we are not asserting that child sacrifice is wrong; we&amp;rsquo;re just considering the consequences of the claim.&lt;/p&gt;
&lt;p&gt;Another example is a disjunction: &amp;ldquo;Child sacrifice is wrong &lt;strong&gt;or&lt;/strong&gt; lying is wrong.&amp;rdquo; Here again, we are not asserting that either of these actions is wrong, merely stating a possibility.&lt;/p&gt;
&lt;p&gt;Non-cognitivists claim that when we make a moral claim, we are expressing a non-cognitive state. However, when we do not make a moral claim (as in a conditional or disjunction), we are not expressing a non-cognitive state.&lt;/p&gt;
&lt;p&gt;This means that when we say &amp;ldquo;Child sacrifice is wrong,&amp;rdquo; we are expressing a non-cognitive state. But when we say &amp;ldquo;If child sacrifice is wrong, then Abraham was wrong in attempting to sacrifice Isaac,&amp;rdquo; we are &lt;strong&gt;not&lt;/strong&gt; expressing a non-cognitive state, even though we still refer to a moral claim.&lt;/p&gt;
&lt;p&gt;Thus, the meaning of &lt;em&gt;moral claims&lt;/em&gt; seems to change depending on the context. In one case, when we make a direct moral statement, we express a non-cognitive state. In another, when we use a conditional or disjunction, we don’t. This creates a problem because the meaning of moral claims should ideally be consistent, regardless of how we express them.&lt;/p&gt;
&lt;p&gt;To make this clearer:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&amp;ldquo;Killing is wrong&amp;rdquo; is a moral statement, so it expresses a non-cognitive state.&lt;/li&gt;
&lt;li&gt;&amp;ldquo;If killing is wrong, then soldiers should not kill&amp;rdquo; is &lt;strong&gt;not&lt;/strong&gt; a moral assertion; here, &amp;ldquo;killing is wrong&amp;rdquo; takes on a different meaning.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The problem arises because it seems illogical that the meaning of moral claims should change depending on the literary device we use to express them. This inconsistency leads to issues when applying logical reasoning.&lt;/p&gt;
&lt;p&gt;Let’s consider &lt;a href="https://en.wikipedia.org/wiki/Modus_ponens"&gt;modus ponens&lt;/a&gt;, a common form of argument:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;A&lt;/li&gt;
&lt;li&gt;If A, then B
Therefore,&lt;/li&gt;
&lt;li&gt;B&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;For non-cognitivists, in (1) A is asserted, but in (2) A is not asserted. In other words, A changes between (1) and (2), making it unclear whether (3) logically follows.&lt;/p&gt;
&lt;p&gt;For example:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Torture is wrong&lt;/li&gt;
&lt;li&gt;If torture is wrong, then I am wrong when I torture children.
Therefore,&lt;/li&gt;
&lt;li&gt;Torturing children is wrong.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;This seems to make sense. But when we apply the non-cognitivist framework, it gets translated as:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Torture is boo!&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;If &lt;em&gt;torture is wrong&lt;/em&gt;, then I am wrong when I torture children.
Therefore,&lt;/li&gt;
&lt;li&gt;Torturing children is wrong.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Most notably, only (1) is translated into an emotive expression (&amp;ldquo;boo!&amp;rdquo;), while (2) remains unchanged as a conditional. This is because only (1) is an assertion, while (2) is a conditional.&lt;/p&gt;
&lt;p&gt;This causes a breakdown in the argument because for modus ponens to work, the statement \( A \) in (1) and (2) must be the same. But under non-cognitivism, they are not, leading to a failure in the logical structure.&lt;/p&gt;
&lt;p&gt;Thus, under a non-cognitivist view, one of the most important rules of logic no longer works for moral claims. This problem does not arise for cognitivist positions, where moral claims retain their logical consistency across different forms of expression.&lt;/p&gt;
&lt;h3 id="blackburn-counter-to-the-frege-geach-problem"&gt;Blackburn Counter to the Frege-Geach Problem&lt;/h3&gt;
&lt;p&gt;Blackburn offers a solution to the Frege-Geach problem by introducing the notion of &lt;em&gt;sensibility&lt;/em&gt;. He defines sensibility as a set of properties that shape how one reacts to a given situation.&lt;/p&gt;
&lt;p&gt;For instance, some people may become angrier at injustice than others, while others may have a disposition to cry at acts of cruelty.&lt;/p&gt;
&lt;p&gt;People, in general, do not prefer certain sensibilities over others, but they tend to favor sensibilities that lead to consistent behavior rather than erratic or unpredictable responses.&lt;/p&gt;
&lt;p&gt;With this in mind, Blackburn is now in a position to preserve &lt;em&gt;modus ponens&lt;/em&gt; without relying on discussions of validity or truth.&lt;/p&gt;
&lt;p&gt;Let’s revisit the example:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Torture is wrong.&lt;/li&gt;
&lt;li&gt;If torture is wrong, then I am wrong when I torture children.
Therefore,&lt;/li&gt;
&lt;li&gt;Torturing children is wrong.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;In this context, we can interpret (1) as expressing an attitude of disapproval toward torture. Meanwhile, (2) conveys an attitude toward &lt;em&gt;moral sensibility&lt;/em&gt;, meaning it expresses disapproval toward people whose moral sensibility includes both a disapproval of torture and a lack of approval of the speaker torturing children.&lt;/p&gt;
&lt;p&gt;The key point here is that moral sensibility must be consistent. If we were to deny (3), our sensibilities would be inconsistent because we would be condoning an act (torturing children) that contradicts the disapproval expressed in (1) and (2).&lt;/p&gt;
&lt;p&gt;Thus, the validity of modus ponens is preserved in Blackburn’s framework by maintaining a consistent moral sensibility. Rather than focusing on the truth or validity of statements in the traditional logical sense, the consistency of one’s moral reactions is what ensures the coherence of the argument.&lt;/p&gt;
&lt;h3 id="why-realism-when-non-cognitivism-is-true"&gt;Why Realism When Non-Cognitivism Is True?&lt;/h3&gt;
&lt;p&gt;Imagine a world with no moral truths, where moral language only expresses emotions like &amp;ldquo;booh!&amp;rdquo; (disapproval) or &amp;ldquo;hurray!&amp;rdquo; (approval). In such a world, we could not engage in more sophisticated moral discussions about what is right or wrong, because moral claims would just express feelings rather than facts.&lt;/p&gt;
&lt;p&gt;To have meaningful moral debates, we&amp;rsquo;d need a framework where moral statements can be true or false—something akin to moral realism. Without moral truths, our moral discourse would be limited to simple emotional expressions, making complex moral reasoning difficult. Thus, even in a non-cognitivist world, moral language might evolve toward realism to support deeper moral discussions.&lt;/p&gt;
&lt;h3 id="why-non-cognitivism-instead-of-realism"&gt;Why Non-Cognitivism Instead of Realism&lt;/h3&gt;
&lt;p&gt;Blackburn presents three arguments against moral realism in favor of non-cognitivism:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Economical&lt;/strong&gt;:&lt;br&gt;
Non-cognitivism is more economical, requiring only the natural world and people&amp;rsquo;s states. Realism, on the other hand, is more complex and requires the existence of moral facts, making it less economical. This argument rests on the idea that simpler theories are often more accurate.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Moral Psychology&lt;/strong&gt;:&lt;br&gt;
Blackburn argues that moral judgments must motivate action, and this motivation stems from desires, not beliefs. According to &lt;em&gt;Humean internalism&lt;/em&gt;, beliefs and desires are distinct, so moral judgments cannot be beliefs. This undermines cognitivism, which treats moral judgments as beliefs that do not inherently motivate action.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Supervenience&lt;/strong&gt;:&lt;br&gt;
Supervenience suggests that identical natural properties imply identical moral properties. Blackburn argues that it&amp;rsquo;s implausible to &amp;ldquo;read off&amp;rdquo; moral properties simply by understanding natural ones. For instance, we can&amp;rsquo;t just observe pain to conclude it’s wrong without a moral framework. If moral theories merely rest on natural facts, they become redundant and fail to guide decision-making.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Together, these arguments suggest that non-cognitivism is a more viable theory than realism.&lt;/p&gt;
&lt;h3 id="normative-reason-and-agent-relativism"&gt;Normative Reason and Agent Relativism&lt;/h3&gt;
&lt;p&gt;Imagine a hot spring in front of you. Wanting to jump in and bathe represents a &lt;em&gt;motivating reason&lt;/em&gt;. However, if the water is scalding hot and you would die, the reason not to jump in is a &lt;em&gt;normative reason&lt;/em&gt;. Normative reasons are those that suggest what one should do, independent of their current motivation.&lt;/p&gt;
&lt;p&gt;If an agent has a reason to act in a certain way, but is not motivated to do so, this challenges &lt;em&gt;agent relativism&lt;/em&gt;. For example, a shy person who accidentally ends up at a party may have a reason to participate (a normative reason), even though they lack the motivation to do so. This scenario illustrates &lt;em&gt;external&lt;/em&gt; reasons — reasons not tied to an agent&amp;rsquo;s internal desires or motivations.&lt;/p&gt;
&lt;p&gt;If external reasons exist, this suggests that moral judgments, like condemning Hitler, can be independent of one&amp;rsquo;s moral framework, challenging agent relativism.&lt;/p&gt;
&lt;h3 id="speaker-relativism-and-universality-of-moral-claims"&gt;Speaker Relativism and Universality of Moral Claims&lt;/h3&gt;
&lt;p&gt;When people make moral claims, they typically present them as universal (&amp;ldquo;Murder is wrong&amp;rdquo;), rather than caveating them with &amp;ldquo;only for me.&amp;rdquo; This implies that, according to &lt;em&gt;speaker relativism&lt;/em&gt;, when people assert moral claims, they may not be speaking the truth in an absolute sense, since the truth would be relative.&lt;/p&gt;
&lt;p&gt;This leads to &lt;em&gt;error theory&lt;/em&gt; — the view that all moral claims are false because their truth is relative. A counter-argument for speaker relativists could be that moral truth is relative even if our language does not explicitly convey this relativity.&lt;/p&gt;
&lt;h3 id="disagreements-in-relativism"&gt;Disagreements in Relativism&lt;/h3&gt;
&lt;p&gt;In moral disagreements, a moral realist would say one party is objectively wrong. A relativist, however, would claim that each person is simply operating within their own moral framework, meaning they are not mistaken but are instead having a faultless disagreement. If people share the same framework, they might agree on moral issues.&lt;/p&gt;
&lt;p&gt;A critique of this view is that if &amp;ldquo;abortion is wrong&amp;rdquo; only means &amp;ldquo;abortion is wrong for me,&amp;rdquo; then disagreements about moral claims become meaningless, as they no longer express shared values but rather individual perspectives.&lt;/p&gt;
&lt;h3 id="epistemological-regression-argument"&gt;Epistemological Regression Argument&lt;/h3&gt;
&lt;p&gt;To know something, we need to be justified in believing it. For example, to know that a cat is in the garden, we need to see or hear it. However, this leads to an infinite regress:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;I know the cat is in the garden because I see it.&lt;/li&gt;
&lt;li&gt;But why do I believe I see it?&lt;/li&gt;
&lt;li&gt;Because my eyes are open.&lt;/li&gt;
&lt;li&gt;Why do I believe my eyes are open?&lt;/li&gt;
&lt;li&gt;And so on&amp;hellip;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;There are several ways to address this problem, which correspond to different epistemological positions:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;a) Infinite regress in beliefs&lt;/strong&gt;: Accept that belief justification requires an infinite regress.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;b) Skepticism&lt;/strong&gt;: The regress stops, but beliefs are not justified.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;c) Intuitionism&lt;/strong&gt;: The regress stops, but some beliefs are justified non-inferentially (directly known).&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;d) Coherentism&lt;/strong&gt;: The regress stops because some beliefs are justified as part of a coherent system of beliefs.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;b)Skepticism&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;A skeptic would argue that although we may feel certain that something is morally right or wrong, we shouldn&amp;rsquo;t trust those feelings as evidence for knowing the truth. Feelings and experiences can be manipulated, and thus cannot serve as reliable foundations for knowledge.&lt;/p&gt;
&lt;p&gt;The skeptic critiques other positions:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Intuitionism&lt;/strong&gt;: The idea that we know something is right (e.g., giving money to charity) because we simply believe it seems unconvincing. Belief alone doesn&amp;rsquo;t justify knowledge.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Coherentism&lt;/strong&gt;: If a belief is justified only because it fits into a coherent system, the skeptic asks, &amp;ldquo;Where does the justification come from?&amp;rdquo;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The skeptic&amp;rsquo;s argument is that moral beliefs are often inferred from other beliefs, but at the end of these inferences, there’s no further justification for the final belief. This lack of ultimate justification leaves moral beliefs &amp;ldquo;floating free&amp;rdquo; and unanchored.&lt;/p&gt;
&lt;p&gt;If moral skepticism is correct, then we cannot know that actions like killing have the property of &amp;ldquo;wrongness,&amp;rdquo; making moral realism (the idea that moral facts exist independently of our beliefs) less attractive.&lt;/p&gt;
&lt;h3 id="revolutionary-fictionalism-already-happened"&gt;Revolutionary Fictionalism Already Happened?&lt;/h3&gt;
&lt;p&gt;Imagine a society adopts the framework of revolutionary fictionalism, where parents teach their children that moral beliefs are just fictional constructs. After generations of passing down this theory, could people eventually begin to see these fictions as truths?&lt;/p&gt;
&lt;p&gt;If this is the case, how do we know that the revolution desired by revolutionary fictionalists hasn’t already occurred? Could it be that we already believe in morality as a fiction, but mistake it for truth?&lt;/p&gt;
&lt;p&gt;A fictionalist might respond by saying that, unlike the proposed scenario, we don’t &amp;ldquo;pretend&amp;rdquo; to believe in morality—we actually believe in it. But this raises the question: what’s the difference between truly believing that &amp;ldquo;killing is wrong&amp;rdquo; and merely making-believe that &amp;ldquo;killing is wrong&amp;rdquo;?&lt;/p&gt;
&lt;h3 id="moral-fiction-as-a-pragmatic-choice"&gt;Moral Fiction as a Pragmatic Choice&lt;/h3&gt;
&lt;p&gt;Now, consider a scenario where we discover that &amp;ldquo;Mars&amp;rdquo; is a fabrication, due to faulty equipment and calculations. Over time, society would likely stop talking about Mars, but few proponents of error theory would advocate for eliminating morality altogether. Most would argue that even if we recognize it as a fiction, we still gain something from maintaining moral beliefs.&lt;/p&gt;
&lt;p&gt;One reason to entertain the fiction of morality is for coordinating actions. Terms like &amp;ldquo;ought&amp;rdquo; and &amp;ldquo;should&amp;rdquo; make it easier to coordinate behavior. Believing in morality might be more effective than eliminating it, as it helps people work together.&lt;/p&gt;
&lt;p&gt;Another benefit of maintaining a moral fiction, rather than embracing eliminativism, can be seen in real-world examples. For instance, doctors report that more people are surviving gunshot wounds today, and one explanation is that people react to wounds as they’ve seen superheroes do in movies. This make-believe helps them believe they can survive more than they really can, which increases their chances of survival.&lt;/p&gt;
&lt;p&gt;Similarly, when someone is trying to get fit, it’s more effective to frame their exercise regimen as an authoritative rule, like &amp;ldquo;I &lt;strong&gt;must&lt;/strong&gt; run 10km every day.&amp;rdquo; This kind of make-believe can help them stay motivated and on track, even though they don’t have to run that distance. By treating certain actions as &amp;ldquo;right&amp;rdquo; or &amp;ldquo;wrong,&amp;rdquo; people can increase self-control and benefit from the structure that the moral fiction provides. This may be more effective than abandoning morality altogether.&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;References:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.amazon.de/-/en/Andrew-Fisher/dp/1844652580"&gt;Metaethics: An Introduction&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://plato.stanford.edu/index.html"&gt;Stanford Encyclopedia of Philosophy&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.routledge.com/Metaethics-A-Contemporary-Introduction/vanRoojen/p/book/9780415894425"&gt;Metaethics: A Contemporary Introduction&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.youtube.com/@CosmicSkeptic"&gt;Alex O Conner&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>Neither Is There Freedom, Nor Do You Want It!</title><link>https://monkemanx.github.io/articles/about_freedom/</link><pubDate>Thu, 21 Nov 2024 00:00:00 +0000</pubDate><author>monkeman@cock.li (MonkeMan)</author><guid>https://monkemanx.github.io/articles/about_freedom/</guid><description>&lt;h2 id="1-introduction-and-premise"&gt;1. Introduction and Premise&lt;/h2&gt;
&lt;p&gt;How often have you heard phrases like, &amp;ldquo;I wish I were free&amp;rdquo;? Freedom is one of those concepts almost universally regarded in a positive light. It holds such significance that American culture, for instance, is arguably built upon this principle.&lt;/p&gt;
&lt;p&gt;In this article, I assume a person who seeks freedom also does not want to act immorally. This seems reasonable, as morality is generally equated with goodness. Note that this is a weaker assumption than the idea that humans &lt;em&gt;are&lt;/em&gt; fundamentally good—a long-standing philosophical debate between thinkers like &lt;a href="https://en.wikipedia.org/wiki/Mencius"&gt;Mencius&lt;/a&gt; and &lt;a href="https://en.wikipedia.org/wiki/Xunzi_(philosopher)"&gt;Xunzi&lt;/a&gt; (&lt;a href="https://transnationalhistory.net/world/2021/09/the-nature-of-xunzi-comparison-between-mencius-and-xunzi-on-the-nature-of-human-essence/"&gt;more on their debate here&lt;/a&gt;). I only assume that people &lt;em&gt;want&lt;/em&gt; to be good.&lt;/p&gt;
&lt;h2 id="2-a-naive-approach-to-freedom"&gt;2. A Naive Approach to Freedom&lt;/h2&gt;
&lt;p&gt;But what is freedom? A naive answer might be, &amp;ldquo;Freedom is the ability to do whatever one wants.&amp;rdquo; However, since ancient times—dating back to the &lt;a href="https://en.wikipedia.org/wiki/Code_of_Hammurabi"&gt;Code of Hammurabi&lt;/a&gt; and the establishment of the first &lt;a href="https://en.wikipedia.org/wiki/Social_contract"&gt;social contracts&lt;/a&gt;—this has not been entirely true. If we consider modern society, there are clearly things one is prohibited from doing under the threat of punishment. Thus, certain restrictions are placed on individuals. Or are they?&lt;/p&gt;
&lt;p&gt;Technically, one could still act in ways that violate the social contract if they believed they could get away with it. However, in such cases, society would view them as either immoral (which we assume humans try to avoid) or as foolish if the disadvantages outweigh the benefits.&lt;/p&gt;
&lt;p&gt;One might counter that laws and morality are not the same. This is true; for example, slavery was legal for much of human history, yet today we regard it as deeply immoral. This argument, however, only narrows the restrictions on freedom to those laws said individual considers moral. What if someone deemed all laws immoral, or if they lived in a lawless society (an anarchist&amp;rsquo;s wet dream)? Even then, by participating—actively or passively—in society, we inevitably become part of a social contract. This unwritten agreement dictates rules and behaviors necessary for a functioning society. Such a contract exists on a metaphysical level in every interaction between people. Its most basic form is embodied in the &lt;a href="https://en.wikipedia.org/wiki/Golden_Rule"&gt;Golden Rule&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id="3-a-more-realistic-approach-to-freedom"&gt;3. A more realistic Approach to freedom?&lt;/h2&gt;
&lt;p&gt;We can adjust our definition of freedom to include this idea: &lt;em&gt;&amp;ldquo;Freedom is doing whatever I want, excluding actions that violate the social contract.&amp;rdquo;&lt;/em&gt; However, even this definition falls short. Rather than viewing freedom on a societal (macro) level, let us examine it on a personal (micro) level, focusing on individuals and their connections to the world around them.&lt;/p&gt;
&lt;p&gt;No one is born into this world without connections, and throughout life, these connections only multiply: family, friends, pets, property, and so on. At first, as young children, these connections may seem one-dimensional. Parents provide food, friends play games, pets offer companionship. But as we grow, these relationships become far more complex.&lt;/p&gt;
&lt;p&gt;We may be expected to contribute to the household by doing chores, help a friend move, or take the dog for a walk. These are things we &lt;em&gt;must&lt;/em&gt; do—there is no real option to avoid them if we want to maintain these connections and act in a morally righteous way. In this sense, connections impose restrictions on our freedom.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Speech&lt;/strong&gt;: Your words are no longer entirely free because they can hurt the people around you.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Actions&lt;/strong&gt;: Your behavior is limited by obligations to others. For example, you might want to spend a Saturday relaxing and watching TV, but a friend needs your help moving.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Thoughts&lt;/strong&gt;: Even your mental freedom is restricted to some extent. You may need to plan gifts for birthdays, manage responsibilities, or worry about others.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Where, then, is the freedom in all of this?&lt;/p&gt;
&lt;h2 id="4-what-about-free-will"&gt;4. What about Free Will?&lt;/h2&gt;
&lt;p&gt;Let us redefine freedom again: &lt;em&gt;&amp;ldquo;Freedom is doing whatever I want, excluding actions that violate the social contract and the obligations arising from my connections to others.&amp;rdquo;&lt;/em&gt; However, this definition is no more valid than the previous one. To illustrate why, let us examine the concept of freedom on an even smaller scale—consider a single action you can take right now: lifting your arm. Do you truly have freedom in performing this action?&lt;/p&gt;
&lt;p&gt;Most people would instinctively say yes and might even lift their arm to prove it. But this response actually supports my argument, not theirs. For any action to occur, one of two things must be true:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;The action happened randomly, without any cause.&lt;/li&gt;
&lt;li&gt;The action happened because of a cause.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;If the action was truly random, where is the freedom in that? Freedom implies intentionality—&lt;em&gt;you&lt;/em&gt; must decide the action. But in this case, the action was decided by chance or randomness, not by you.&lt;/p&gt;
&lt;p&gt;Now consider the second case: you lifted your arm not randomly, but for a reason. Perhaps you wanted to prove your freedom to me or simply scratch an itch. Whatever the reason, your action had a cause. But is there freedom in an action dictated by a cause?&lt;/p&gt;
&lt;p&gt;Here, we encounter two philosophical perspectives:&lt;/p&gt;
&lt;h3 id="41-total-materialism-determinism"&gt;4.1. Total Materialism (Determinism)&lt;/h3&gt;
&lt;p&gt;If we believe in total materialism, then every action in the universe can be reduced to material processes governed by physical laws. In this view, there are always conditions (inputs) that determine what will happen. For instance, we wouldn&amp;rsquo;t say that the apple that fell on Newton&amp;rsquo;s head was &amp;ldquo;free&amp;rdquo; not to fall. The law of gravity dictated that it would fall, not levitate. Similarly, all human actions would be bound by the deterministic laws of physics, leaving no room for freedom.&lt;/p&gt;
&lt;h3 id="42-non-materialist-views"&gt;4.2. Non-Materialist Views&lt;/h3&gt;
&lt;p&gt;Suppose we reject determinism and believe in something beyond materialism—call it the soul, the &lt;a href="https://en.wikipedia.org/wiki/Theory_of_forms"&gt;realm of forms&lt;/a&gt; (as Plato might), or a spiritual realm. Even if such a realm exists, does it rescue free will?&lt;/p&gt;
&lt;p&gt;Not really. Imagine that a &amp;ldquo;soul&amp;rdquo; controls our actions like a puppet master pulling strings. Where is the freedom in being controlled by your soul? One might counter that the soul &lt;em&gt;is&lt;/em&gt; oneself, but this only restates the problem. If the soul drives actions, it still faces the same dilemma as the materialistic view:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Either the soul&amp;rsquo;s actions are random (and thus not truly free), or&lt;/li&gt;
&lt;li&gt;They are caused by something else (removing freedom, as the cause determines the action).&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Even if we introduce yet another higher mechanism influencing the soul, we merely shift the problem to the next level, leading to an &lt;a href="https://en.wikipedia.org/wiki/Infinite_regress"&gt;infinite regress&lt;/a&gt; where free will is never truly found.&lt;/p&gt;
&lt;h3 id="43-a-case-study"&gt;4.3 A Case Study&lt;/h3&gt;
&lt;p&gt;Consider a &lt;a href="https://www.newscientist.com/article/dn2943-brain-tumour-causes-uncontrollable-paedophilia/"&gt;famous case&lt;/a&gt; of uncontrollable behavior caused by a brain tumor. A previously ordinary 40-year-old man suddenly developed pedophilic urges. An MRI scan revealed a tumor pressing on parts of his brain. When the tumor was removed, the urges disappeared—only to reappear when the tumor regrew, and vanish again after another surgery.&lt;/p&gt;
&lt;p&gt;This case illustrates that even deeply personal thoughts and desires can be dictated by physical processes beyond one&amp;rsquo;s control. How, then, can we speak of freedom when actions and intentions are so easily manipulated?&lt;/p&gt;
&lt;p&gt;This section draws inspiration from Sam Harris&amp;rsquo;s aweasome book, &lt;em&gt;&lt;a href="https://en.wikipedia.org/wiki/Free_Will_(book)"&gt;Free Will&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;
&lt;h2 id="5-there-is-no-freedom"&gt;5. There is no &amp;ldquo;Freedom&amp;rdquo;&lt;/h2&gt;
&lt;p&gt;Let us redefine freedom one final time: &lt;em&gt;&amp;ldquo;Freedom is doing whatever I want, excluding actions that violate the social contract, excluding obligations to others, and excluding all actions of mine.&amp;rdquo;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;By this definition, freedom seems to vanish entirely. There is no freedom on the macro societal scale, no freedom at the micro scale of a single action, and no freedom when we examine an individual and their relationships. What freedom, then, is truly left?&lt;/p&gt;
&lt;p&gt;Some may argue that including the micro scale in our definition trivializes freedom or unfairly complicates the discussion. They might claim that if we leave out the micro scale, the definition remains adequate. Others may adopt a position similar to &lt;a href="https://en.wikipedia.org/wiki/Compatibilism"&gt;compatibilism&lt;/a&gt;, which suggests that free will is not &amp;ldquo;real&amp;rdquo; in the strictest sense, but the concept remains useful.&lt;/p&gt;
&lt;p&gt;Both of these positions, however, fail to address the core issue. They shift the debate toward a &lt;em&gt;theory of language&lt;/em&gt;—how we should use terms like &amp;ldquo;freedom&amp;rdquo;—and could be considered &lt;a href="https://en.wikipedia.org/wiki/Linguistic_prescription"&gt;linguistic prescriptivism&lt;/a&gt;. Even if we discard the micro scale, the restrictions imposed by societal contracts and obligations are enough to strip the concept of freedom from its idealized sense of &amp;ldquo;I can do whatever I want.&amp;rdquo;&lt;/p&gt;
&lt;h2 id="6-do-we-even-want-true-freedom"&gt;6. Do We Even Want True Freedom?&lt;/h2&gt;
&lt;p&gt;Let us imagine a world where we remove all restrictions. No societal contracts, no familial obligations, and free will restored in its purest form. Would such a state of absolute freedom be desirable? I would argue that it would not.&lt;/p&gt;
&lt;h2 id="7-the-evolutionary-case-against-absolute-freedom"&gt;7. The Evolutionary Case Against Absolute Freedom&lt;/h2&gt;
&lt;p&gt;To better understand the problem, let us examine it from an evolutionary perspective. For most of human history, people lived in small tribes of no more than &lt;a href="https://en.wikipedia.org/wiki/Sapiens:_A_Brief_History_of_Humankind"&gt;100 individuals&lt;/a&gt;. Only in relatively recent times have larger societies emerged. Nevertheless, humans have always been inherently social creatures, as evidenced by evolutionary adaptations.&lt;/p&gt;
&lt;p&gt;Humans possess the largest brain-to-body ratio among animals. These large brains are highly energy-intensive, consuming roughly one-third of all energy intake. Their size also poses significant challenges during childbirth. To mitigate the risks of high mortality during delivery, natural selection favored earlier births. Consequently, human infants are born far more dependent on their caregivers compared to other species—for instance, giraffes can walk almost immediately after birth, while human babies require years to achieve similar independence.&lt;/p&gt;
&lt;p&gt;This dependency meant that lone mothers could not gather enough food or resources to support themselves and their children. Survival required the support of an entire tribe to feed, protect, and educate the young. Over time, evolution strongly favored the formation of social groups.&lt;/p&gt;
&lt;p&gt;The importance of social groups in human evolution is further underscored by the development of language. One theory, the &lt;a href="https://en.wikipedia.org/wiki/Grooming,_Gossip_and_the_Evolution_of_Language"&gt;gossip theory&lt;/a&gt;, suggests that language evolved primarily for the purpose of social bonding. Gossip allowed individuals to share information about who could be trusted within their group and who could not, strengthening the fabric of tribal life.&lt;/p&gt;
&lt;p&gt;What this illustrates is that social connections—and the responsibilities and obligations that come with them—are deeply intertwined with our origins as a species. Shedding these connections in favor of unbounded freedom is not only questionable but likely impossible. Given the deep social heritage we have inherited, it is unlikely that absolute freedom would bring happiness or fulfillment.&lt;/p&gt;
&lt;p&gt;Many other aspects of human life today are shaped by these same social foundations. Although they are most likely downstream effects of our evolutionary past, they remain integral to our well-being and deserve further exploration.&lt;/p&gt;
&lt;h2 id="8-the-role-of-stories-archetype-of-responsibility"&gt;8. The Role of Stories: Archetype of Responsibility&lt;/h2&gt;
&lt;p&gt;Throughout history, humans across cultures have created and shared stories. Despite the vast diversity of these tales, recurring themes can be observed, one of which is the central theme of this article: &lt;em&gt;freedom&lt;/em&gt;. While interpretations of freedom differ among cultures, one of the most common motifs involves the &lt;em&gt;unbounded and reluctant hero&lt;/em&gt;. This hero initially resists a call to responsibility but, through trials and growth, learns to embrace their duties and ultimately saves the world.&lt;/p&gt;
&lt;p&gt;Examples of this archetype abound in mythology, religion, and modern storytelling. In Greek mythology, &lt;a href="https://en.wikipedia.org/wiki/Bellerophon"&gt;Bellerophon&lt;/a&gt; is haunted by the tragic death of his father and initially distances himself from his family. However, through his destined adventures—including taming Pegasus and defeating the Chimera—he rises to meet his challenges and fulfills his role. Similarly, &lt;a href="https://en.wikipedia.org/wiki/Jonah"&gt;Jonah from the Bible&lt;/a&gt; is chosen by God to prophesy to the people of Nineveh. Jonah refuses this responsibility and flees, only to face numerous obstacles that ultimately lead him to accept his mission.&lt;/p&gt;
&lt;p&gt;A more contemporary example can be found in &lt;em&gt;Star Wars&lt;/em&gt; with Han Solo. Initially, Han values his freedom above all else, refusing to join Luke Skywalker in the fight against the Empire. Yet, over the course of the series, he shoulders increasing responsibilities, evolving from a self-serving smuggler to a leader and a hero.&lt;/p&gt;
&lt;p&gt;These stories illustrate a broader societal ideal of what humans believe others should strive for. They celebrate individuals who rise to responsibility and become respectable through their willingness to serve others—not the caricatured &amp;ldquo;alpha male&amp;rdquo; who &amp;ldquo;doesn&amp;rsquo;t care about anyone&amp;rdquo; and values only boundless personal freedom. Instead, they highlight the virtues of responsibility and selflessness, teaching us to see these qualities as admirable and worthy of emulation.&lt;/p&gt;
&lt;h3 id="81-stories-as-mirrors-of-human-nature"&gt;8.1 Stories as Mirrors of Human Nature&lt;/h3&gt;
&lt;p&gt;Critics might argue that these common themes are simply storytelling devices, disconnected from human nature or moral ideals. However, I would counter that these archetypal stories reveal profound truths about what humans value and aspire to. They are not just entertaining narratives but reflections of our collective psychology, developed and refined over millennia.&lt;/p&gt;
&lt;p&gt;The reluctant hero’s journey can be viewed through the lens of &lt;a href="https://en.wikipedia.org/wiki/Jungian_archetypes"&gt;archetypes&lt;/a&gt;, representing universal patterns of human experience. These stories have evolved in an almost &lt;em&gt;Darwinian&lt;/em&gt; sense, distilling human wisdom into enduring narratives. By teaching such stories to successive generations, cultures pass on core ideas about responsibility and morality, ensuring survival and societal cohesion. This process resembles the &lt;a href="https://en.wikipedia.org/wiki/Baldwin_effect"&gt;Baldwin effect&lt;/a&gt;, which suggests that learned behaviors—such as telling archetypal stories—can indirectly shape evolutionary outcomes if they improve survival. For instance, the stories emphasize responsibility because it ensures the survival of the tribe, unlike the chaos that would ensue if everyone acted solely for themselves.&lt;/p&gt;
&lt;p&gt;In this way, these stories serve as a metaphysical &amp;ldquo;battle space,&amp;rdquo; where abstract ideas of fears and desire are tested and debated. Through this cultural evolution, humans are guided toward a better path.&lt;/p&gt;
&lt;h3 id="82-on-the-evolution-of-archetypes"&gt;8.2 On the Evolution of Archetypes&lt;/h3&gt;
&lt;p&gt;It is worth noting that while the evolution of ideas and behaviors—such as memes, as described in &lt;a href="https://en.wikipedia.org/wiki/The_Selfish_Gene"&gt;Richard Dawkins’ &lt;em&gt;The Selfish Gene&lt;/em&gt;&lt;/a&gt;—is well-documented, the specific mechanisms by which archetypes evolve are less well-understood. The connection between archetypes and the Baldwin effect remains speculative.&lt;/p&gt;
&lt;h2 id="9-loneliness"&gt;9. Loneliness&lt;/h2&gt;
&lt;p&gt;One final aspect I want to address is loneliness. While some media outlets have called our current age a &amp;ldquo;loneliness epidemic,&amp;rdquo; the reality is more &lt;a href="https://ourworldindata.org/loneliness-epidemic"&gt;nuanced&lt;/a&gt;. Regardless, social connections are undeniably crucial for our health and well-being. Studies have shown that spending time with others significantly boosts our &lt;a href="https://ourworldindata.org/social-connections-and-loneliness#are-we-happier-when-we-spend-more-time-with-others"&gt;happiness and physical health&lt;/a&gt;. As the director of one such study concluded, &amp;ldquo;Those who maintained warm relationships lived longer and happier lives, while those who isolated themselves often experienced shorter, less fulfilling lives.&amp;rdquo;&lt;/p&gt;
&lt;p&gt;In light of this, it seems unwise—both from a personal and societal perspective—to prioritize freedom at the expense of meaningful connections. Even if we disregard the survival of the tribe or society as a whole, cutting people out of one&amp;rsquo;s life for the sake of personal freedom can come at a steep cost to one&amp;rsquo;s own happiness and longevity.&lt;/p&gt;
&lt;h2 id="10-conclusion"&gt;10. Conclusion&lt;/h2&gt;
&lt;p&gt;Freedom, in its purest, unbound sense, is an illusion—one that, even if it were attainable, few would truly want. Our very essence is rooted in connection and responsibility to those around us, as these ties are built deep into our DNA. In a way, this is beautiful. It’s not to say that the desire for freedom is invalid—on the contrary. However, what people truly seek is not freedom from all constraints, but the appropriate challenges and responsibilities that align with their current stage in life.&lt;/p&gt;
&lt;p&gt;To end, I’d like to share a few quotes from the hit tv-show &lt;em&gt;Serial Experiments Lain&lt;/em&gt;:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;“No matter where you go, everybody’s connected.”&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;And isn&amp;rsquo;t that great? Because:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;“Okay… Let’s see. I guess that I’m confused again. Am I here, or am I there? I don’t know&amp;hellip; Over there, I’m everywhere, I know that&amp;hellip; But here is connected to over there, is that right? But then, where is the real me after all is said and done? Oh, there is no real me, I guess that’s it. I only exist inside those people aware of my existence. But what about this me that I can hear talking right here and now? It’s me, isn’t it? This me that I hear talking&amp;hellip; Who is it? Who’s me?”&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;And because:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;“People’s memories aren’t just personal or one part or unrelated fragment of the history of humanity. But they’re shared in the &lt;a href="https://en.wikipedia.org/wiki/Collective_unconscious"&gt;collective unconscious&lt;/a&gt;.”&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;In the end, being less connected, seeking more freedom in the isolated sense, might also mean becoming less real. It is in our connections with others that we truly exist.&lt;/p&gt;


&lt;figure&gt;
 &lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width:60%" src="https://monkemanx.github.io/attachments/the-wired-is-calling-us.jpg"&gt;
&lt;/figure&gt;


&lt;hr&gt;
&lt;p&gt;Resources:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Free Will by Sam Harris&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>Lets Program LeNet</title><link>https://monkemanx.github.io/articles/lets_programm_lenet/</link><pubDate>Wed, 06 Nov 2024 00:00:00 +0000</pubDate><author>monkeman@cock.li (MonkeMan)</author><guid>https://monkemanx.github.io/articles/lets_programm_lenet/</guid><description>&lt;p&gt;&lt;a href="http://vision.stanford.edu/cs598_spring07/papers/Lecun98.pdf"&gt;LeNet&lt;/a&gt; is one of the first &lt;a href="https://en.wikipedia.org/wiki/Convolutional_neural_network"&gt;convolutional neural networks (CNNs)&lt;/a&gt;. Its design is relatively simple and well-documented, making it a good candidate for implementation to gain practice with a deep learning library such as &lt;a href="https://pytorch.org/"&gt;PyTorch&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;In this article, I will show how you can use PyTorch to implement a deep convolutional neural network, train it, and perform inference. If you are interested in more of the theory, I recommend consulting my &lt;a href="https://monkemanx.github.io/articles/proseminar_cnn/"&gt;prior post&lt;/a&gt; on CNNs. Another excellent resource is the &lt;a href="https://cs231n.github.io/convolutional-networks/"&gt;CS231n site on CNNs&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Familiarity with how convolutional neural networks work is recommended, as this article focuses mainly on the practical side.&lt;/p&gt;
&lt;h2 id="prerequisites"&gt;Prerequisites&lt;/h2&gt;
&lt;p&gt;You will need an up-to-date Python version installed. Additionally, you will need to install PyTorch, a deep learning library, and torchvision, which provides datasets for testing. To install PyTorch and torchvision, I recommend using &lt;a href="https://docs.conda.io/projects/conda/en/latest/user-guide/getting-started.html"&gt;Conda&lt;/a&gt;, which allows you to create a virtual Python environment where libraries won’t conflict with others you have installed. (If you are familiar with Docker, it is similar but specific to Python.) Alternatively, you can use pip, Python’s default package manager.&lt;/p&gt;
&lt;p&gt;Run the command from the &lt;a href="https://pytorch.org/get-started/locally/"&gt;PyTorch site&lt;/a&gt; in the terminal to get started. If you have an NVIDIA GPU with CUDA installed, you can use the CUDA version, which allows PyTorch to take advantage of your GPU for faster training and inference. Otherwise, use the CPU version.&lt;/p&gt;


&lt;figure&gt;
 &lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width:80%" src="https://monkemanx.github.io/attachments/pytorch_installation.jpg"&gt;
&lt;/figure&gt;


&lt;p&gt;When installing PyTorch with CUDA, it is important to select the compatible CUDA version. If you have CUDA installed but are unsure of your version, you can use the following command to check:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-sh" data-lang="sh"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;1&lt;/span&gt;&lt;span class="cl"&gt;nvcc --version
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;If CUDA is not installed on your system, refer to NVIDIA’s official &lt;a href="https://docs.nvidia.com/cuda/cuda-installation-guide-microsoft-windows/"&gt;installation guide&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;In addition to PyTorch, we will use &lt;a href="https://matplotlib.org/"&gt;Matplotlib&lt;/a&gt; for visualization purposes. Refer to their &lt;a href="https://matplotlib.org/stable/install/index.html"&gt;installation guide&lt;/a&gt; if you need help with installation.&lt;/p&gt;
&lt;h2 id="lenet-overview"&gt;LeNet Overview&lt;/h2&gt;
&lt;p&gt;First, we need to clarify the components that make up LeNet-5. Below is a visualization of its architecture.&lt;/p&gt;


&lt;figure&gt;
 &lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width:100%" src="https://monkemanx.github.io/attachments/LeNet-5_architecture.png"&gt;
 &lt;figcaption style="margin-top: 10px; text-align:center;"&gt;Source: Wikipedia&lt;/figcaption&gt;
&lt;/figure&gt;




&lt;figure style="max-width: 100%; width: 20%; float: right; margin: 0 0 1em 1em;"&gt;
 &lt;div style="float: right; width: 100%;"&gt;
 &lt;img loading="lazy" src="https://monkemanx.github.io/attachments/LeNet-5_architecture_block_diagram.svg.png" style="width: 100%;"&gt;
 &lt;/div&gt;
 &lt;figcaption style="clear: both; text-align: center;"&gt;Source: &lt;a href="https://en.wikipedia.org/wiki/LeNet#/media/File:LeNet-5_architecture_block_diagram.svg"&gt;Wikipedia&lt;/a&gt;&lt;/figcaption&gt;
&lt;/figure&gt;


&lt;p&gt;As shown, LeNet-5 consists of three main components:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://pytorch.org/docs/stable/generated/torch.nn.Conv2d.html"&gt;Convolutional layer&lt;/a&gt;, which uses a 2-dimensional kernel to scan the input from the previous layer.&lt;/li&gt;
&lt;li&gt;&lt;a href="https://pytorch.org/docs/stable/generated/torch.nn.Linear.html"&gt;Linear layer&lt;/a&gt;, also called dense or fully connected layers.&lt;/li&gt;
&lt;li&gt;&lt;a href="https://pytorch.org/docs/stable/generated/torch.nn.AvgPool2d.html"&gt;Pooling layer&lt;/a&gt;, specifically an average pooling layer, which is mainly used to reduce dimensionality.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Each of these layers has additional attributes, known as hyperparameters, that can be identified from the block diagram.&lt;/p&gt;
&lt;p&gt;The input layer expects an input size of 28x28. The first convolutional layer will have 6 feature maps (output channels), with a kernel size of 5x5 and 2 pixels of padding. The average pooling layer will use a kernel size of 2x2 with a stride of 2.&lt;/p&gt;
&lt;p&gt;A brief explanation, &lt;strong&gt;Kernel size&lt;/strong&gt; refers to the dimensions of the filter (e.g., 3x3 or 5x5) used in a convolutional layer to scan the input image or feature map. &lt;strong&gt;Stride&lt;/strong&gt; defines how many pixels the filter moves across the input during each convolution operation, affecting the output size. And at last, &lt;strong&gt;Padding&lt;/strong&gt; involves adding extra pixels (usually zeros) around the input image to ensure the filter can fully cover the edges of the input or to control the output size.&lt;/p&gt;
&lt;h2 id="implementation-of-lenet"&gt;Implementation of LeNet&lt;/h2&gt;
&lt;p&gt;Now that we know the specific hyperparameters of our model, we can start coding. First, we need to define the structure of our network. PyTorch provides the &lt;a href="https://pytorch.org/docs/stable/generated/torch.nn.Module.html"&gt;Module&lt;/a&gt; class, which our neural network should inherit from. This setup will make it easier to train our network later.&lt;/p&gt;
&lt;p&gt;Let&amp;rsquo;s import some of the libraries we&amp;rsquo;ll use:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-python" data-lang="python"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;1&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;# Importing all the libraries we need for now&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;2&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="nn"&gt;torch&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;3&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="nn"&gt;torch.nn&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="nn"&gt;nn&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;4&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="nn"&gt;torch.nn.functional&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="nn"&gt;F&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Next, we can define our PyTorch &lt;code&gt;Module&lt;/code&gt; class:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-python" data-lang="python"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;1&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;# Our neural network&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;2&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;LeNet&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;nn&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Module&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;3&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="fm"&gt;__init__&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="bp"&gt;self&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;4&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="nb"&gt;super&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;LeNet&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="bp"&gt;self&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="fm"&gt;__init__&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;5&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;pass&lt;/span&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;6&lt;/span&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;7&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;forward&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="bp"&gt;self&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;8&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;pass&lt;/span&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;In the constructor (&lt;code&gt;__init__&lt;/code&gt;), we’ll define the layers of our network. The &lt;code&gt;forward&lt;/code&gt; method specifies what the network should do during the forward pass—in other words, how the layers should be applied to our input.&lt;/p&gt;
&lt;p&gt;Let’s define our first &lt;a href="https://pytorch.org/docs/stable/generated/torch.nn.Conv2d.html"&gt;convolutional layer&lt;/a&gt;. It has one input channel, because our input will be grayscale images (with only one color channel), 6 output channels, and a kernel size of 5:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-python" data-lang="python"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;1&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="bp"&gt;self&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;conv1&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;nn&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Conv2d&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;6&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The &lt;a href="https://pytorch.org/docs/stable/generated/torch.nn.AvgPool2d.html"&gt;pooling layer&lt;/a&gt; is similarly easy to define; we just need to pass the kernel size and then the stride:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-python" data-lang="python"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;1&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="bp"&gt;self&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;pool1&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;nn&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;AvgPool2d&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;For the fully connected (&lt;a href="(https://pytorch.org/docs/stable/generated/torch.nn.Linear.html)"&gt;linear&lt;/a&gt;) layer, we specify the number of input neurons and output neurons:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-python" data-lang="python"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;1&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="bp"&gt;self&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;fc1&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;nn&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Linear&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;400&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;120&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;You might wonder how to determine the 400 input neurons, given that only the output neurons are displayed in the LeNet block diagram. There are two ways:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;You can calculate it using the formula below:

\[
 H_{\text{out}} = \lfloor \frac{H_{\text{in}} + 2 \times \text{padding} - \text{kernelsize} - 1}{\text{stride}} + 1 \rfloor
 \]&lt;/li&gt;
&lt;li&gt;Alternatively, set it to a random value and add a print statement before the linear layer definition to print the data’s dimensions.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;With this knowledge, we can now define all the layers of our CNN:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-python" data-lang="python"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 1&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;LeNet&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;nn&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Module&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 2&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="fm"&gt;__init__&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="bp"&gt;self&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 3&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="nb"&gt;super&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;LeNet&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="bp"&gt;self&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="fm"&gt;__init__&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 4&lt;/span&gt;&lt;span class="cl"&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 5&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="bp"&gt;self&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;conv1&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;nn&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Conv2d&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;6&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 6&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="bp"&gt;self&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;pool1&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;nn&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;AvgPool2d&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 7&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="bp"&gt;self&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;conv2&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;nn&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Conv2d&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;6&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;16&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 8&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="bp"&gt;self&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;pool2&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;nn&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;AvgPool2d&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 9&lt;/span&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;10&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="bp"&gt;self&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;fc1&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;nn&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Linear&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;400&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;120&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;11&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="bp"&gt;self&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;fc2&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;nn&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Linear&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;120&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;84&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;12&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="bp"&gt;self&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;fc3&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;nn&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Linear&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;84&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Then, we can define the &lt;code&gt;forward&lt;/code&gt; method, which processes the input through each layer:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-python" data-lang="python"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 1&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;forward&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="bp"&gt;self&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 2&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;x&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="bp"&gt;self&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;conv1&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 3&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;x&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;F&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;relu&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 4&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;x&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="bp"&gt;self&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;pool1&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 5&lt;/span&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 6&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;x&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="bp"&gt;self&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;conv2&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 7&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;x&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;F&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;relu&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 8&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;x&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="bp"&gt;self&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;pool2&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 9&lt;/span&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;10&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="c1"&gt;# Uncomment the line below to print the dimensions of the data&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;11&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="c1"&gt;# print(x.size())&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;12&lt;/span&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;13&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="c1"&gt;# Flatten the 2D data to 1D&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;14&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;x&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;view&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;400&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;15&lt;/span&gt;&lt;span class="cl"&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;16&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;x&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="bp"&gt;self&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;fc1&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;17&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;x&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;F&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;relu&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;18&lt;/span&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;19&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;x&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="bp"&gt;self&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;fc2&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;20&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;x&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;F&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;relu&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;21&lt;/span&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;22&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;x&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="bp"&gt;self&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;fc3&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;23&lt;/span&gt;&lt;span class="cl"&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;24&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;x&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id="testing-our-model-on-the-mnist-datast"&gt;Testing our Model on the MNIST Datast&lt;/h2&gt;
&lt;p&gt;To test our model, we will use images from the &lt;a href="https://en.wikipedia.org/wiki/MNIST_database"&gt;MNIST dataset&lt;/a&gt;, a widely used collection of grayscale, handwritten digits. This dataset serves as a benchmark for evaluating image classification models, as it provides simple, standardized images that help assess how well the model recognizes basic patterns.&lt;/p&gt;
&lt;p&gt;We can load this dataset using PyTorch&amp;rsquo;s &lt;code&gt;DataLoader&lt;/code&gt; class from the torchvision library. We&amp;rsquo;ll also apply normalization to scale the pixel values. The values for normalization are sourced from &lt;a href="https://discuss.pytorch.org/t/mnist-normalizing-and-scaling-the-dataset-at-the-same-time/95218"&gt;this discussion&lt;/a&gt;:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-python" data-lang="python"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 1&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="nn"&gt;torchvision&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 2&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="nn"&gt;time&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 3&lt;/span&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 4&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;test_transform&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;torchvision&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;transforms&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Compose&lt;/span&gt;&lt;span class="p"&gt;([&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 5&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;torchvision&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;transforms&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;ToTensor&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 6&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;torchvision&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;transforms&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Normalize&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="mf"&gt;0.1307&lt;/span&gt;&lt;span class="p"&gt;,),&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mf"&gt;0.3081&lt;/span&gt;&lt;span class="p"&gt;,))&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 7&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="p"&gt;])&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 8&lt;/span&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 9&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;train_transform&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;torchvision&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;transforms&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Compose&lt;/span&gt;&lt;span class="p"&gt;([&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;10&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;torchvision&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;transforms&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;ToTensor&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;11&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;torchvision&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;transforms&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Normalize&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="mf"&gt;0.1307&lt;/span&gt;&lt;span class="p"&gt;,),&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mf"&gt;0.3081&lt;/span&gt;&lt;span class="p"&gt;,))&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;12&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="p"&gt;])&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;13&lt;/span&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;14&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;test_loader&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;torch&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;utils&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;data&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;DataLoader&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;15&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;torchvision&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;datasets&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;MNIST&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;16&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="s1"&gt;&amp;#39;.&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;17&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;train&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="kc"&gt;False&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;18&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;download&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="kc"&gt;True&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;19&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;transform&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;test_transform&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;20&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="p"&gt;),&lt;/span&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;21&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;batch_size&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;64&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;22&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;shuffle&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="kc"&gt;False&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;23&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;drop_last&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="kc"&gt;True&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;24&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;25&lt;/span&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;26&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;train_loader&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;torch&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;utils&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;data&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;DataLoader&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;27&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;torchvision&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;datasets&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;MNIST&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;28&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="s1"&gt;&amp;#39;.&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;29&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;train&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="kc"&gt;True&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;30&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;download&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="kc"&gt;True&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;31&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;transform&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;train_transform&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;32&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="p"&gt;),&lt;/span&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;33&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;batch_size&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;64&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;34&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;shuffle&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="kc"&gt;False&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;35&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;drop_last&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="kc"&gt;True&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;36&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;We can view a sample image from this dataset using the matplotlib library. The following code loads and displays a sample image from the dataset using &lt;code&gt;matplotlib&lt;/code&gt;, applying a grayscale colormap and no interpolation.&lt;/p&gt;
&lt;div style="display: flex; align-items: center; gap: 0px;"&gt;
 &lt;div style="flex: 1;"&gt;
 &lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-python" data-lang="python"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;1&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="nn"&gt;matplotlib.pyplot&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="nn"&gt;plt&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;2&lt;/span&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;3&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;sample&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;next&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;iter&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;train_loader&lt;/span&gt;&lt;span class="p"&gt;))[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;][&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;squeeze&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;4&lt;/span&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;5&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;plt&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;imshow&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;sample&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;cmap&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;gray&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;interpolation&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;none&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
 &lt;/div&gt;
 &lt;div style="flex: 1;"&gt;
 

 &lt;figure&gt;
 &lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width:70%" src="https://monkemanx.github.io/attachments/mnist_5.png"&gt;
 &lt;/figure&gt;
 

 &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Once we initialize our model, we can pass this image through our network to see what digit the model predicts:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-python" data-lang="python"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;1&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;net&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;LeNet&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;2&lt;/span&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;3&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;sample&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;next&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;iter&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;train_loader&lt;/span&gt;&lt;span class="p"&gt;))[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;][&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;4&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;net&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;forward&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;sample&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This produces the following output:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-sh" data-lang="sh"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;1&lt;/span&gt;&lt;span class="cl"&gt;tensor&lt;span class="o"&gt;([[&lt;/span&gt;-0.0340, 0.0443, -0.0341, -0.0727, 0.0751, 0.0734, 0.0544, -0.0317, 0.0051, -0.1094&lt;span class="o"&gt;]]&lt;/span&gt;, &lt;span class="nv"&gt;grad_fn&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&amp;lt;AddmmBackward0&amp;gt;&lt;span class="o"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The higher each value is, the more likely the model thinks that the index of that value corresponds to the digit in the image. To get the actual prediction of the digit, we need to take the &lt;code&gt;argmax&lt;/code&gt; of the output tensor:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-python" data-lang="python"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;1&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;torch&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;argmax&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;torch&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;tensor&lt;/span&gt;&lt;span class="p"&gt;([[&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mf"&gt;0.0340&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mf"&gt;0.0443&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mf"&gt;0.0341&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mf"&gt;0.0727&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mf"&gt;0.0751&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mf"&gt;0.0734&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mf"&gt;0.0544&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mf"&gt;0.0317&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mf"&gt;0.0051&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mf"&gt;0.1094&lt;/span&gt;&lt;span class="p"&gt;]]))&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This returns &lt;code&gt;torch.tensor(7)&lt;/code&gt;, meaning the model predicts that the digit in the image is 7.&lt;/p&gt;
&lt;p&gt;As you can see from the image we depicted earlier, the initial prediction is not accurate. This is expected, as we haven&amp;rsquo;t yet trained our network. To improve its performance, we will implement a training routine for our model.&lt;/p&gt;
&lt;h2 id="training-our-lenet-model"&gt;Training our LeNet Model&lt;/h2&gt;
&lt;p&gt;To train our model, we first define the number of epochs, which represents how many times we want to iterate over the entire training dataset. Next, we set up the loss function, which measures how close the model&amp;rsquo;s predictions are to the actual target values. For this, we use &lt;a href="https://en.wikipedia.org/wiki/Cross-entropy"&gt;cross-entropy loss&lt;/a&gt;, a standard for classification problems. Additionally, we define an optimizer, which is responsible for adjusting the model parameters to minimize the loss. Here, we’ll use &lt;a href="https://en.wikipedia.org/wiki/Stochastic_gradient_descent"&gt;stochastic gradient descent (SGD)&lt;/a&gt;, but you could also experiment with other popular optimizers, such as &lt;a href="https://optimization.cbe.cornell.edu/index.php?title=Adam"&gt;Adam&lt;/a&gt;:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-python" data-lang="python"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;1&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;n_epochs&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;2&lt;/span&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;3&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;optimizer&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;torch&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;optim&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;SGD&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;net&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;parameters&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt; &lt;span class="n"&gt;lr&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mf"&gt;0.01&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;4&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;# optimizer = torch.optim.Adam(net.parameters(), lr=0.1)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;5&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;loss_function&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;nn&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;CrossEntropyLoss&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;We also need to specify the device on which we want to perform the computations, either the &lt;code&gt;cpu&lt;/code&gt; or &lt;code&gt;cuda&lt;/code&gt; (if a compatible GPU is available):&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-python" data-lang="python"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;1&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;net&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;LeNet&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;2&lt;/span&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;3&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;device&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;torch&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;device&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;cpu&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;4&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;net&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;to&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;device&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Next, we iterate over our dataset in batches. The batch size, which we specified earlier in the &lt;code&gt;train_loader&lt;/code&gt;, determines the number of images processed at once:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-python" data-lang="python"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;1&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;epoch_n&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="nb"&gt;range&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;n_epochs&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;2&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;batch_idx&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;inputs&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;targets&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="nb"&gt;enumerate&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;train_loader&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;3&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;pass&lt;/span&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Within this loop, we perform the actual training. We start by clearing any gradients saved from previous iterations with &lt;code&gt;optimizer.zero_grad()&lt;/code&gt; and transferring both inputs and targets to the device:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-python" data-lang="python"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;1&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;optimizer&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;zero_grad&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;2&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;inputs&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;targets&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;inputs&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;to&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;device&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt; &lt;span class="n"&gt;targets&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;to&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;device&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;We then compute the model&amp;rsquo;s predictions by passing the inputs through the network. To calculate the loss, we compare these predictions with the actual targets using our loss function:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-python" data-lang="python"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;1&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;preds&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;net&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;inputs&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;2&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;loss&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;loss_function&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;preds&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;targets&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The final steps involve backpropagating the loss and updating the model’s parameters:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-python" data-lang="python"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;1&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;loss&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;backward&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;2&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;optimizer&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;step&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;To monitor the training process, we can calculate the accuracy and store both the loss and accuracy values over each epoch:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-python" data-lang="python"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;1&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;# Calculate accuracy&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;2&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;predicted_labels&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;torch&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;argmax&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;preds&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;dim&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;3&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;correct&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;predicted_labels&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="n"&gt;targets&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;sum&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;item&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;4&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;accuracy&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;correct&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="n"&gt;targets&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;size&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;5&lt;/span&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;6&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;loss_tmp&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;append&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;loss&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;item&lt;/span&gt;&lt;span class="p"&gt;())&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;7&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;acc_tmp&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;append&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;accuracy&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;With these steps, we can now train our model. The complete training loop is as follows:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-python" data-lang="python"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 1&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;net&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;LeNet&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 2&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;device&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;torch&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;device&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;cpu&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 3&lt;/span&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 4&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;optimizer&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;torch&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;optim&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;SGD&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;net&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;parameters&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt; &lt;span class="n"&gt;lr&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mf"&gt;0.01&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 5&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;loss_function&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;nn&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;CrossEntropyLoss&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 6&lt;/span&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 7&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;n_epochs&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 8&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;loss_list&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[]&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 9&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;acc_list&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[]&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;10&lt;/span&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;11&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;epoch_n&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="nb"&gt;range&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;n_epochs&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;12&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;loss_tmp&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[]&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;13&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;acc_tmp&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[]&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;14&lt;/span&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;15&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;batch_idx&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;inputs&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;targets&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="nb"&gt;enumerate&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;train_loader&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;16&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;optimizer&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;zero_grad&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;17&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;inputs&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;targets&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;inputs&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;to&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;device&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt; &lt;span class="n"&gt;targets&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;to&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;device&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;18&lt;/span&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;19&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;preds&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;net&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;inputs&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;20&lt;/span&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;21&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="c1"&gt;# Calculate loss&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;22&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;loss&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;loss_function&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;preds&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;targets&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;23&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;loss&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;backward&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;24&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;optimizer&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;step&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;25&lt;/span&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;26&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="c1"&gt;# Calculate accuracy&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;27&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;predicted_labels&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;torch&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;argmax&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;preds&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;dim&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;28&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;correct&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;predicted_labels&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="n"&gt;targets&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;sum&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;item&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;29&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;accuracy&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;correct&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="n"&gt;targets&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;size&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;30&lt;/span&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;31&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;loss_tmp&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;append&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;loss&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;item&lt;/span&gt;&lt;span class="p"&gt;())&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;32&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;acc_tmp&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;append&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;accuracy&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;33&lt;/span&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;34&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;batch_idx&lt;/span&gt; &lt;span class="o"&gt;%&lt;/span&gt; &lt;span class="mi"&gt;100&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt; &lt;span class="ow"&gt;and&lt;/span&gt; &lt;span class="n"&gt;batch_idx&lt;/span&gt; &lt;span class="o"&gt;!=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;35&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;l_avg&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;sum&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;loss_tmp&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="nb"&gt;len&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;loss_tmp&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;36&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;a_avg&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;sum&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;acc_tmp&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="nb"&gt;len&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;acc_tmp&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;37&lt;/span&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;38&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="nb"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;Epoch [&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;epoch_n&lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;/&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;n_epochs&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;], Batch [&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;batch_idx&lt;/span&gt; &lt;span class="o"&gt;//&lt;/span&gt; &lt;span class="mi"&gt;100&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;], Avg Loss: &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;l_avg&lt;/span&gt;&lt;span class="si"&gt;:&lt;/span&gt;&lt;span class="s2"&gt;.4f&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;, Avg Acc: &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;a_avg&lt;/span&gt;&lt;span class="si"&gt;:&lt;/span&gt;&lt;span class="s2"&gt;.4f&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;39&lt;/span&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;40&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;loss_list&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;append&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;l_avg&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;41&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;acc_list&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;append&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;a_avg&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id="plotting-the-accuracy-and-loss-of-training"&gt;Plotting the Accuracy and Loss of Training&lt;/h2&gt;
&lt;p&gt;We can plot the loss and accuracy of the training process using the &lt;code&gt;matplotlib&lt;/code&gt; library to ensure that the training is progressing correctly. Here&amp;rsquo;s how you can visualize the training metrics:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-python" data-lang="python"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 1&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="nn"&gt;matplotlib.pyplot&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="nn"&gt;plt&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 2&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="nn"&gt;numpy&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="nn"&gt;np&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 3&lt;/span&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 4&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;plt&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;rcParams&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;figure.figsize&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 5&lt;/span&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 6&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;fig&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;ax&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;plt&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;subplots&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 7&lt;/span&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 8&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;# Plot accuracy&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 9&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;ax&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;plot&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;np&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;array&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;acc_list&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt; &lt;span class="n"&gt;color&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;tab:blue&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;10&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;ax&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;set_xlabel&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;Mini-batch steps (100)&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;11&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;ax&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;set_ylabel&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;LeNet Accuracy&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;12&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;ax&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;tick_params&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;colors&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;tab:blue&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;axis&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;y&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;13&lt;/span&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;14&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;# Plot loss&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;15&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;ax2&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;ax&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;twinx&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;16&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;ax2&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;plot&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;np&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;array&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;loss_list&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt; &lt;span class="n"&gt;color&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;tab:red&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;label&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;Loss&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;17&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;ax2&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;set_ylabel&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;LeNet Loss&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;18&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;ax2&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;tick_params&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;colors&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;tab:red&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;axis&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;y&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;19&lt;/span&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;20&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;ax&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;set_title&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;LeNet Training&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;figure&gt;
 &lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width:100%" src="https://monkemanx.github.io/attachments/lenet_loss_acc.png"&gt;
&lt;/figure&gt;


&lt;p&gt;After training, when we pass an image through the model again, it now correctly predicts the number in the image:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-python" data-lang="python"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;1&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;torch&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;tensor&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id="conclusion"&gt;Conclusion&lt;/h2&gt;
&lt;p&gt;With this, you&amp;rsquo;ve seen a basic implementation of LeNet, one of the first Convolutional Neural Networks (CNNs). There are many improvements that can be made on top of it, as demonstrated in more advanced architectures like ResNet, InceptionNet, and DeformableNet just to name a few.&lt;/p&gt;</description></item><item><title>Prevent 'Zone.Identifier' Files in WSL</title><link>https://monkemanx.github.io/articles/wsl_zone_identifier_file/</link><pubDate>Mon, 04 Nov 2024 00:00:00 +0000</pubDate><author>monkeman@cock.li (MonkeMan)</author><guid>https://monkemanx.github.io/articles/wsl_zone_identifier_file/</guid><description>&lt;p&gt;If like me, you use WSL on Windows (yes, I know shame on me), you&amp;rsquo;ve probably encountered the issue where these annoying &lt;code&gt;Zone.Identifier&lt;/code&gt; files are created whenever you download a file in Windows and copy it over to WSL.&lt;/p&gt;
&lt;p&gt;These files are created as a security mechanism by Windows to signal that the file came from a different security zone, such as the internet.&lt;/p&gt;
&lt;p&gt;There are supposedly multiple ways to prevent this. I&amp;rsquo;ll list them here, try them all and pray one works.&lt;/p&gt;
&lt;h2 id="do-not-preserve-zone-information-policy"&gt;&amp;ldquo;Do Not Preserve Zone Information&amp;rdquo; Policy&lt;/h2&gt;
&lt;p&gt;You can disable the creation of these files as follows:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Press &lt;code&gt;Win + R&lt;/code&gt; and type &lt;code&gt;gpedit.msc&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Navigate to: User Configuration -&amp;gt; Administrative Templates -&amp;gt; Windows Components -&amp;gt; Attachment Manager.&lt;/li&gt;
&lt;li&gt;Select the policy &lt;code&gt;Do not preserve zone information in file attachments&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Set it to &lt;code&gt;Enabled&lt;/code&gt;.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;If you receive a message saying that &lt;code&gt;gpedit.msc&lt;/code&gt; does not exist, like this:&lt;/p&gt;


&lt;figure&gt;
 &lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width:50%" src="https://monkemanx.github.io/attachments/gpeditmsc-error-introduction.png"&gt;
&lt;/figure&gt;


&lt;p&gt;In that case, you can use the following script to enable it. Create a &lt;code&gt;.bat&lt;/code&gt; file with the following content and run it as an administrator:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bat" data-lang="bat"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 1&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="p"&gt;@&lt;/span&gt;&lt;span class="k"&gt;echo&lt;/span&gt; off
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 2&lt;/span&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 3&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="k"&gt;pushd&lt;/span&gt; &lt;span class="s2"&gt;&amp;#34;&lt;/span&gt;&lt;span class="nv"&gt;%~dp0&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 4&lt;/span&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 5&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="k"&gt;dir&lt;/span&gt; /b &lt;span class="nv"&gt;%SystemRoot%&lt;/span&gt;\servicing\Packages\Microsoft-Windows-GroupPolicy-ClientExtensions-Package~3*.mum &lt;span class="p"&gt;&amp;gt;&lt;/span&gt;List.txt
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 6&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="k"&gt;dir&lt;/span&gt; /b &lt;span class="nv"&gt;%SystemRoot%&lt;/span&gt;\servicing\Packages\Microsoft-Windows-GroupPolicy-ClientTools-Package~3*.mum &lt;span class="p"&gt;&amp;gt;&amp;gt;&lt;/span&gt;List.txt
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 7&lt;/span&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 8&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="k"&gt;/f&lt;/span&gt; &lt;span class="se"&gt;%%&lt;/span&gt;i &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;findstr /i . List.txt 2^&amp;gt;nul&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;do&lt;/span&gt; dism /online /norestart /add-package:&lt;span class="s2"&gt;&amp;#34;&lt;/span&gt;&lt;span class="nv"&gt;%SystemRoot%&lt;/span&gt;&lt;span class="s2"&gt;\servicing\Packages\&lt;/span&gt;&lt;span class="se"&gt;%%&lt;/span&gt;&lt;span class="s2"&gt;i&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 9&lt;/span&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;10&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="k"&gt;pause&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;I can’t guarantee anything about this script, I found it online(source provided below).&lt;/p&gt;
&lt;h2 id="registry-method"&gt;Registry Method&lt;/h2&gt;
&lt;p&gt;You can also disable the creation of &lt;code&gt;.identifier&lt;/code&gt; files via the Windows registry with the following command: &lt;code&gt;REG ADD &amp;quot;HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Attachments&amp;quot; /v SaveZoneInformation /t REG_DWORD /d 1 /f&lt;/code&gt;. Again, no guarantees—found this in a GitHub issue.&lt;/p&gt;
&lt;h2 id="set-wsl-and-windows-to-the-same-security-level"&gt;Set WSL and Windows to the Same Security Level&lt;/h2&gt;
&lt;p&gt;Go to Control Panel -&amp;gt; &lt;code&gt;Network and Internet&lt;/code&gt; -&amp;gt; &lt;code&gt;Internet Options&lt;/code&gt; -&amp;gt; &lt;code&gt;Security&lt;/code&gt; -&amp;gt; &lt;code&gt;Local Intranet&lt;/code&gt; -&amp;gt; &lt;code&gt;Sites&lt;/code&gt; -&amp;gt; &lt;code&gt;Advanced&lt;/code&gt;, and add &lt;code&gt;*.wsl.localhost&lt;/code&gt; as a site.&lt;/p&gt;


&lt;div style="display: flex; justify-content: center; gap: 20px;"&gt;
 &lt;figure&gt;
 &lt;img loading="lazy" style="display: block; margin: auto; width:80%;" src="https://monkemanx.github.io/attachments/internet_prop_1.jpg"&gt;
 &lt;/figure&gt;
 &lt;figure&gt;
 &lt;img loading="lazy" style="display: block; margin: auto; width:80%;" src="https://monkemanx.github.io/attachments/internet_prop_2.jpg"&gt;
 &lt;/figure&gt;
&lt;/div&gt;


&lt;p&gt;This should align the security levels of WSL and Windows, preventing new &lt;code&gt;.Identifier&lt;/code&gt; files from being created.&lt;/p&gt;
&lt;h2 id="the-i-gave-up-method"&gt;The &amp;ldquo;I Gave Up&amp;rdquo; Method&lt;/h2&gt;
&lt;p&gt;If all else fails, just add the fucker to the &lt;code&gt;.gitignore&lt;/code&gt; of your &lt;code&gt;git&lt;/code&gt; projects.&lt;/p&gt;
&lt;h2 id="conclusion"&gt;Conclusion&lt;/h2&gt;
&lt;p&gt;It seems this bug is quite old and likely won&amp;rsquo;t be fixed anytime soon. Someday, I&amp;rsquo;ll switch from Windows to a proper operating system.&lt;/p&gt;


&lt;figure&gt;
 &lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width:50%" src="https://monkemanx.github.io/attachments/bug_comic.png"&gt;
 &lt;figcaption style="text-align:center; margin-top: 10px;"&gt;
 The GitHub issue for this bug is quite entertaining to read, highly recommended.
 &lt;/figcaption&gt;
&lt;/figure&gt;


&lt;hr&gt;
&lt;p&gt;Source:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/microsoft/WSL/issues/7456"&gt;https://github.com/microsoft/WSL/issues/7456&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://answers.microsoft.com/en-us/windows/forum/all/gpeditmsc-missing/cc1d05b2-457d-4aa6-839f-8136d0eddc35"&gt;https://answers.microsoft.com/en-us/windows/forum/all/gpeditmsc-missing/cc1d05b2-457d-4aa6-839f-8136d0eddc35&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://devblogs.microsoft.com/oldnewthing/20140311-00/?p=1543#:~:text=In%20the%20Group%20Policy%20editor,your%20computer%20even%20more%20dangerous"&gt;https://devblogs.microsoft.com/oldnewthing/20140311-00/?p=1543#:~:text=In%20the%20Group%20Policy%20editor,your%20computer%20even%20more%20dangerous&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>Restring my Guitar</title><link>https://monkemanx.github.io/articles/restring_guitar/</link><pubDate>Fri, 18 Oct 2024 00:00:00 +0000</pubDate><author>monkeman@cock.li (MonkeMan)</author><guid>https://monkemanx.github.io/articles/restring_guitar/</guid><description>&lt;p&gt;When I was a child, I regularly went to guitar practice, where I would sit with my guitar teacher and practice a variety of songs. My teacher had expertise in &lt;a href="https://en.wikipedia.org/wiki/Rumba_flamenca"&gt;Rumba flamenca&lt;/a&gt; songs, which are fast Spanish pieces played fingerstyle rather than with chords. At that age, I was quite musically illiterate (I didn’t really listen to music), and since I had no suggestions for what to play, I mostly learned to play rumbas.&lt;/p&gt;


&lt;figure&gt;
 &lt;iframe width="600" height="300" style="display: block; margin: auto;"src="https://youtu.be/aleh4SL6mfY?si=GwVzxI9C4fWubMgi"&gt;&lt;/iframe&gt;
 &lt;figcaption style="margin-top: 10px"&gt;Here, you can see a &lt;i&gt;Rumba Flamenco&lt;/i&gt; song. Naturally, I was much worse than him and played much easier songs.&lt;/figcaption&gt;
&lt;/figure&gt;


&lt;p&gt;In my adolescence, around the age of 14, I stopped taking guitar lessons and, along with that, I also stopped playing guitar altogether.&lt;/p&gt;
&lt;p&gt;Recently, about six months ago, I became more invested in music, deciding to actively listen to different genres, albums, and musicians. With this newfound interest came the desire to pick up my old guitar again. This time, instead of playing rumbas, I wanted to learn more contemporary songs I liked—mainly in the rock and classical genres.&lt;/p&gt;
&lt;p&gt;However, by now, the strings on my guitar were more than 10 years old and had significantly degraded. After playing for a while, I decided to restring the guitar, the results I want to show below.&lt;/p&gt;


&lt;div style="display: flex; justify-content: center; gap: 10px;"&gt;
 &lt;figure style="text-align: center; margin: 0px"&gt;
 &lt;video style="display: block; margin-left: auto; margin-right: auto; width:100%;" controls muted&gt;
 &lt;source src="https://monkemanx.github.io/attachments/guitar/guitar_old_strings_comp.mp4" type="video/mp4"&gt;
 Your browser does not support this embedded video.
 &lt;/video&gt;
 &lt;figcaption style="text-align:center; margin-top: 10px;"&gt;
 This videos shows my old strings, as you can see they are very much rusted and degraded.
 &lt;/figcaption&gt;
 &lt;/figure&gt;
 &lt;figure style="text-align: center; margin: 0px"&gt;
 &lt;video style="display: block; margin-left: auto; margin-right: auto; width:100%" controls muted&gt;
 &lt;source src="https://monkemanx.github.io/attachments/guitar/guitar_new_strings_comp2.mp4" type="video/mp4"&gt;
 Your browser does not support this embedded video.
 &lt;/video&gt;
 &lt;figcaption style="text-align:center; margin-top: 10px;"&gt;
 This video shows my new strings in comparsion to the old string they look much nicer.
 &lt;/figcaption&gt;
 &lt;/figure&gt;
&lt;/div&gt;


&lt;h2 id="tools"&gt;Tools&lt;/h2&gt;
&lt;p&gt;To restring a guitar, you don’t really need a lot of tools. First and foremost, you need &lt;strong&gt;replacement strings&lt;/strong&gt;. It’s important to pay attention to the type of guitar you have (e.g., electric, acoustic, classical). For instance, if you use a classical guitar, you can’t use acoustic strings, as the tension might snap the head of your guitar. Only use guitar strings designed for your guitar type. I don’t have any specific recommendations for string brands, I just used one with a high rating on Amazon.&lt;/p&gt;
&lt;p&gt;Next, you’ll need &lt;strong&gt;wire cutters&lt;/strong&gt;. If you don’t have any, you just need something strong enough to cut guitar strings. Another tool I recommend, if you don’t want the restringing process to take forever, is a &lt;strong&gt;guitar string winder&lt;/strong&gt;, which helps to quickly loosen the strings on your guitar.&lt;/p&gt;
&lt;p&gt;And that’s all the tools you’ll need for restringing a guitar.&lt;/p&gt;


&lt;figure&gt;
 &lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width:60%" src="https://monkemanx.github.io/attachments/guitar/guitar_strings.jpg"&gt;
 &lt;figcaption style="margin-top: 10px"&gt;These are the strings I used, and they’ve worked quite well for me so far. They come with an additional high &lt;b&gt;E&lt;/b&gt; string, which is nice since that one tends to break the fastest, along with a beginner guitar book.&lt;/figcaption&gt;
&lt;/figure&gt;


&lt;h2 id="restringing"&gt;Restringing&lt;/h2&gt;
&lt;p&gt;There are multiple ways to go about this. For instance, some people recommend changing one string at a time. I’ll show you what worked for me. However, I suggest watching some restringing guides on YouTube, as it’s harder to explain how to tie the knots through text.&lt;/p&gt;
&lt;p&gt;I use a classical guitar, so the three lower strings are distinct from the three higher strings. Keep this in mind if you’re using an acoustic guitar and following the steps below.&lt;/p&gt;


&lt;figure&gt;
 &lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width:60%" src="https://monkemanx.github.io/attachments/guitar/guitar_with_old_strings.jpg"&gt;
 &lt;figcaption style="margin-top: 10px; text-align:center;"&gt;My classical guitar, which is over 10 years old, that I’ll use for restringing.&lt;/figcaption&gt;
&lt;/figure&gt;


&lt;p&gt;The first thing you’ll want to do is loosen all the strings on your guitar, using the string winder. After loosening each string, you can remove it. Depending on the knot used to attach the string, you can either loosen the knot or, if it’s too tight, use wire cutters.&lt;/p&gt;
&lt;p&gt;Next, you’ll want to put on the new strings. I recommend starting with the lowest bass string. In the string package I bought, the strings are numbered, so you know which string goes where. If the strings aren’t numbered, you can check the thickness— the thickest string is the lowest bass string, and the rest should be arranged in descending order by thickness.&lt;/p&gt;
&lt;p&gt;For the bass strings, after threading the string, you’ll want to tie a knot at the bridge. Take the shorter end of the string, pass it under the main string to form a loop, and then thread it through the loop twice.&lt;/p&gt;
&lt;p&gt;For the nylon strings (the higher three strings), you’ll follow the same process, but thread them through the loop three times to prevent slipping. I also recommend tying an extra knot at the end of the bridge for added security.&lt;/p&gt;
&lt;p&gt;When attaching the strings to the guitar head, make sure the strings don’t cross over each other.&lt;/p&gt;
&lt;p&gt;You can see the result of my restringing process below. The knots for the higher strings aren’t perfect, but this was my first time restringing a guitar. Next time, I’ll improve on it.&lt;/p&gt;


&lt;figure style="display: flex; justify-content: center;"&gt;
 &lt;div style="text-align: center; margin-right: 10px;"&gt;
 &lt;img loading="lazy" style="width:100%;" src="https://monkemanx.github.io/attachments/guitar/guitar_head_new_strings.jpg"&gt;
 &lt;figcaption&gt;The guitar head with the new strings.&lt;/figcaption&gt;
 &lt;/div&gt;
 &lt;div style="text-align: center; margin-left: 10px;"&gt;
 &lt;img loading="lazy" style="width:100%;" src="https://monkemanx.github.io/attachments/guitar/guitar_tail_new_strings.jpg"&gt;
 &lt;figcaption&gt;The guitar bridge with the new strings.&lt;/figcaption&gt;
 &lt;/div&gt;
&lt;/figure&gt;


&lt;p&gt;In total, the entire process took me 1 hour and 30 minutes, but I was fairly slow due to it being my first time and not having a string winder.&lt;/p&gt;
&lt;h2 id="results"&gt;Results&lt;/h2&gt;
&lt;p&gt;To compare the results of restringing the guitar, I played the same song twice: once with the old strings and once with the new strings. The song is &lt;em&gt;Greensleeves&lt;/em&gt;, arranged by &lt;em&gt;Jim Paterson&lt;/em&gt;. It’s a fairly easy piece, so excuse the minor mistakes I made; I was a bit nervous while playing.&lt;/p&gt;
&lt;p&gt;Below is the song played with the &lt;em&gt;old strings&lt;/em&gt;:&lt;/p&gt;


&lt;figure style="text-align: center;"&gt;
 &lt;video style="display: block; margin-left: auto; margin-right: auto; width:80%" controls&gt;
 &lt;source src="https://monkemanx.github.io/attachments/guitar/guitar_sound_test_old_strings_comp.mp4" type="video/mp4"&gt;
 Your browser does not support this embedded video.
 &lt;/video&gt;
&lt;/figure&gt;


&lt;p&gt;Below is the song played with the &lt;em&gt;new strings&lt;/em&gt;:&lt;/p&gt;


&lt;figure style="text-align: center;"&gt;
 &lt;video style="display: block; margin-left: auto; margin-right: auto; width:80%" controls&gt;
 &lt;source src="https://monkemanx.github.io/attachments/guitar/guitar_sound_test_new_strings_comp.mp4" type="video/mp4"&gt;
 Your browser does not support this embedded video.
 &lt;/video&gt;
&lt;/figure&gt;


&lt;p&gt;It might be a bit hard to discern the differences because I recorded it with my smartphone&amp;rsquo;s camera and microphone, which aren’t great. However, there is a huge difference, particularly in the sound of the lower three strings; they sound a lot cleaner, less muddied, and more full.&lt;/p&gt;
&lt;p&gt;I hope you liked this article, and hopefully it motivated you to restring your guitar. Trust me, if you haven&amp;rsquo;t changed the strings on your guitar for a while, and they look degraded, changing them will make your guitar sound a lot nicer.&lt;/p&gt;</description></item><item><title>An Introduction to the Theory of Cellular Automata</title><link>https://monkemanx.github.io/articles/cellular_automata/</link><pubDate>Mon, 14 Oct 2024 00:00:00 +0000</pubDate><author>monkeman@cock.li (MonkeMan)</author><guid>https://monkemanx.github.io/articles/cellular_automata/</guid><description>&lt;style&gt;
 .info {
 background-color: #e6f7ff; 
 padding: 15px; 
 border-radius: 5px; 
 margin-bottom: 15px; 
 }

 .info-title {
 font-size: 20px; 
 margin-bottom: 10px; 
 color: #000080; 
 font-weight: bold; 
 }
&lt;/style&gt;

&lt;div class="info"&gt;
 &lt;div class="info-title"&gt;Info&lt;/div&gt;
 &lt;p&gt;This article is based on a lecture at my university. It does not cover all topics from the lecture. Furthermore, since the original lecture was in German, the definitions have been translated into English and may sound a bit awkward.&lt;/p&gt;
&lt;/div&gt;

&lt;h2 id="1-basic-of-cellular-automata"&gt;1. Basic of Cellular Automata&lt;/h2&gt;
&lt;h3 id="11-what-are-cellular-automata"&gt;1.1 What are Cellular Automata&lt;/h3&gt;
&lt;p&gt;You might have heard of &lt;a href="https://playgameoflife.com/"&gt;Conway&amp;rsquo;s Game of Life&lt;/a&gt;, though calling it a &amp;ldquo;game&amp;rdquo; is somewhat misleading &amp;ndash; it is more accurately described as a simulation. The Game of Life models the process of life on a grid of arbitrary size, where each square, or &amp;ldquo;tile,&amp;rdquo; can either be colored (alive) or uncolored (dead). The initial pattern of living cells can be set manually or randomized. From there, the simulation follows a set of simple rules that determine whether each cell will live, die, or remain unchanged in the next generation. The process repeats step by step until the user decides to stop it.&lt;/p&gt;
&lt;p&gt;It’s called the &lt;em&gt;Game of Life&lt;/em&gt; because it mimics biological life, with colored tiles representing living cells and non-colored ones representing dead cells. The rules simulate conditions for survival, birth, or death of these cells.&lt;/p&gt;
&lt;p&gt;For more detail, I highly recommend checking out this aweasome &lt;a href="https://youtu.be/R9Plq-D1gEk"&gt;Numberphile video&lt;/a&gt; with the game’s creator.&lt;/p&gt;


&lt;figure&gt;
 &lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width:70%" src="https://monkemanx.github.io/attachments/game-of-life-loop-cropped.gif"&gt;
 &lt;figcaption style="text-align:center; margin-top: 10px;"&gt;
 Animation made by Ivan Lokhov.
 &lt;/figcaption&gt;
&lt;/figure&gt;


&lt;p&gt;While Conway&amp;rsquo;s Game of Life is interesting, as true students of theoretical computer science, the first questions we should asks are: How can we formally describe this process? How can we generalize Conway&amp;rsquo;s Game of Life? These are the topics I&amp;rsquo;d like to explore in this article.&lt;/p&gt;
&lt;p&gt;In the broadest terms, cellular automata(CA) are a computational model similar to &lt;a href="https://en.wikipedia.org/wiki/Finite-state_machine"&gt;finite state machines&lt;/a&gt; and &lt;a href="https://en.wikipedia.org/wiki/Turing_machine"&gt;Turing machines&lt;/a&gt;. In cellular automata, we have a grid of cells, each of which can exist in a finite number of states. At each step, all cells change their state simultaneously according to a predefined set of rules. Like finite state machines and Turing machines, cellular automata can be used to perform certain computations.&lt;/p&gt;
&lt;p&gt;To fully understand the concepts presented in this article, it is required to have a basic understanding of the following prerequisites:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Fundamentals of formal computer science language (e.g., &lt;a href="https://en.wikipedia.org/wiki/Cartesian_product"&gt;Cartesian product&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;Basics of computability theory (e.g., &lt;a href="https://en.wikipedia.org/wiki/Chomsky_hierarchy"&gt;Chomsky hierarchy&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;&lt;a href="https://en.wikipedia.org/wiki/Big_O_notation"&gt;Big O notation&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;I will be using some technical jargon throughout this article, so knowing these topics is rather important.&lt;/p&gt;
&lt;h3 id="12-why-use-cellular-automata"&gt;1.2 Why use Cellular Automata?&lt;/h3&gt;
&lt;p&gt;Why should we care about the cellular automata computational model? Theoretical computer science often resembles mathematics in that we explore topics that may not have immediate practical applications, yet we explore them nonetheless. Why? It&amp;rsquo;s the same as to ask why a painter paints, a sculptor sculpts, and a photographer captures images: to try to capture the beauty in front of them, trying to grasp the Platonic ideal of beauty.&lt;/p&gt;
&lt;p&gt;While that is a noble pursuit, cellular automata offer more than just that. In traditional computational paradigms, instructions are executed sequentially, one after another. In contrast, cellular automata allow all cells to update simultaneously, leading to significant speedups in solving certain problems. For instance, the fastest general comparison sorting algorithm with a Turing machine operates in \(O(n \log n)\), whereas with cellular automata, we can achieve sorting in \(O(n)\) under specific conditions.&lt;/p&gt;
&lt;p&gt;Furthermore, cellular automata are often useful in simulations, particularly in scenarios involving &lt;a href="https://tomforsyth1000.github.io/papers/cellular_automata_for_physical_modelling.html"&gt;gases&lt;/a&gt; or fluids. For instance, they have been utilized to investigate ways to &lt;a href="https://www.sciencedirect.com/science/article/abs/pii/S0167819100000843"&gt;improve the taste of coffee&lt;/a&gt; by simulating the brewing process. Another example of cellular automata being used for simulation purposes is the game &lt;a href="https://store.steampowered.com/app/881100/Noita/"&gt;Noita&lt;/a&gt;, where the entire environment is fully destructible, thanks to its physics engine, which heavily utilizes cellular automata.&lt;/p&gt;


&lt;figure style="text-align: center;"&gt;
 &lt;video style="display: block; margin-left: auto; margin-right: auto; width:80%" controls muted&gt;
 &lt;source src="https://monkemanx.github.io/attachments/noita_trailer.webm" type="video/webm"&gt;
 Your browser does not support this embedded video.
 &lt;/video&gt;
 &lt;figcaption style="text-align:center; margin-top: 10px;"&gt;Trailer of the video game &lt;i&gt;Noita&lt;/i&gt;.&lt;/figcaption&gt;
&lt;/figure&gt;


&lt;h3 id="13-basic-definition"&gt;1.3 Basic Definition&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;1.3.1 Definition&lt;/strong&gt; &amp;ndash;
The &lt;strong&gt;Space&lt;/strong&gt; \(R\) of a cellular automata, is defined as \(R = \mathbb{Z}_1 \times ... \times \mathbb{Z}_1\) where we call \(d\) the &lt;strong&gt;dimensionality&lt;/strong&gt; of the Space. We can identify a given cell through the usage of &lt;strong&gt;coordiantes&lt;/strong&gt; \(i = (i_1, ..., i_d)\). We furthmore have a set of finite states \(Q\). A &lt;strong&gt;global configuration&lt;/strong&gt; is defined as \(c : R \to Q\) i.e. each cell gets assigned one state.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;1.3.2 Example&lt;/strong&gt; &amp;ndash;
Our space is \(R = \mathbb{Z}_1 \times \mathbb{Z}_2\), we have four states \(Q = \{\text{Brown, Black, Beige, Purple}\}\).&lt;/p&gt;


&lt;figure&gt;
 &lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width:30%" src="https://monkemanx.github.io/attachments/ca_example_1.jpg"&gt;
&lt;/figure&gt;


&lt;p&gt;In the most simple case our cellular automata works deterministic, though it can also work asynchronous or probabilistic.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;1.3.3 Definition&lt;/strong&gt; &amp;ndash;
A &lt;strong&gt;neighborhood&lt;/strong&gt;, is a finite set \(N = \{n_1, ..., n_k\} \subset \mathbb{Z}^d\). Where \(\mathbb{Z}^d\) is not the Space \(R\). The neighborhood of a cell \(i\) is \(n(i) := n + i\), this means we can get the \(j\)-th neighbor from the cell \(i\) like this \(i + n_j\).
We call the mapping \(l : N \to Q\) a &lt;strong&gt;local configuration&lt;/strong&gt; i.e. this describes a possible distribution of states in a neighborhood.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;1.3.4 Definition&lt;/strong&gt; &amp;ndash;
The &lt;strong&gt;d-dimensional Moore-Neighborhood&lt;/strong&gt; with radius \(r\) we call \(M_r^d\) and is defined as \(M_r^d := \{(i_1,...,i_d) | \max_j |i| \leq r \}\).
The &lt;strong&gt;d-dimensional Non-Neuman-Neighborhood&lt;/strong&gt; with radius \(r\) ist \(N_r^d = \{(i_1,...,i_d) | \sum |i_j| \leq r\}\).&lt;/p&gt;


&lt;figure&gt;
 &lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width:60%" src="https://monkemanx.github.io/attachments/moore_neighborhood.jpg"&gt;
 &lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width:60%" src="https://monkemanx.github.io/attachments/von_neumann_neighborhood.jpg"&gt;
 &lt;figcaption style="text-align:center; margin-top: 10px;"&gt;
 An example of the Moore and Von-Neumann Neighborhood.
 &lt;/figcaption&gt;
&lt;/figure&gt;


&lt;p&gt;&lt;strong&gt;1.3.5 Definition&lt;/strong&gt; &amp;ndash;
How a &lt;em&gt;deterministic&lt;/em&gt; cellular automata works, is defined through the &lt;strong&gt;local transfer function&lt;/strong&gt; \(\sigma: Q^N \to Q\) i.e. this mapping assigns a cell based, on the state of its neighbors, a new state.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;1.3.6 Definition&lt;/strong&gt; &amp;ndash;
If we have a global configuration \(c\), then we call the mapping \(c_{i + N} : N \to Q, n \mapsto c_{i+n}\) the &lt;strong&gt;local configuration at i in c&lt;/strong&gt; i.e. \(c_{i + N}\) gives you for every neighbor for the cell i in the configuration c, its state \(c_{i + n}\). (Notice \(n\) is not \(N\)).&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;1.3.7 Definition&lt;/strong&gt; &amp;ndash;
The &lt;strong&gt;global transfer function&lt;/strong&gt; is defined as \(\Delta : Q^R \to Q^R \) with \(\Delta(c)_i = \sigma(c_{i + N})\) i.e. this function assign each cell its new state.&lt;/p&gt;
&lt;p&gt;This CA is now strictly synchronous, because in each step all cell switch their state at the same time, like defined through the global transfer function.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;1.3.8 Example&lt;/strong&gt; &amp;ndash;
Now that we have introduced the basic concepts of the formal language of cellular automata (CA), we can return to Conway&amp;rsquo;s Game of Life and examine how it is defined.&lt;/p&gt;
&lt;p&gt;In Conway&amp;rsquo;s Game of Life, we have the following parameters for the cellular automaton:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Space:&lt;/strong&gt; \( R = \mathbb{Z}^2 \) (the two-dimensional grid of cells)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Neighborhood:&lt;/strong&gt; \( N = M_{1}^2 \) (the adjacent cells)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;States:&lt;/strong&gt; \( Q = \{0, 1\} \) (where 0 represents a dead cell and 1 represents a live cell)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The local transition function is defined as follows:&lt;/p&gt;
$$
\sigma(l) = 
\begin{cases}
 1, &amp; \text{if } l(0,0) = 0 \land s(l) = 3 \\
 1, &amp; \text{if } l(0,0) = 1 \land 2 \leq s(l) \leq 3 \\
 0, &amp; \text{otherwise}
\end{cases}
$$&lt;p&gt;Here, the helper function \( s(l) = \sum_{n \in N, n \neq (0,0)} l(n) \) counts the number of alive neighbors around the cell at \( (0, 0) \).&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The &lt;strong&gt;first case&lt;/strong&gt; states that if a cell is dead (i.e., \( l(0,0) = 0 \)) and has exactly 3 alive neighbors, it becomes alive again.&lt;/li&gt;
&lt;li&gt;The &lt;strong&gt;second case&lt;/strong&gt; indicates that if a cell is alive (i.e., \( l(0,0) = 1 \)) and has between 2 and 3 alive neighbors, it remains alive.&lt;/li&gt;
&lt;li&gt;The &lt;strong&gt;third case&lt;/strong&gt; specifies that if an alive cell has more than 3 alive neighbors, it dies due to overcrowding.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;For more information about Conway&amp;rsquo;s Game of Life, including specific patterns that emerge, check out the &lt;a href="http://www.radicaleye.com/lifepage/"&gt;following blog post&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id="2-computability-theory-of-cellular-automata"&gt;2. Computability Theory of Cellular Automata&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;2.1 Lemma&lt;/strong&gt; &amp;ndash;
There exists a synchronous, deterministic, two-dimensional cellular automaton with an \(M_1^2\) neighborhood and four states, capable of simulating any finite state machine (with an arbitrarily sized state set and arbitrary transition function).&lt;/p&gt;
&lt;p&gt;How can we prove this?&lt;br&gt;
First, we introduce a new cellular automaton called &lt;strong&gt;Wireworld&lt;/strong&gt;.&lt;br&gt;
Wireworld has the state set \(Q = \{\text{Brown, Black, Beige, Purple}\}\), and we use the \(M_1^2\) neighborhood.&lt;br&gt;
The local transition function is shown below, where a cross indicates that the state is irrelevant, and a question mark indicates that the states matter when moving to the next step.&lt;/p&gt;


&lt;figure&gt;
 &lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width:80%" src="https://monkemanx.github.io/attachments/wireworld_transfer.jpg"&gt;
&lt;/figure&gt;


&lt;p&gt;The Beige state represents copper in wires, and the combination of Purple and White represents a signal flowing through the wire.&lt;br&gt;
We can now use Wireworld to simulate various electrical devices by smartly choosing the initial configuration of space \(R\) and applying the transition function repeatedly. Below, you can see the simulation of a &lt;em&gt;wire with a signal&lt;/em&gt; flowing through it.&lt;/p&gt;


&lt;figure&gt;
 &lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width:50%" src="https://monkemanx.github.io/attachments/wireworld-wire.gif"&gt;
&lt;/figure&gt;


&lt;p&gt;It is also possible to simulate a &lt;em&gt;diode&lt;/em&gt;, where a signal can flow in one direction but not in the other. As shown, the signal in the top wire passes through the diode, while in the second wire it does not. Why? If you think back to the local transition function, a cell only turns blue when one or two neighboring cells are blue. In the top wire, this condition is met. In the bottom wire, at the end of the diode, we have three blue cells, so the signal doesn&amp;rsquo;t propagate further.&lt;/p&gt;


&lt;figure&gt;
 &lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width:50%" src="https://monkemanx.github.io/attachments/wireworld-diode.gif"&gt;
&lt;/figure&gt;


&lt;p&gt;A diode is interesting, but even more useful is an &lt;em&gt;OR-gate&lt;/em&gt;. The construction is simple: we join two wires together, but we add one more copper cell at the left side where the wires meet. This prevents the signal from propagating back to the other wire when only one signal reaches the OR-gate.&lt;/p&gt;


&lt;figure&gt;
 &lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width:50%" src="https://monkemanx.github.io/attachments/wireworld-or.gif"&gt;
&lt;/figure&gt;


&lt;p&gt;Similarly, we can use initial configurations to simulate an &lt;em&gt;inverter&lt;/em&gt;, &lt;em&gt;exclusive-OR&lt;/em&gt;, &lt;em&gt;AND&lt;/em&gt;, and a &lt;em&gt;clock generator&lt;/em&gt;, which can generate signals. Using these elements, we can build a &lt;em&gt;ROM&lt;/em&gt; and other components necessary for a computer. You can find more information about this on the &lt;a href="https://www.quinapalus.com/wi-index.html"&gt;Quinapalus website&lt;/a&gt;, where the gifs of the simulations shown above are also from.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Back to the proof&lt;/strong&gt; &amp;ndash;
Now that we have introduced Wireworld and the various components it can simulate, we can return to the proof. Remember, we wanted to prove that we can use a CA to simulate a finite state machine.&lt;br&gt;
We define a &amp;lt;1&amp;gt; signal as having a 1 (blue cell) followed by nothing for 22 steps. A &amp;lt;0&amp;gt; signal is defined as having nothing for 23 steps. With this, we can fit all previously introduced electrical elements into a 24x24 cell grid. When we have a signal at the beginning of one of these elements, we can be sure that 48 steps later, it will reach the output, thus allowing us to synchronize the components. This allows us to simulate a finite state machine using our 24x24 cell grid logic gates.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;2.2 Lemma&lt;/strong&gt; &amp;ndash;
For every Turing machine \(T=(Q_T, B_T, \delta_T)\), there exists a synchronous cellular automaton \(C = (Q_C, \delta_C, H_1^1)\) that can simulate the Turing machine step-by-step without time loss.&lt;/p&gt;
&lt;p&gt;In a Turing machine (TM), we have a tape representing the current storage. We can simulate this using a one-dimensional cellular automaton, where the tape&amp;rsquo;s contents are stored in the cells. Additionally, we mark the cell in the CA corresponding to the position of the Turing machine&amp;rsquo;s head, while the other cells in the CA contain an underscore &amp;ldquo;_&amp;rdquo; to indicate that the head is not on those cells.&lt;/p&gt;
&lt;p&gt;This means we represent a TM configuration \(c_T = (s, b, p)\) through a CA configuration as follows, where \(Q_C\) is the state set of the CA defined as \(C_C = (Q_T \cup \{\_\}) \times B_T\):&lt;/p&gt;


&lt;figure&gt;
 &lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width:50%" src="https://monkemanx.github.io/attachments/tm_ca_config.jpg"&gt;
&lt;/figure&gt;


&lt;p&gt;Now we need a transition function that translates each step of the Turing machine into a step in the CA. The following are some of the most important steps:&lt;/p&gt;


&lt;figure&gt;
 &lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width:80%" src="https://monkemanx.github.io/attachments/tm_ca_transfer_function.jpg"&gt;
&lt;/figure&gt;


&lt;p&gt;For example, in the first line of the image above, if the current cell and its left and right neighbors are not active (i.e., the TM head is not on them), then nothing changes in our cell.&lt;br&gt;
In the second line, if our current cell is not active, but the cell to its left is, we activate the current cell if the Turing machine&amp;rsquo;s transition function dictates a move to the right from the active cell.&lt;/p&gt;
&lt;p&gt;As an example, the following shows the configuration of a Turing machine for a given initial state:&lt;/p&gt;


&lt;figure&gt;
 &lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width:70%" src="https://monkemanx.github.io/attachments/tm_exmaple.jpg"&gt;
&lt;/figure&gt;


&lt;p&gt;And here is how the CA that simulates the TM would look:&lt;/p&gt;


&lt;figure&gt;
 &lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width:70%" src="https://monkemanx.github.io/attachments/ca_example.jpg"&gt;
&lt;/figure&gt;


&lt;p&gt;The crossed lines indicate that each cell in the CA can have two possible values. This is achieved by defining the set of states \(Q_C\) as the Cartesian product of \(Q_T\) (the states of the Turing machine) with \(B_T\) (the states of the Turing machine&amp;rsquo;s transition function).&lt;/p&gt;
&lt;h2 id="3-finite-patterns-and-configurations"&gt;3. Finite Patterns and Configurations&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Definition 3.1&lt;/strong&gt; &amp;ndash;
A subset \(P \subset Q\) is called &lt;strong&gt;passive&lt;/strong&gt; if, for all \(l: N \to Q\) and \(n \in N\) where \(l(n) \in P\), it holds that \(\delta(l) = \delta(0)\).&lt;br&gt;
A state \(q \in Q\) is called a &lt;strong&gt;resting state&lt;/strong&gt; if \(\{q\}\) is passive, meaning that \(\delta(q, q, \dots, q) = q\).&lt;br&gt;
A state \(t \in Q\) is called &lt;strong&gt;dead&lt;/strong&gt; if for all \(l: N \to Q\) with \(l(0) = t\), it holds that \(\delta(l) = t\).&lt;/p&gt;
&lt;p&gt;In simpler terms, a subset is &lt;em&gt;passive&lt;/em&gt; if, for all cells, it is true that when all their neighbors are in a state from the passive set, the cells do not change state in the next step.&lt;br&gt;
A state is &lt;em&gt;dead&lt;/em&gt; if cells in this state never change, regardless of the state of their neighborhood.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Example 3.2&lt;/strong&gt; &amp;ndash;
In Wireworld, \(\{\text{White, Beige}\}\) form a passive set, and \(\{\text{White}\}\) is a dead state.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Definition 3.3&lt;/strong&gt; &amp;ndash;
Let \(C\) be a d-dimensional cellular automaton with space \(R\) and a resting state \(q\). A &lt;strong&gt;pattern&lt;/strong&gt; is a mapping \(m: T \to Q \backslash \{q\}\), where \(T \subset Q\) and is called the &lt;em&gt;carrier&lt;/em&gt;.&lt;br&gt;
Furthermore, we define the associated &lt;strong&gt;pattern configuration&lt;/strong&gt; \(c_m: R \to Q\) by:
&lt;/p&gt;
\[
c_m(i) = 
\begin{cases} 
m(i), \ \text{if } i \in T \\ 
q, \quad \ \ \text{otherwise} 
\end{cases}
\]&lt;p&gt;
A &lt;em&gt;pattern&lt;/em&gt; \(m\) exists in a &lt;em&gt;configuration&lt;/em&gt; \(c\) at position \(j\) if \(\forall i \in T: c(j + i) = m(i)\).&lt;/p&gt;
&lt;p&gt;This means a &lt;em&gt;pattern&lt;/em&gt; is a mapping from a portion of space \(R\) to certain states in the state set \(Q\). The pattern is translation-invariant, meaning it can appear at any coordinate in space, e.g., at space \(j\).&lt;br&gt;
A &lt;em&gt;pattern configuration&lt;/em&gt; is a configuration where the pattern is filled with resting states.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Example 3.4&lt;/strong&gt; &amp;ndash;
Often, 1-dimensional patterns are &lt;a href="https://en.wikipedia.org/wiki/Formal_language#Words_over_an_alphabet"&gt;words&lt;/a&gt;. A simple 2-dimensional pattern could be a rectangle \(m: \mathbb{N}_n \times \mathbb{N}_m \to Q\), but patterns can also be irregular:&lt;/p&gt;


&lt;figure&gt;
 &lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width:50%" src="https://monkemanx.github.io/attachments/pattern_irregular.jpg"&gt;
&lt;/figure&gt;


&lt;p&gt;&lt;strong&gt;Definition 3.5&lt;/strong&gt; &amp;ndash;
The &lt;strong&gt;input&lt;/strong&gt; of a pattern \(m\) into a corresponding cellular automaton happens through choosing the pattern configuration as the &lt;em&gt;start configuration&lt;/em&gt;.&lt;br&gt;
A configuration is in its &lt;strong&gt;end configuration&lt;/strong&gt; when \(\Delta(c) = c\); that is, when we apply the transition function and no further changes occur.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Definition 3.6&lt;/strong&gt; &amp;ndash;
A configuration \(c: R \to Q\) has the carrier \(T(c) = \{i \mid c_i \neq q\}\). A configuration is &lt;strong&gt;finite&lt;/strong&gt; if its carrier is finite. This means we disregard &lt;em&gt;passive&lt;/em&gt; states when considering the carrier.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Lemma 3.7&lt;/strong&gt; &amp;ndash;
For every Turing machine \(T = (Q_T, B_T, \delta_T)\) with one head, there exists a 1-dimensional cellular automaton \(C\) and an encoding function \(cod\) such that for every Turing machine configuration \(c\):
&lt;/p&gt;
\[
\Delta_c(cod(c)) = cod(\Delta_T(c))
\]&lt;p&gt;
The reverse also holds.&lt;br&gt;
This means a cellular automaton can simulate a Turing machine, and vice versa.&lt;/p&gt;
&lt;p&gt;We now aim to detect specific patterns, namely &lt;em&gt;words&lt;/em&gt;. To accomplish this, we need a cellular automaton \(C = (R, N, Q, \delta, A, F_{+}, q)\) that can accept formal languages.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Definition 3.8&lt;/strong&gt; &amp;ndash;
Let \(A \subset Q \backslash \{q\}\) be the &lt;strong&gt;input alphabet&lt;/strong&gt;, and let \(F_{+} \subset Q \backslash A\) be the &lt;strong&gt;set of accepting end states&lt;/strong&gt;.&lt;br&gt;
For a given word \(w = w_1 \dots w_n \in A^+\), we define the associated &lt;strong&gt;starting configuration&lt;/strong&gt; \(c_w\) by:
&lt;/p&gt;
\[
c_w(i) = 
\begin{cases} 
w_i, \ \text{if } 1 \leq i \leq |w| \text{ and } i = (i, 0, \dots, 0) \\ 
q, \text{otherwise}
\end{cases}
\]&lt;p&gt;
(This means we write our word somewhere in the space of the 1-dimensional cellular automaton and fill the rest of the space with the resting state \(q\).)
We call an &lt;em&gt;end configuration&lt;/em&gt; &lt;strong&gt;accepting&lt;/strong&gt; if \(c((1, 0, \dots, 0)) \in F_{+}\); otherwise, the end configuration is &lt;strong&gt;rejecting&lt;/strong&gt;.&lt;br&gt;
A sequence \(c^0, c^1, \dots, c^k\) is called a &lt;strong&gt;calculation&lt;/strong&gt; if \(c^k\) is the only &lt;em&gt;end configuration&lt;/em&gt; and the following holds: \(c^{t+1} = \Delta(c^t)\).&lt;br&gt;
In a &lt;em&gt;calculation&lt;/em&gt;, we start with the initial configuration and continue until we reach an end configuration. The formal language detected by the cellular automaton is:
&lt;/p&gt;
\[
L = \{w \mid \exists c_f \text{ that is accepting with } \Delta^k(c_w) = c_f\} \subset A^+
\]&lt;p&gt;&lt;strong&gt;Example 3.9&lt;/strong&gt; &amp;ndash;
If we have a &lt;em&gt;word&lt;/em&gt; of length \(n = 4\), the first four cells of our cellular automaton will contain the word, while the rest is filled with the resting state.&lt;/p&gt;


&lt;figure&gt;
 &lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width:30%" src="https://monkemanx.github.io/attachments/ca_word.jpg"&gt;
&lt;/figure&gt;


&lt;p&gt;&lt;strong&gt;Example 3.10&lt;/strong&gt; &amp;ndash;
We want to use a cellular automaton to detect the formal language \(L = \{a\}^+\) with \(A = \{a, b\}\). This means the cellular automaton will receive inputs \(a\) and \(b\) and must detect words that consist only of the letter \(a\).&lt;br&gt;
To solve this, we can simulate a finite state machine that accomplishes this. We choose the set \(C = \{0, 1\}\) and \(Q = \{a, b, &lt;+, &lt;-, \_ \}\).&lt;/p&gt;


&lt;figure style="display: flex; justify-content: center;"&gt;
 &lt;div style="text-align: center; margin-right: 10px;"&gt;
 &lt;img loading="lazy" style="width:100%;" src="https://monkemanx.github.io/attachments/positive_example_ca.jpg" alt="Positive Example"&gt;
 &lt;figcaption&gt;Positive Example: Here, the word consists only of 'a's, so we accept the word.&lt;/figcaption&gt;
 &lt;/div&gt;
 &lt;div style="text-align: center; margin-left: 10px;"&gt;
 &lt;img loading="lazy" style="width:100%;" src="https://monkemanx.github.io/attachments/negative_example_ca.jpg" alt="Negative Example"&gt;
 &lt;figcaption&gt;Negative Example: The word contains a 'b', so we reject the input word.&lt;/figcaption&gt;
 &lt;/div&gt;
&lt;/figure&gt;


&lt;p&gt;The above diagram is called a &lt;strong&gt;space-time diagram&lt;/strong&gt; and is useful for visualizing multiple steps of a 1-dimensional cellular automaton.&lt;/p&gt;
&lt;p&gt;The table below shows the transition function of the above cellular automaton. For cases not listed in the table, \(\delta(l) = l(0)\) applies.&lt;/p&gt;


&lt;figure&gt;
 &lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width:30%" src="https://monkemanx.github.io/attachments/ca_detect_lang_transfer_fucntion.jpg"&gt;
&lt;/figure&gt;


&lt;p&gt;&lt;strong&gt;Example 3.11&lt;/strong&gt; &amp;ndash;
It is also possible to create a cellular automaton to detect all possible &lt;a href="https://en.wikipedia.org/wiki/Palindrome"&gt;palindromes&lt;/a&gt; over a given alphabet, e.g., \(A = \{a, b\}\). Below is a space-time diagram for a negative example. The transition function is left out.&lt;/p&gt;


&lt;figure&gt;
 &lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width:60%" src="https://monkemanx.github.io/attachments/ca_palindrome.jpg"&gt;
&lt;/figure&gt;


&lt;p&gt;Do not be confused by the multiple lines. Per time step, as with the cellular automaton used to simulate the Turing machine, we use the Cartesian product to store multiple values in one cell.&lt;/p&gt;
&lt;h2 id="4-self-reproduction"&gt;4. Self reproduction&lt;/h2&gt;
&lt;p&gt;When &lt;a href="https://en.wikipedia.org/wiki/John_von_Neumann"&gt;John von Neumann&lt;/a&gt; first introduced CAs, one thing he was looking for was the &lt;em&gt;ability of self-reproduction&lt;/em&gt;. This means that a CA with a pattern configuration \(c_m\) will, after some steps, reach a configuration where the pattern \(m\) appears several times.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Lemma 4.1&lt;/strong&gt; &amp;ndash;
Let \(p\) be a prime number, \(d\) the dimensionality, and \(N\) the neighborhood. For the CA \(C\) with \(R = \mathbb{Z}^d\), \(Q = \mathbb{Z}_p\), and \(\delta(l) = \sum_{n \in N} l(n) \mod p\), there exists, for any pattern \(m\), a \(k_0\) such that for all \(k &gt; k_0\), the following holds true: After \(t = p^k\) steps, \(C\), starting from the configuration \(c_m\), reaches a configuration where the pattern \(m\) appears exactly \(|N|\) times.&lt;/p&gt;
&lt;p&gt;The lemma above can be proven using the &lt;a href="https://en.wikipedia.org/wiki/Multinomial_theorem#Multinomial_coefficients"&gt;Multinomial theorem&lt;/a&gt; and induction.&lt;/p&gt;


&lt;figure style="text-align: center;"&gt;
 &lt;video style="display: block; margin-left: auto; margin-right: auto; width:80%" controls muted&gt;
 &lt;source src="https://monkemanx.github.io/attachments/simulate_ca_replication.mp4" type="video/mp4"&gt;
 Your browser does not support this embedded video.
 &lt;/video&gt;
 &lt;figcaption style="margin-top: 10px"&gt;
 Shows a pattern being replicated using the the CA described in the lemma above. Animation made with the help of &lt;a href="https://golly.sourceforge.io/"&gt;golly&lt;/a&gt;.
 &lt;/figcaption&gt;
&lt;/figure&gt;


&lt;p&gt;Besides this CA, there are other constructions that can achieve self-reproduction, most notably the CA introduced in von Neumann&amp;rsquo;s book &lt;em&gt;Theory of Self-Reproducing Automata&lt;/em&gt;.&lt;/p&gt;
&lt;h2 id="5-sorting-with-1-dimensional-ca"&gt;5. Sorting with 1-dimensional CA&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Problem Statement 5.1&lt;/strong&gt; &amp;ndash;
Let \(A = \{0,1\}\). We are searching for a CA with \(R = \mathbb{Z}\) that can take as input a pattern \(w \in A^+\) and transform it into the pattern \(0^{N_0(w)}1^{N_1(w)}\), where \(N_0(w)\) is the number of times the 0 appears in the pattern \(w\).&lt;/p&gt;
&lt;p&gt;The above is the simplest formulation of the sorting problem; later, we will look at more complicated cases.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Algorithm 5.2&lt;/strong&gt; &amp;ndash;
We choose \(R = \mathbb{Z}, N = H_1^1, Q = A \cup \{\text{Rectangle}\}\) and define the transfer function as follows:&lt;/p&gt;


&lt;figure style="display: block; margin-left: auto; margin-right: auto; width: 30%;"&gt;
 &lt;img loading="lazy" style="width: 100%;" src="https://monkemanx.github.io/attachments/sorting_1d_ca.jpg"&gt;
 &lt;figcaption style="margin-top: 5px; text-align: center;"&gt;
 The last line is used in all cases where the first two lines don't apply.
 &lt;/figcaption&gt;
&lt;/figure&gt;


&lt;p&gt;The transfer function switches a pair of \(01\) to \(10\) whenever it sees one. This means that in each step, at least one 1 and one 0 move closer to their end positions.&lt;/p&gt;
&lt;p&gt;Unfortunately, we cannot generalize this algorithm to state sets with more than two numbers, e.g., \(\{0,1,2\}\), because we will always have some conflicts in the transfer function. For example, what should \(\delta(2,1,0)\) be? Should we switch the 2 with the 1 or the 1 with the 0?&lt;/p&gt;
&lt;p&gt;One possible solution for this is to alternate looking left and right, which leads us to the &lt;em&gt;Odd-Even-Transposition Sort&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Odd-Even-Transposition Sort 5.3&lt;/strong&gt; &amp;ndash;
We again have a word consisting of numbers as input that we want to sort. This time, we have an additional space for each cell to indicate whether we want to look at this cell to the left or the right. Since this is not part of our input, we need to initialize these values ourselves. The transition function would be as follows, where \(s \in A\), \(x\) means that the state doesn&amp;rsquo;t matter, and \(\square\) means that the cell is empty:&lt;/p&gt;



 



&lt;table class="latex_table"&gt;
	&lt;thead&gt;
			&lt;tr&gt;
					&lt;th&gt;\(l(-1)\)&lt;/th&gt;
					&lt;th&gt;\(l(0)\)&lt;/th&gt;
					&lt;th&gt;\(l(1)\)&lt;/th&gt;
					&lt;th&gt;\(\delta(l)\)&lt;/th&gt;
			&lt;/tr&gt;
	&lt;/thead&gt;
	&lt;tbody&gt;
			&lt;tr&gt;
					&lt;td&gt;\((s, R)\)&lt;/td&gt;
					&lt;td&gt;\((t, L)\)&lt;/td&gt;
					&lt;td&gt;\(x\)&lt;/td&gt;
					&lt;td&gt;\((\max(s,t), R)\)&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;\(x\)&lt;/td&gt;
					&lt;td&gt;\((s, R)\)&lt;/td&gt;
					&lt;td&gt;\((t, L)\)&lt;/td&gt;
					&lt;td&gt;\((\min(s,t), L)\)&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;\(\square\)&lt;/td&gt;
					&lt;td&gt;\((t, L)\)&lt;/td&gt;
					&lt;td&gt;\(x\)&lt;/td&gt;
					&lt;td&gt;\((t, R)\)&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;\(x\)&lt;/td&gt;
					&lt;td&gt;\((s, R)\)&lt;/td&gt;
					&lt;td&gt;\(\square\)&lt;/td&gt;
					&lt;td&gt;\((s, L)\)&lt;/td&gt;
			&lt;/tr&gt;
	&lt;/tbody&gt;
&lt;/table&gt;



&lt;p&gt;For the initialization of \(L, R\):&lt;/p&gt;



 



&lt;table class="latex_table"&gt;
	&lt;thead&gt;
			&lt;tr&gt;
					&lt;th&gt;&lt;/th&gt;
					&lt;th&gt;&lt;/th&gt;
					&lt;th&gt;&lt;/th&gt;
					&lt;th&gt;&lt;/th&gt;
			&lt;/tr&gt;
	&lt;/thead&gt;
	&lt;tbody&gt;
			&lt;tr&gt;
					&lt;td&gt;\(\square\)&lt;/td&gt;
					&lt;td&gt;\((s,\_)\)&lt;/td&gt;
					&lt;td&gt;\(x\)&lt;/td&gt;
					&lt;td&gt;\((s,L)\)&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;\((s,L)\)&lt;/td&gt;
					&lt;td&gt;\((s,\_)\)&lt;/td&gt;
					&lt;td&gt;\(x\)&lt;/td&gt;
					&lt;td&gt;\((s,R)\)&lt;/td&gt;
			&lt;/tr&gt;
	&lt;/tbody&gt;
&lt;/table&gt;



&lt;p&gt;For all other cases:&lt;/p&gt;



 



&lt;table class="latex_table"&gt;
	&lt;thead&gt;
			&lt;tr&gt;
					&lt;th&gt;&lt;/th&gt;
					&lt;th&gt;&lt;/th&gt;
					&lt;th&gt;&lt;/th&gt;
					&lt;th&gt;&lt;/th&gt;
			&lt;/tr&gt;
	&lt;/thead&gt;
	&lt;tbody&gt;
			&lt;tr&gt;
					&lt;td&gt;x&lt;/td&gt;
					&lt;td&gt;z&lt;/td&gt;
					&lt;td&gt;x&lt;/td&gt;
					&lt;td&gt;z&lt;/td&gt;
			&lt;/tr&gt;
	&lt;/tbody&gt;
&lt;/table&gt;



&lt;p&gt;Below is an example calculation with the Odd-Even-Transposition Sort CA:&lt;/p&gt;


&lt;figure&gt;
 &lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width:70%" src="https://monkemanx.github.io/attachments/odd_even_sort_ca.jpg"&gt;
&lt;/figure&gt;


&lt;p&gt;An important lemma when attempting to prove the correctness of sorting algorithms is the following:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Lemma: Sorting from Knuth 5.4&lt;/strong&gt; &amp;ndash;
When a sorting algorithm consists only of operations of the type &amp;ldquo;compare and switch when bigger,&amp;rdquo; and when the starting input data and its positions remain fixed, then the following holds true: The algorithm sorts all input data correctly if and only if it sorts all input that consists solely of zeros and ones.&lt;/p&gt;
&lt;p&gt;Using this lemma, one can easily prove the correctness of the &lt;em&gt;Odd-Even-Transposition Sort&lt;/em&gt; algorithm.&lt;/p&gt;
&lt;h2 id="6-simple-techniques-for-ca"&gt;6. Simple Techniques for CA&lt;/h2&gt;
&lt;p&gt;The first concept I want to introduce is &lt;em&gt;signals&lt;/em&gt;. We&amp;rsquo;ve already encountered examples of them, for instance, the electron traveling through the wire in Wireworld.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Definition 6.1&lt;/strong&gt; &amp;ndash;
A &lt;strong&gt;signal&lt;/strong&gt; is a mapping \(s: T \to R\), where \(T = \mathbb{N}\) represents a set of time stamps.&lt;/p&gt;
&lt;p&gt;Thus, \(s(t)\) provides the position of the cell where the signal is located at time step \(t\).&lt;/p&gt;
&lt;p&gt;Additionally, we want our signal to be constructible, meaning not all mappings defined above are feasible. This leads us to the next definition.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Definition 6.2&lt;/strong&gt; &amp;ndash;
A signal \(s\) is &lt;strong&gt;CA-constructible&lt;/strong&gt; if a CA \(C\) exists such that, starting from the initial configuration \(c^0 : i \to s' \text{ if } i = s(0)\), the CA behaves so that for each configuration at time step \(c^t\), the following holds: \(c_{i+N}^t \iff s(t) = i\).&lt;/p&gt;
&lt;p&gt;This means our signal is constructible if we have a starting configuration where the signal is present at the correct location, and in each subsequent timestep of our configuration, the signal remains at the appropriate location.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Algorithm: Signal with Constant Speed 6.3&lt;/strong&gt; &amp;ndash;
It is possible to construct a signal with a speed corresponding to any rational number \(r \in \mathbb{Q}\) with \( 0 &lt; r &lt; 1\). One such example is shown below for the case \(r = \frac{2}{5}\):&lt;/p&gt;


&lt;figure&gt;
 &lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width:80%" src="https://monkemanx.github.io/attachments/ca_signal_constant_speed.jpg"&gt;
&lt;/figure&gt;


&lt;p&gt;&lt;strong&gt;Algorithm: Parabolic Signal 6.4&lt;/strong&gt; &amp;ndash;
It is also possible to create signals with non-constant speeds. One such example is the Parabolic Signal, where three signals are used: the first signal always remains at the same position, the second signal bounces between the first and the third signal, and the third signal moves one cell to the left whenever it gets hit by the second signal. With this arrangement, the speed of the system continuously doubles. An example is shown below:&lt;/p&gt;


&lt;figure&gt;
 &lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width:40%" src="https://monkemanx.github.io/attachments/ca_signal_parable.jpg"&gt;
&lt;/figure&gt;


&lt;p&gt;&lt;strong&gt;Definition 6.5&lt;/strong&gt; &amp;ndash;
A subset \(m \subset R \times \mathbb{N}_0\) is called a &lt;strong&gt;marking set&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Algorithm: Marking the Middle 6.6&lt;/strong&gt; &amp;ndash;
For example, we can use an algorithm to mark the midpoint between two points by sending two signals: one with speed \(\frac{1}{3}\) and the other with speed \(1\) in the same direction. The faster signal will reflect at the far end, and the signals will meet in the middle.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Definition 6.7&lt;/strong&gt; &amp;ndash;
We define the &lt;strong&gt;arrival time&lt;/strong&gt; of a signal \(s\) as \(a_s : R \to T, x \mapsto \min\{t \mid s(t) = x\}\).&lt;/p&gt;
&lt;p&gt;One interesting lemma related to this provides a lower bound on the speed a CA can achieve.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Lemma Veronique Terrier 6.8&lt;/strong&gt; &amp;ndash;
Let \(s\) be a &lt;em&gt;constructible&lt;/em&gt; signal with monotonically increasing speed, and suppose we have a one-dimensional CA with an \(H_1^1\) neighborhood.
Then, one of the following statements applies:&lt;br&gt;
a) \(a_s(i) - i\) is constant.&lt;br&gt;
b) \(\exists b \in \mathbb{N}_+ : a_s(i) - i \geq \log_b(i)\).&lt;/p&gt;
&lt;p&gt;Besides signals, another useful tool in constructing a CA is counters. Below is the simplest implementation of one.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Algorithm: Walking Counter 6.9&lt;/strong&gt; &amp;ndash;
This algorithm realizes a counter through a one-dimensional CA that &amp;ldquo;walks&amp;rdquo;, incrementing by 1 with each step. The successive counter bits (with the least significant bit in front) in cell \(i\) represent the binary value of \(i\).&lt;/p&gt;


&lt;figure&gt;
 &lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width:70%" src="https://monkemanx.github.io/attachments/ca_counter.jpg"&gt;
&lt;/figure&gt;


&lt;p&gt;It is also possible to implement addition, multiplication, and division with CAs, though I will not cover them here.&lt;/p&gt;
&lt;h2 id="7-synchronisation"&gt;7. Synchronisation&lt;/h2&gt;
&lt;p&gt;A good video introducing of this topic can be found &lt;a href="https://youtu.be/xV1aKUdlljU?si=8HX_lagJ0PIMHi9G"&gt;here&lt;/a&gt;.
The basic concept is that in cellular automata, all cells change their state simultaneously, which makes some algorithms difficult to implement when they require all cells to be synchronized. Thus, we want to find an algorithm that allows us to synchronize the cells.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Problem: Firing Squad Synchronization (FSSP) 6.10&lt;/strong&gt; &amp;ndash;
Given the state set \(Q' = \{\#, g, s, f\}\), we are searching for a CA \(C\) with a \(H_1^1\) neighborhood and state \(Q\), with \(Q' \subset Q\), that has the following properties:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;\(\{\#, s\}\) are passive states, with \(\#\) being the dead state.&lt;/li&gt;
&lt;li&gt;\(C\) transforms any configuration of the form \(c_g = \#gss...s\#\) into the configuration \(c_f = \#fff...f\#\) with the same number of cells.&lt;/li&gt;
&lt;li&gt;During the process, the state \(f\) must not appear in any configuration prior to the final configuration \(c_f\).&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This problem must be solved by the CA regardless of the length of the starting configuration, meaning we cannot store the number of cells to be synchronized.&lt;/p&gt;
&lt;p&gt;The state \(g\) represents the general, which is the leader initiating the synchronization process, while \(s\) represents the soldiers who must fire simultaneously. After firing, the soldiers enter the state \(f\).&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Algorithm: Balzer 6.11&lt;/strong&gt; &amp;ndash;
The cell with \(1&gt;&gt;\) acts as the general. The main idea follows a &lt;a href="https://en.wikipedia.org/wiki/Divide-and-conquer_algorithm"&gt;divide and conquer&lt;/a&gt; approach by recursively dividing the space in half. To find the middle, we use the algorithm learned in the previous chapter. The recursion stops when the sections are small enough that each cell can detect its neighboring sections. The states \((\) and \()\) mark the synchronization sections, and the algorithm calculates subsequent sections recursively.&lt;/p&gt;
&lt;p&gt;The overall running time of the algorithm is \(O(3n)\).&lt;/p&gt;


&lt;figure&gt;
 &lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width:70%" src="https://monkemanx.github.io/attachments/ca_synchronize_balzer.jpg"&gt;
&lt;/figure&gt;


&lt;p&gt;The following lemma provides a lower bound for the FSSP problem, meaning no algorithm can be faster than this.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Lemma: Waksman 6.12&lt;/strong&gt; &amp;ndash;
There is no CA that can solve the FSSP problem for a configuration of length \(n\) in fewer than \(2n - 3\) steps.&lt;/p&gt;
&lt;p&gt;Several algorithms solve the FSSP problem optimally in exactly \(2n - 3\) steps, including those by &lt;em&gt;Gerken 1987&lt;/em&gt;, &lt;em&gt;Waksman&lt;/em&gt;, and &lt;em&gt;Mazoyer 1987&lt;/em&gt;. These algorithms, instead of always dividing the space by a factor of 2, divide it into more sections, allowing for faster synchronization.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Problem: General at Arbitrary Position 6.13&lt;/strong&gt; &amp;ndash;
The next generalization of the FSSP problem is that the general is not always positioned on the left but instead can be randomly distributed in the starting configuration. The goal is to synchronize all the cells, regardless of the general&amp;rsquo;s position.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Algorithm: FSSP-1DIM-General-Arbitrary-Position 6.14&lt;/strong&gt; &amp;ndash;
Initially, the general is at position \(x_g\). We send a signal with speed 1 to both edges, starting the FSSP synchronization algorithm, whose area of effect reaches the position \(x_t\), where the reflected signals meet. This FSSP synchronization algorithm can be any of the previously mentioned ones, such as Balzer or Mazoyer.&lt;/p&gt;
&lt;p&gt;In between some smaller sections, we need to freeze the algorithm to prevent it from advancing faster than the rest of the cells. We unfreeze these sections by sending a signal from the middle \(x_m\). We determine \(x_m\) using the middle-finding operation between \(x_g\) and \(x_t\).&lt;/p&gt;
&lt;p&gt;Below is a sketch of the process, where the blue lines represent the freezing signal and the red lines represent the unfreezing signal:&lt;/p&gt;


&lt;figure&gt;
 &lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width:40%" src="https://monkemanx.github.io/attachments/ca_sychronize_arbitary_general.jpg"&gt;
&lt;/figure&gt;


&lt;p&gt;&lt;strong&gt;Problem: Rectangle Synchronization 6.15&lt;/strong&gt; &amp;ndash;
So far, we have looked at synchronization in 1-dimensional space. But what if we want to synchronize a 2-dimensional space, such as a rectangle?&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Algorithm: Synchronize Rectangle 6.16&lt;/strong&gt; &amp;ndash;
The rectangle consists of \(m\) rows and \(n\) columns. We assume the general is positioned at the 0-th row and 0-th column. We can use a slight modification of the &lt;em&gt;FSSP-1DIM-General-Arbitrary-Position 6.14&lt;/em&gt; algorithm to synchronize the rectangle. We start the algorithm by sending a signal with speed \(\frac{1}{3}\) from the general diagonally across the rectangle, triggering the synchronization process for the set \(M_i = \{(i,j) \mid j \geq i\} \cup \{(j,i) \mid j \geq i\}\). All \(M_i\) are synchronized at the same time.&lt;/p&gt;
&lt;p&gt;In the sketch below, the \(M_i\) have the shape of a sideways &amp;ldquo;L&amp;rdquo;. We treat these &amp;ldquo;L&amp;quot;s or \(M_i\) as 1-dimensional synchronization cases, which we solve using the algorithm from &lt;em&gt;6.14&lt;/em&gt;.&lt;/p&gt;


&lt;figure&gt;
 &lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width:60%" src="https://monkemanx.github.io/attachments/ca_sychronize_rectangle.jpg"&gt;
&lt;/figure&gt;


&lt;p&gt;This synchronization process can be further generalized to synchronize d-dimensional cuboids or even more complex, non-uniform d-dimensional shapes.&lt;/p&gt;
&lt;p&gt;Another possible generalization would be to have no general at all, where the CA must elect a cell as the leader. This leads us to the &lt;strong&gt;Leader-Election Problem&lt;/strong&gt;. There are CAs capable of solving this, but they are quite complex and won&amp;rsquo;t be covered here.&lt;/p&gt;
&lt;h2 id="8-sorting-with-2-dimensional-ca"&gt;8. Sorting with 2-dimensional CA&lt;/h2&gt;
&lt;p&gt;Until now, we have only explored sorting in the 1-dimensional case. We now want to extend this to the 2-dimensional case, and for simplicity, we&amp;rsquo;ll limit ourselves to quadratic patterns. The first question we need to ask ourselves is: in what arrangement do we want to sort? Below, you can see some example arrangements, and for cellular automata, arrangement (c) is the easiest.&lt;/p&gt;


&lt;figure&gt;
 &lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width:100%" src="https://monkemanx.github.io/attachments/ca_2d_sort_arrangments.jpg"&gt;
&lt;/figure&gt;


&lt;p&gt;&lt;strong&gt;Problem: 2-dimensional Sorting 8.1&lt;/strong&gt; &amp;ndash;
I&amp;rsquo;ll leave out the formal problem definition, but generally, we have a chosen pattern \(e : \mathbb{N}_m \times \mathbb{N}_m \to A\) that we want to transform into a &lt;em&gt;sorted pattern&lt;/em&gt; \(s : \mathbb{N}_m \times \mathbb{N}_m \to A\) with certain properties.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Algorithm: Shear Sort 8.2&lt;/strong&gt; &amp;ndash;
The algorithm works in \(1 + \log(m)\) phases. In phases \(1, 3, 5, ..., 1 + \log(m)\), we sort each &lt;em&gt;row&lt;/em&gt; individually. For instance, we can use the &lt;em&gt;odd-even transposition sort (5.3)&lt;/em&gt; here, sorting the odd-numbered rows in ascending order from left to right and the even-numbered rows in ascending order from right to left.&lt;/p&gt;
&lt;p&gt;In phases \(2, 4, 6, ..., 2\log(m)\), we sort each &lt;em&gt;column&lt;/em&gt;, moving the smaller values toward the top.&lt;/p&gt;


&lt;figure&gt;
 &lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width:100%" src="https://monkemanx.github.io/attachments/ca_shearsort_example.jpg"&gt;
 &lt;figcaption style="text-align:center; margin-top: 10px;"&gt;
 Example calculation with the Shear Sorting algorithm.
 &lt;/figcaption&gt;
&lt;/figure&gt;


&lt;p&gt;For this algorithm to work, we first need a phase \(0\), where all cells are initialized with the information on whether they are in an odd or even-numbered row, allowing them to sort accordingly.&lt;/p&gt;
&lt;p&gt;This initialization can be done for each column starting from the top row, taking \(m\) steps (the number of cells in a row) by walking a modulo-2 counter downward for each column. Simultaneously, we can run a FSSP algorithm that ends at the same time and initiates the sorting process once the initialization is complete. To switch the sorting behavior between odd and even rows, we can again use a FSSP algorithm to toggle the behavior after \(m\) steps (since it takes \(m\) steps for odd-even transposition sort to sort one row).&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Lemma 8.3&lt;/strong&gt; &amp;ndash;
The Shear Sort algorithm produces a sorted pattern for all input configurations and takes \(O(\sqrt{n}\log(n))\) steps.&lt;/p&gt;
&lt;p&gt;It is important to note that the correctness of the Shear Sort algorithm is not trivial. For example, if you change the direction so that both odd and even rows sort in the same way, the algorithm will no longer work.&lt;/p&gt;
&lt;p&gt;To prove the correctness of Shear Sort, the &lt;em&gt;Knuth Sorting Lemma (5.4)&lt;/em&gt; can be used.&lt;/p&gt;
&lt;p&gt;There is another algorithm for 2-dimensional sorting by &lt;em&gt;Schnorr and Shamir&lt;/em&gt;, where the input quadratic pattern is divided into four equally-sized quadrants. It runs 9 distinct phases, each doing something different. I won’t go into much more detail, but the algorithm has a running time of \(O(\sqrt{n})\).&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Lemma 8.4&lt;/strong&gt; &amp;ndash;
Any algorithm for 2-dimensional sorting in serpentine line form for CA requires at least \(3\sqrt{n} - o(\sqrt{n})\) steps if it needs to sort an arbitrary number of values.&lt;/p&gt;
&lt;p&gt;An interesting takeaway is that using CA, we can apply &lt;em&gt;odd-even transposition sort&lt;/em&gt; to sort in \(O(n)\), and we can use the &lt;em&gt;Schnorr and Shamir&lt;/em&gt; algorithm to sort in 2 dimensions in \(O(\sqrt{n})\). Both are more efficient than their classical non-CA sorting algorithm counterparts.&lt;/p&gt;
&lt;h2 id="9-asynchronous-ca"&gt;9. Asynchronous CA&lt;/h2&gt;
&lt;p&gt;We&amp;rsquo;ve seen many different CAs and algorithms so far, but they all had one commonality: all the cells change deterministically and synchronously. However, this is not always achievable. One could imagine that in the future, CAs could be used for nanotechnology, with tiny robots injected into the bloodstream to unclog arteries or repair cell damage. But one problem arises—synchronizing these tiny robots. To synchronize, they need to emit signals to communicate with each other. However, because they are so small, this might not be possible, or they may only have weak transmitters that allow occasional communication. For certain applications, such as simulating natural phenomena, asynchronous CAs might also provide more realistic results.&lt;/p&gt;
&lt;p&gt;As such, we want to explore asynchronous CAs, where not all cells update simultaneously.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Definition: Asynchronous CA 9.1&lt;/strong&gt; &amp;ndash;
&lt;strong&gt;Asynchronous&lt;/strong&gt; mode of operation:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Subset \(A \subset R\) of active cells&lt;/li&gt;
&lt;li&gt;\(F_A : Q^R \to Q^R\) induced by \(f\) according to
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Active&lt;/strong&gt; cells: \(\forall x \in A : F_A(c)(x) = f(L(c,x))\)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Passive&lt;/strong&gt; cells: \(\forall x \in R \backslash A : F_A(c)(x) = c(x)\)&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;\(F_A\) is a function.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This means that we have a certain subset of our space that consists of active cells, and these change their state according to the transfer function \(F_A\). All other cells that are not active do not change their state but instead keep their current state. This set of active cells doesn&amp;rsquo;t need to be fixed and can change over time.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Example: Rule 170 9.2&lt;/strong&gt; &amp;ndash;
The CA &lt;em&gt;Rule 170&lt;/em&gt; has the transfer function \(f(l) = l(1)\), i.e., we shift all states one to the left per step. An example can be seen in the space-time diagram below. The red-marked cells are the active cells:&lt;/p&gt;


&lt;figure&gt;
 &lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width:60%" src="https://monkemanx.github.io/attachments/ca_rule170_asynchronous.jpg"&gt;
&lt;/figure&gt;


&lt;p&gt;&lt;strong&gt;Algorithm: Nakamura (1970) 9.3&lt;/strong&gt; &amp;ndash;
We now have an asynchronous CA and want to use it to simulate a synchronous CA so that we can apply already learned synchronous algorithms to our asynchronous CA. The idea is to let some cells be ahead of others but never more than one step compared to any other cell in the neighborhood, and to remember the old state for those behind.&lt;/p&gt;
&lt;p&gt;We will set the state set to \(Q' = Q \times Q \times \{0,1,2\}\), where the first \(Q\) stores the current state of the cell, the second \(Q\) stores the state from the last step, and \(\{0,1,2\}\) tracks how far ahead the cell is. We can then define our transfer function as follows:&lt;/p&gt;


&lt;figure&gt;
 &lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width:80%" src="https://monkemanx.github.io/attachments/ca_nakamura_transfer_function.jpg"&gt;
&lt;/figure&gt;


&lt;p&gt;This &amp;ldquo;if&amp;rdquo; statement means that the time of the cells in the neighborhood needs to be the same or at most one step ahead for the transfer function to work. If this is not the case, the cells are not allowed to change their state, giving the other cells time to catch up.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Example: Rule 170 9.4&lt;/strong&gt; &amp;ndash;
We again look at the CA Rule 170, but this time we use the Nakamura technique to simulate a synchronous CA using an asynchronous CA.&lt;/p&gt;


&lt;figure&gt;
 &lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width:60%" src="https://monkemanx.github.io/attachments/ca_nakamura_example.jpg"&gt;
 &lt;figcaption style="text-align:center; margin-top: 10px;"&gt;
 This is only how the Nakamura technique stores the states of the CA. I didn’t include a full simulation, but it should be fairly obvious from this picture onwards.
 &lt;/figcaption&gt;
&lt;/figure&gt;


&lt;p&gt;&lt;strong&gt;Definition: \(\alpha\)-Asynchronous CA 9.5&lt;/strong&gt; &amp;ndash;
Instead of choosing the active cells deterministically, we now want to randomly select which cells are active and which are passive. We introduce \(\alpha\), a probability between 0 and 1, and make the set of active cells \(A\) a &lt;a href="https://en.wikipedia.org/wiki/Random_variable"&gt;random variable&lt;/a&gt;. Our CA behaves as follows:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;In each step, each cell \(x\) is included in \(A\) with a probability \(\alpha\), independently of the others.&lt;/li&gt;
&lt;li&gt;After we have chosen \(A\), we use the transfer function \(F_A\) to update the cells, then restart the process.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Example: Majority Rule (232) 9.6&lt;/strong&gt; &amp;ndash;
We set our transfer function as follows:
&lt;/p&gt;
\[
f(l) =
\begin{cases}
0, \ \text{if } l(-1) + l(0) + l(1) \leq 1\\
1, \ \text{if } l(-1) + l(0) + l(1) \geq 2
\end{cases}
\]&lt;p&gt;With synchronous updating, blocks of at least two consecutive bits are conserved, and isolated bits are destroyed. When using asynchronous updating with a small \(\alpha\), it takes some time for the isolated bits to be destroyed.&lt;/p&gt;


&lt;figure&gt;
 &lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width:40%" src="https://monkemanx.github.io/attachments/ca_rule_232.jpg"&gt;
 &lt;figcaption style="text-align:center; margin-top: 10px;"&gt;
 This example is simulated using a synchronous CA.
 &lt;/figcaption&gt;
&lt;/figure&gt;


&lt;p&gt;&lt;strong&gt;Example: Traffic Rule (184) 9.7&lt;/strong&gt; &amp;ndash;
A &amp;ldquo;car,&amp;rdquo; marked by the state &amp;ldquo;1,&amp;rdquo; moves to the right if there is an &amp;ldquo;empty street&amp;rdquo; marked by state &amp;ldquo;0,&amp;rdquo; leaving an &amp;ldquo;empty street&amp;rdquo; behind. Otherwise, the &amp;ldquo;car&amp;rdquo; stays where it is. The total number of 0s and 1s never changes.&lt;/p&gt;


&lt;figure&gt;
 &lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width:40%" src="https://monkemanx.github.io/attachments/ca_rule_184.jpg"&gt;
 &lt;figcaption style="text-align:center; margin-top: 10px;"&gt;
 This example is simulated using a synchronous CA.
 &lt;/figcaption&gt;
&lt;/figure&gt;


&lt;p&gt;With synchronous updating, separated cars move to the right, and traffic jams move to the left. When using asynchronous updating with a very large \(\alpha\), basically the same thing happens.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Definition 9.8&lt;/strong&gt; &amp;ndash;
We now define a &lt;strong&gt;probabilistic CA&lt;/strong&gt;. The local transfer function is \(f: Q^N \to [0,1]^Q\), where \(f(l)(q)\) is the probability that a cell observing \(l\) in its neighborhood chooses \(q\) as its new state. For this function to make sense, we have an additional requirement \(l \in Q^N : \sum_{q \in Q} f(l)(q) = 1\). \(f\) is applied using synchronous mode of operation.&lt;/p&gt;
&lt;p&gt;In fact, it turns out that \(\alpha\)-asynchronous CAs are a special case of probabilistic CAs with the following transfer function:&lt;/p&gt;


&lt;figure&gt;
 &lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width:60%" src="https://monkemanx.github.io/attachments/ca_a_to_probabillistic_ca.jpg"&gt;
&lt;/figure&gt;


&lt;p&gt;&lt;strong&gt;Problem 9.9&lt;/strong&gt; &amp;ndash;
We have an initial configuration \(c_s\), where cells have either the state \(0\) or \(1\). The goal is to find an algorithm that results in a final configuration \(c_f\), where all cells have the state \(0\) if \(c_s\) contains more cells with state \(0\) than state \(1\). Otherwise, all cells should have the state \(1\). This problem is called &lt;strong&gt;density classification&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Theorem: Land/Belew (1995) 9.10&lt;/strong&gt; &amp;ndash;
There is no deterministic CA that can solve the &lt;em&gt;density classification&lt;/em&gt; problem with synchronous updating.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Algorithm: Fuks (1995) 9.1&lt;/strong&gt; &amp;ndash;
The &lt;em&gt;density classification&lt;/em&gt; problem can be solved using two CAs:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;First, run \(n/2\) steps with Rule 184 (traffic rule).&lt;/li&gt;
&lt;li&gt;Then, run \(n/2\) steps with Rule 232 (majority rule).&lt;/li&gt;
&lt;/ul&gt;


&lt;figure style="text-align: center;"&gt;
 &lt;video style="display: block; margin-left: auto; margin-right: auto; width:80%" controls muted&gt;
 &lt;source src="https://monkemanx.github.io/attachments/ca_algorithm_fuks.mp4" type="video/mp4"&gt;
 Your browser does not support this embedded video.
 &lt;/video&gt;
 &lt;figcaption style="text-align:center; margin-top: 10px;"&gt;A friend of mine simulated the algorithm of &lt;i&gt;Fuks&lt;/i&gt; on a LED-Stripe.&lt;/figcaption&gt;
&lt;/figure&gt;


&lt;p&gt;&lt;strong&gt;Algorithm: Fates (2011) 9.2&lt;/strong&gt; &amp;ndash;
The &lt;em&gt;density classification&lt;/em&gt; problem can be solved using a probabilistic CA with the following local transfer function:
&lt;/p&gt;
\[
f(l) = 
\begin{cases}
f_{184}(l), \text{with probability } \alpha \\
f_{232}(l), \text{with probability } 1 - \alpha
\end{cases}
\]&lt;p&gt;
Where \(\alpha\) needs to be sufficiently large.&lt;/p&gt;


&lt;figure style="text-align: center;"&gt;
 &lt;video style="display: block; margin-left: auto; margin-right: auto; width:80%" controls muted&gt;
 &lt;source src="https://monkemanx.github.io/attachments/ca_algorithm_fates.mp4" type="video/mp4"&gt;
 Your browser does not support this embedded video.
 &lt;/video&gt;
 &lt;figcaption style="text-align:center; margin-top: 10px;"&gt;A friend of mine simulated the algorithm of &lt;i&gt;

Fates&lt;/i&gt; on a LED-Stripe with a probability of 80%.&lt;/figcaption&gt;
&lt;/figure&gt;


&lt;h2 id="10-conclusion"&gt;10. Conclusion&lt;/h2&gt;
&lt;p&gt;That&amp;rsquo;s it. I hope you&amp;rsquo;ve learned a thing or two! The field of cellular automata is much broader than what I&amp;rsquo;ve covered here. If you&amp;rsquo;re interested in diving deeper, I can recommend a few topics: the &lt;a href="https://en.wikipedia.org/wiki/Abelian_sandpile_model"&gt;Abelian sandpile model&lt;/a&gt;, &lt;em&gt;Algorithms for Leader Election by Cellular Automata&lt;/em&gt;, &lt;a href="https://en.wikipedia.org/wiki/Block_cellular_automaton"&gt;Block cellular automaton&lt;/a&gt;, &lt;a href="https://en.wikipedia.org/wiki/Lattice_gas_automaton"&gt;Lattice gas automaton&lt;/a&gt;, and the &lt;a href="https://en.wikipedia.org/wiki/Nagel%E2%80%93Schreckenberg_model"&gt;Nagel–Schreckenberg model&lt;/a&gt;, just to name a few.&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;References:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;This article is based on the lecture &amp;ldquo;Algorithms in Cellular Automata&amp;rdquo; by Thomas Worsch.&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>Some thoughts on 'Paranoid Mage'</title><link>https://monkemanx.github.io/articles/issues_paradnoid_mage/</link><pubDate>Tue, 08 Oct 2024 00:00:00 +0000</pubDate><author>monkeman@cock.li (MonkeMan)</author><guid>https://monkemanx.github.io/articles/issues_paradnoid_mage/</guid><description>&lt;style&gt;
 .info {
 background-color: #e6f7ff; 
 padding: 15px; 
 border-radius: 5px; 
 margin-bottom: 15px; 
 }

 .info-title {
 font-size: 20px; 
 margin-bottom: 10px; 
 color: #000080; 
 font-weight: bold; 
 }
&lt;/style&gt;

&lt;div class="info"&gt;
 &lt;div class="info-title"&gt;Info&lt;/div&gt;
 &lt;p&gt;This article contains heavy spoilers for the novel &lt;em&gt;Paranoid Mage&lt;/em&gt;.&lt;/p&gt;
&lt;/div&gt;

&lt;h2 id="introduction"&gt;Introduction&lt;/h2&gt;
&lt;p&gt;I hadn&amp;rsquo;t read anything truly interesting in a long time, but recently I came across &lt;a href="https://www.royalroad.com/fiction/49879/paranoid-mage"&gt;Paranoid Mage&lt;/a&gt;, a fantasy web-&lt;a href="https://en.wikipedia.org/wiki/Serial_(literature)"&gt;serial&lt;/a&gt;, which pleasantly surprised me after just a few chapters. This was especially so, because much of the content from the web novel community (including sites like &lt;a href="https://www.novelupdates.com"&gt;NovelUpdates&lt;/a&gt;, &lt;a href="https://www.webnovel.com/"&gt;Webnovel.com&lt;/a&gt;, &lt;a href="https://www.scribblehub.com/"&gt;ScribbleHub&lt;/a&gt;, and &lt;a href="https://www.royalroad.com/home"&gt;RoyalRoad&lt;/a&gt;) tends to be unoriginal, relying on the same overused tropes, with little character development and directionless stories.&lt;/p&gt;


&lt;figure style="display: block; text-align: center; gap: 10px;"&gt;
 &lt;div style="display: flex; justify-content: center; gap: 10px;"&gt;
 &lt;img style="width: 60%;" src="https://monkemanx.github.io/attachments/jp_long_title_1.png"&gt;
 &lt;img style="width: 40%;" src="https://monkemanx.github.io/attachments/jp_novel_long_title.jpeg"&gt;
 &lt;/div&gt;
 &lt;figcaption style="margin-top: 10px;"&gt;
 Classic japanese web-novel titles from &lt;i&gt;novelupdate&lt;/i&gt;.
 &lt;/figcaption&gt;
&lt;/figure&gt;


&lt;p&gt;However, when I started reading &lt;em&gt;Paranoid Mage&lt;/em&gt;, it felt different, like a proper, well-structured story. That really excited me, but the more I read the worse it got, but I’m getting ahead of myself.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;What is &lt;em&gt;Paranoid Mage&lt;/em&gt; about?&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Our protagonist, Callum, has spent his entire life seeing things that shouldn&amp;rsquo;t exist. Creatures like lizardmen, gnomes, and other magical phenomena. The first time he admitted to seeing these things, no one believed him. People thought he was crazy. So, Callum learned to keep quiet and ignore what he saw, not wanting others to think he was mad.&lt;/p&gt;
&lt;p&gt;Everything changes when he gets caught up in a magical robbery, and the creatures realize he can see them. They bring him into the supernatural organization known as the &lt;em&gt;Guild of Arcane Regulation (GAR)&lt;/em&gt;, where he discovers he&amp;rsquo;s a mage. However, mages aren&amp;rsquo;t allowed to roam freely, they’re subject to strict regulations, education, and duties they must adhere to.&lt;/p&gt;
&lt;p&gt;Deeply suspicious of the GAR, Callum chooses to run instead. A wild goose chase ensues.&lt;/p&gt;
&lt;/blockquote&gt;


&lt;figure&gt;
 &lt;img style="display: block; margin-left: auto; margin-right: auto; width:40%" src="https://monkemanx.github.io/attachments/paranoid_mage.jpg"&gt;
&lt;/figure&gt;


&lt;h2 id="story-recap"&gt;Story Recap&lt;/h2&gt;
&lt;p&gt;The setting of &lt;em&gt;Paranoid Mage&lt;/em&gt; is surprisingly refreshing, especially in a sea of &lt;a href="https://en.wikipedia.org/wiki/Isekai"&gt;isekai&lt;/a&gt; and &lt;a href="https://en.wikipedia.org/wiki/LitRPG"&gt;LitRPG&lt;/a&gt; novels.&lt;/p&gt;
&lt;p&gt;When I first read the synopsis and then the opening chapter, where Callum is captured by the GAR, I thought we were headed for a giant academy arc, where our protagonist would be enrolled in the GAR academy and the story would revolve around academy-related problems. This trope, in my opinion, is overused. For example, from &lt;a href="https://www.novelupdates.com"&gt;NovelUpdates&lt;/a&gt; top 25 most popular novels this month, several feature an academy setting:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.novelupdates.com/series/surviving-as-a-mage-in-a-magic-academy/"&gt;Surviving as a Mage in a Magic Academy&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.novelupdates.com/series/mesugaki-tank-enters-the-academy/"&gt;Mesugaki Tank Enters The Academy&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.novelupdates.com/series/the-academys-weakest-became-a-demon-limited-hunter/"&gt;The Academy’s Weakest Became A Demon-Limited Hunter&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.novelupdates.com/series/i-became-a-flashing-genius-at-the-magic-academy/"&gt;I Became A Flashing Genius At The Magic Academy&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.novelupdates.com/series/i-became-a-murderer-in-the-academy/"&gt;Became a M*rderer in the Academy&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Not that the academy trope is inherently bad, but it’s become so common that it’s harder to create a unique story around it.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Paranoid Mage&lt;/em&gt;, however, took a different route. Instead of following the academy narrative, our weak protagonist decides to run from the all-powerful GAR. This raises a lot of intriguing questions for the reader: How can Callum, who has just learned he&amp;rsquo;s a mage and has little power, escape an entire organization like the GAR? How can he learn to use magic when the GAR has a total monopoly on it? And many more.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Book One&lt;/strong&gt;&lt;br&gt;
The first book of &lt;em&gt;Paranoid Mage&lt;/em&gt; executes the story very well. Callum settles in a small town, hoping to evade the GAR and train his magical abilities. The local vampires have been killing townsfolk for their blood, and after they kidnap a shifter (a monster species) with whom Callum had interacted, he decides to rescue her.&lt;/p&gt;
&lt;p&gt;He accomplishes this by teleporting (as he&amp;rsquo;s a spatial mage) into the vampire nest while most of them are asleep, and he eradicates them using a shotgun.&lt;/p&gt;
&lt;p&gt;The GAR takes notice and sends agents to investigate the vampire killings, forcing Callum to flee the town shortly after.&lt;/p&gt;
&lt;p&gt;The boss of the freed shifter, impressed with Callum&amp;rsquo;s abilities, offers him a job: to wipe out four more vampire nests in exchange for magical knowledge. Callum agrees. While scouting vampire locations and planning the attacks, he also forms a study group with a young wizard he meets, where they teach each other.&lt;/p&gt;
&lt;p&gt;Using a clever strategy, Callum successfully destroys the vampire nests. Before moving on, he returns one last time to bid farewell to the young mage in the study group, but the GAR is waiting for him. They trap and capture him.&lt;/p&gt;
&lt;p&gt;Callum is transported to the GAR headquarters, where he is interrogated. Unable to teleport due to his powers being blocked, he uses a hidden teleportation device implanted in his body to escape. However, now that his identity has been revealed, the GAR knows who killed the vampires.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Book Two&lt;/strong&gt;&lt;br&gt;
Injured and teleported into the wilderness, Callum decides to hike to the nearest town. Along the way, he encounters wild fae hunting two humans and decides to help them by killing the fae. It turns out the fae were nobles, and the fae king becomes furious, chasing Callum. To escape, Callum flees to Europe and then travels through a portal to the dragon world, where the fae cannot follow.&lt;/p&gt;
&lt;p&gt;Next, Callum decides to build another teleportation device, which requires rare materials from the vampire lands. As he attempts to mine these materials, he is discovered by GAR agents and chased across the globe. Eventually, Callum returns to America, where he learns that the couple he rescued earlier is being held by the GAR, with the help of another Fae King, Callum manages to rescue them.
Exhausted, he goes to Mexico and builds an operating base using the money he earned from eliminating the vampires.&lt;/p&gt;
&lt;p&gt;While there, he discovers that his partner, Lucy, who had been providing him with insider information about the GAR, has been captured. Callum decides to rescue her, but it turns out to be a trap with archmages lying in wait. Despite this, Callum manages to escape with Lucy.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Book Three&lt;/strong&gt;&lt;br&gt;
After witnessing how the GAR used Lucy to get to him and seeing what they had done to her, Callum decides that the GAR is corrupt and must be stopped. He sets his sights on Archmage Fane, planning an assassination during a meeting. His plan succeeds.&lt;/p&gt;
&lt;h2 id="my-criticism"&gt;My Criticism&lt;/h2&gt;
&lt;p&gt;The story unfolds as an underdog tale, with our protagonist, isolated and friendless, taking on an entire supernatural organization—similar to &lt;em&gt;Star Wars&lt;/em&gt;, where the rebels face off against the Empire.&lt;/p&gt;
&lt;p&gt;This is where my first issue lies. The appeal of an underdog story comes from seeing someone weak triumph against overwhelming odds. In &lt;em&gt;Star Wars&lt;/em&gt;, for instance, we have the full might of the Empire pitted against a small rebel group. The problem with &lt;em&gt;Paranoid Mage&lt;/em&gt; is that while it presents itself in the same vein as an underdog story, the reality is far from it. In &lt;em&gt;Star Wars&lt;/em&gt;, we had Darth Vader, a near-unassailable figure who served as a manifestation of the Empire’s will. More often than not, when Vader appeared, someone died (e.g., Raymus Antilles, who was strangled to death). And he didn’t just kill weak characters (e.g., Obi-Wan Kenobi).&lt;/p&gt;
&lt;p&gt;When you compare this to the GAR and its leaders, the Archmages, in &lt;em&gt;Paranoid Mage&lt;/em&gt;, what we see instead is incompetence, over and over. We are told by various characters how scary the GAR and Archmages are, but we never truly witness their power.&lt;/p&gt;
&lt;p&gt;Here’s what we see instead:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The first time we encounter an Archmage in action, Callum, a beginner mage, manages to rescue Lucy from a GAR prison, right under the noses of multiple Archmages, without them ever detecting him.&lt;/li&gt;
&lt;li&gt;The second time, Callum successfully assassinates an Archmage.&lt;/li&gt;
&lt;li&gt;Most of the other times we see the Archmages, they’re merely complaining about how the GAR can’t catch Callum.&lt;/li&gt;
&lt;li&gt;In the first book, the GAR still seems somewhat competent, as they are always on Callum’s tail.&lt;/li&gt;
&lt;li&gt;However, in the second book, things change. We regularly hear the Archmages whining about the GAR’s inability to capture Callum, which only weakens the GAR’s image.&lt;/li&gt;
&lt;li&gt;Additionally, Callum manages to travel to the dragonlands without the GAR noticing. He also enters vampire territory undetected, only being noticed when he starts mining for rare minerals. Even then, despite chasing him across several countries, they lose him again.&lt;/li&gt;
&lt;li&gt;Callum then spends quite some time in Mexico and the U.S., where the GAR has no clue of his whereabouts.&lt;/li&gt;
&lt;li&gt;Lastly, Callum breaks the couple he saved from the fae out of a GAR facility and also rescues Lucy after she’s captured, further embarrassing the GAR.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;By the second book, as a reader, you no longer feel that the GAR or the Archmages are a real threat. In fact, you start questioning how they even maintain their monopoly on magic given how easy it is for Callum to evade them.&lt;/p&gt;
&lt;p&gt;Because the GAR and Archmages, the primary antagonists, no longer feel threatening, the underdog story we began with in the first book loses much of its weight. This also leads to a lack of tension, which brings me to my second point.&lt;/p&gt;
&lt;p&gt;Callum is simply too powerful. His teleportation abilities are nearly limitless—he can teleport over large distances multiple times and through walls. Thanks to his spirit sense, he essentially has a &amp;ldquo;wall hack&amp;rdquo; and always knows where his enemies are. How could he ever be captured? If anyone comes near him, he immediately senses their presence and can teleport away. This removes much of the tension and excitement from the story. After the first book, I never once asked, &lt;em&gt;How will Callum escape this predicament?&lt;/em&gt; because I already knew the answer: he’ll just teleport.&lt;/p&gt;
&lt;p&gt;This isn’t to say that having a powerful protagonist is inherently bad. &lt;em&gt;&lt;a href="https://www.webnovel.com/book/villain-retirement_20790482706020505"&gt;Villain Retirement&lt;/a&gt;&lt;/em&gt; is one of my favorite examples where the protagonist is incredibly strong, yet the story remains engaging. Another example is &lt;em&gt;&lt;a href="https://en.wikipedia.org/wiki/One-Punch_Man"&gt;One Punch Man&lt;/a&gt;&lt;/em&gt;. In both cases, the excitement doesn’t come from fearing for the protagonist’s life but from other sources of tension and interest.&lt;/p&gt;
&lt;p&gt;However, &lt;em&gt;Paranoid Mage&lt;/em&gt; seems like it&amp;rsquo;s trying to tell an underdog story, but the protagonist’s overwhelming strength makes it feel like the author subconsciously made him too powerful. This brings to mind &lt;em&gt;&lt;a href="https://faq.brandonsanderson.com/knowledge-base/what-are-sandersons-laws-of-magic/"&gt;Brandon Sanderson’s Second Law&lt;/a&gt;&lt;/em&gt;, which states, “Limits are more interesting than powers.” If there had been clearer limits to Callum’s abilities, the tension and stakes would have been more compelling.&lt;/p&gt;
&lt;p&gt;In fact, the first book of the series handled this balance well. It was Callum’s education and his unique way of thinking that helped him solve problems cleverly, rather than relying on pure strength. A good example of this is Superman. What makes Superman interesting isn’t just his powers, but also his limitations—his ethical code and his vulnerability to kryptonite. These weaknesses not only shape his character but also invite readers to ask, &lt;em&gt;If I were in his shoes, with these weaknesses, how would I escape this situation?&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;The inconsistency in Callum’s characterization is another major issue in &lt;em&gt;Paranoid Mage&lt;/em&gt;. Before his initial capture by the GRA, we don’t learn much about Callum&amp;rsquo;s life, aside from the fact that he has some connections—namely, his aunt Miss Mosley and a gym owner named Shahey. He seems to have a close relationship with his aunt and is familiar with Shahey. However, once Callum is captured and escapes to a small town, he doesn’t once stop to think about what he has left behind. Even during his stay in the town, he makes no effort to contact anyone from his hometown. He readily changes his identity and appearance without much concern.&lt;/p&gt;
&lt;p&gt;This raises questions about Callum’s emotional attachment to his past. There are a few possible explanations for his behavior:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Callum may not have had any significant emotional ties to his hometown or the people in it.&lt;/li&gt;
&lt;li&gt;He could be emotionally cold and self-centered, not caring much about personal connections.&lt;/li&gt;
&lt;li&gt;He might be deliberately pushing thoughts of his hometown away, distracting himself from them.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Each of these explanations feels lacking. If Callum truly had no emotional attachment to his hometown, perhaps due to social difficulties, this aspect of his character isn&amp;rsquo;t explored. In fact, his flirtation with Lucy suggests that he is socially adept, not disconnected. The second option, that Callum is emotionally distant and self-centered, seems the most likely. His later ruthless killings of the vampires and his general avoidance of socializing with the townsfolk support this interpretation. The third possibility, that he is repressing thoughts of home, especially regarding his aunt, also doesn’t get explored in the narrative, leaving a gap in his character development.&lt;/p&gt;
&lt;p&gt;It seems more likely that Callum is self-centered and emotionally detached from his hometown. One might argue that his initial actions, such as rescuing people from a fire in Chapter 1, contradict this, but even a self-centered person wouldn’t let others die if they could help. Additionally, his interactions with Lucy don’t necessarily indicate deep emotional connections—he may simply be seeking human contact after being isolated for days at a time. His conversations with Lucy are usually short and functional, with him primarily raising issues rather than fostering genuine emotional engagement.&lt;/p&gt;
&lt;p&gt;The inconsistency in Callum’s characterization becomes more apparent in several key situations. First, when he decides to free the couple he saved from the fae from the GRA. Saving them from the fae was in character, he saw them in immediate danger and acted. However, risking his life to free them from the GRA, which should be a highly secure facility, doesn’t fit his paranoid, calculating, and self-centered nature. He barely knows these people, and his paranoid tendencies should have made him suspect it was a trap. This action seems inconsistent unless the author intended to make Callum a hero archetype.&lt;/p&gt;
&lt;p&gt;If that were the case, however, the early characterization of Callum falls short. If he truly cares so much about protecting innocent people that he is willing to risk his life, why didn’t he ever contact anyone from his hometown, like his aunt? We never see him express this kind of concern for anyone besides Lucy.&lt;/p&gt;
&lt;p&gt;Lucy’s imprisonment and Callum’s subsequent decision to rescue her also feel out of character. He knows it’s a trap and that multiple archmages will be there, and yet he goes through with it for someone he only occasionally speaks with over the phone. Their flirtation never seemed to develop into a deep emotional connection that would justify risking his life for her. In fact, it seems improbable that Callum, who is portrayed as emotionally detached, would go to such lengths for someone he barely knows.&lt;/p&gt;
&lt;p&gt;Callum’s decision to take down the GRA is similarly perplexing. While he had grown suspicious of the GRA’s morality due to their actions, it didn’t seem like they had done enough to justify his decision to take down the entire organization. The GRA’s offenses included:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Vampires capturing people while the GRA did little to stop them.&lt;/li&gt;
&lt;li&gt;A GRA officer causing collateral damage and killing innocent people.&lt;/li&gt;
&lt;li&gt;The GRA using the couple he saved from the fae to lure him out.&lt;/li&gt;
&lt;li&gt;Lucy being brainwashed to capture him.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;While these events paint the GRA in a negative light, they don’t seem sufficient to justify a full-scale war against an organization he once feared. Furthermore, even though it becomes feasible in the story for Callum to take the GRA down, it shouldn’t be. He’s been a mage for only a few weeks and yet is somehow stronger than archmages who have trained for centuries, this strains believability.&lt;/p&gt;
&lt;p&gt;His decision to assassinate an archmage is equally puzzling. It is suggested to him, and he immediately agrees without much thought. He doesn’t pause to assess whether the archmage is truly as evil as he’s been led to believe. While he leaves himself the option to not follow through, he is basically set on carrying out the assassination from the start.&lt;/p&gt;
&lt;p&gt;The last issue I’d like to address ties into my earlier criticism of Callum being too strong and the GRA feeling incompetent. Beyond surviving and fleeing from the GRA, Callum doesn’t have a clear motivation or goal for much of the story. This lack of direction isn’t inherently a problem, but it only works if two conditions are met: first, the people chasing him need to be a genuine threat, and second, they need to be constantly on his tail. If either of these conditions is not fulfilled, the story risks becoming aimless and, boring.&lt;/p&gt;
&lt;p&gt;A compelling narrative requires that the protagonist’s actions relate to their goals, whether those actions advance or hinder progress. When we see Callum spending multiple chapters creating enchantment devices, it’s hard to see what impact this has on the story. Does it make him more likely to survive? Not really—because by that point, he’s already under no real threat from the GRA. They don’t even know where he is. This lack of urgency undermines the stakes of the story and makes Callum’s actions feel passive and disconnected from any larger arc.&lt;/p&gt;
&lt;p&gt;The author should have given Callum a secondary goal, perhaps a character arc tied to some deeper emotional conflict, like his struggles with being perceived as crazy during his childhood. This would have added layers to his character and created internal tension to complement the external threat. Alternatively, the threat of survival could have been made more immediate, which circles back to my earlier criticism of making Callum too powerful. The more invincible he becomes, the less tension there is in the story, and that drains excitement from the narrative.&lt;/p&gt;
&lt;p&gt;This issue is especially noticeable in the second book, which begins with Callum hiking in the mountains, completely safe. Then he meets a fae hunting party—no danger. Next, he ventures into dragon territory—again, no danger. He then travels to vampire land, and there’s still no danger. After that, he builds and sells a teleportation device. Throughout all of these events, Callum is never in any real danger, and he seems entirely passive, merely reacting to situations as they arise.&lt;/p&gt;
&lt;p&gt;Much of his time is spent saving others—saving Clara in the small town, saving the couple from the fae, saving them again from the GRA, and saving Lucy from the GRA. This repetitiveness, combined with his lack of real danger, makes the story feel stagnant. The passivity of the protagonist, coupled with the absence of any genuine threat, makes it hard to stay engaged.&lt;/p&gt;


&lt;figure&gt;
 &lt;img style="display: block; margin-left: auto; margin-right: auto; width:80%" src="https://monkemanx.github.io/attachments/many_books.png"&gt;
&lt;/figure&gt;


&lt;h2 id="what-would-i-change"&gt;What Would I Change?&lt;/h2&gt;
&lt;p&gt;I’ve already mentioned several decisions I didn’t like and how I’d change them roughly, but I’d like to hoan into the details.&lt;/p&gt;
&lt;h3 id="nerfing-callums-powers"&gt;Nerfing Callum’s Powers&lt;/h3&gt;
&lt;p&gt;The first major change I’d implement is significantly nerfing Callum’s powers. For instance, I’d limit him to one long-range teleport and only a few short-range teleports, forcing him to rely more on his unique background and non-mage education to solve problems, like he did when taking down the first vampire nest. It’s far more engaging to watch a mage with limited teleportation and a shotgun trying to outsmart enemies than one who can teleport across the globe and escape every situation without consequence.&lt;/p&gt;
&lt;h3 id="enhancing-book-1"&gt;Enhancing Book 1&lt;/h3&gt;
&lt;p&gt;I wouldn’t change much in the first book, but I would give Callum more selfish motivations for some of his actions. For example, when he saves Clara in the small town, I’d have him do it partly because the townsfolk believe he’s a powerful mage, and he wants to maintain that illusion for his own security. A brief inner dialogue could reflect his conflicting motivations—while he feels saving Clara is the right thing to do, his primary concern is self-preservation.&lt;/p&gt;
&lt;p&gt;Another key limitation for Callum is his knowledge—he’s a beginner mage with little magical understanding. After he leaves the small town, I felt it was too easy for him to acquire information by simply visiting random magic bookshops and asking around. To fix this, I’d make it much harder for him to get new knowledge, forcing him to complete dangerous missions or challenges in exchange for crucial information.&lt;/p&gt;
&lt;h3 id="extending-the-vampire-hits"&gt;Extending the Vampire Hits&lt;/h3&gt;
&lt;p&gt;I’d also adjust how the vampire hits play out. Instead of having Callum take down four vampire targets in a single night, I’d spread these hits out over several days, making each hit span multiple chapters. Each mission would be structured like a &amp;ldquo;Hitman&amp;rdquo; game, requiring Callum to devise clever, stealthy plans to eliminate his targets without being detected. After each successful mission, he’d gain a small piece of magical knowledge, gradually improving his abilities.&lt;/p&gt;
&lt;p&gt;Additionally, I’d reduce the immediate impact these hits have on the magical world. Rather than making them a major blow to the vampire-shifter conflict, I’d present them as a minor annoyance to the vampire boss, leaving room for the protagonist to grow in power. It’s unrealistic for a beginner mage to be such a huge threat to a vampire boss who is just one level below the archmages in hierarchy.&lt;/p&gt;
&lt;p&gt;Callum’s eventual capture and escape from the GRA are handled well, so I wouldn’t change much about that.&lt;/p&gt;
&lt;h3 id="overhauling-book-2"&gt;Overhauling Book 2&lt;/h3&gt;
&lt;p&gt;Book 2, however, would undergo major changes. I’d refocus the plot around Callum operating as a black operator assassin, taking jobs in exchange for magical knowledge. He wouldn’t accept every job, only those where the targets are genuinely evil, like vampires who kill innocent people for blood.&lt;/p&gt;
&lt;p&gt;The central theme would revolve around Callum’s moral descent, as he starts taking on shadier jobs in his pursuit of magical power. Each job would push him to compromise more and more, until he kills someone who is truly innocent. This event would serve as a turning point, making him realize the dark path he’s on. He would then vow to stop working as an assassin and instead join an anti-GRA faction, dedicated to helping the victims of the GRA.&lt;/p&gt;
&lt;p&gt;Lucy’s capture would still happen, but she wouldn’t be rescued immediately. Due to the nerfs in Callum’s powers, he would no longer be strong enough to rescue her without significant preparation. I’d also make the GRA much more brutal and aggressive in hunting him, perhaps having a direct confrontation where Callum can’t just teleport away.&lt;/p&gt;
&lt;p&gt;At some point, an archmage should make an appearance, this time portrayed as a truly terrifying force. Perhaps during the archmage’s confrontation with Callum, an entire town is destroyed, amplifying the stakes and further motivating Callum to take down the GRA.&lt;/p&gt;
&lt;h3 id="reworking-book-3"&gt;Reworking Book 3&lt;/h3&gt;
&lt;p&gt;Book 3 would then center around Callum, with the help of the anti-GRA faction, working to dismantle the GRA and rescue Lucy.&lt;/p&gt;
&lt;h2 id="conclusion"&gt;Conclusion&lt;/h2&gt;
&lt;p&gt;&lt;em&gt;Paranoid Mage&lt;/em&gt; started with a lot of promise, a cool setting, intriguing magic system, and a unique protagonist. However, it lost its way after the first book. Callum became too overpowered for any threat to feel meaningful, his characterization became inconsistent, and the story felt directionless. By nerfing Callum’s abilities, adding more depth to his motivations, and giving the plot a stronger sense of progression, the series could regain its initial potential and be more engaging.&lt;/p&gt;


&lt;figure&gt;
 &lt;img style="display: block; margin-left: auto; margin-right: auto; width:50%" src="https://monkemanx.github.io/attachments/anime_book.png"&gt;
&lt;/figure&gt;

</description></item><item><title>Server Upgrade or Documentation of my new Homelab</title><link>https://monkemanx.github.io/articles/homelab_upgrade/</link><pubDate>Sat, 05 Oct 2024 21:00:00 +0000</pubDate><author>monkeman@cock.li (MonkeMan)</author><guid>https://monkemanx.github.io/articles/homelab_upgrade/</guid><description>
 &lt;div class="toc"&gt;
 &lt;h2&gt;Table of Contents&lt;/h2&gt;
 &lt;nav id="TableOfContents"&gt;
 &lt;ul&gt;
 &lt;li&gt;&lt;a href="#0-changes"&gt;0. Changes&lt;/a&gt;&lt;/li&gt;
 &lt;li&gt;&lt;a href="#1-introduction"&gt;1. Introduction&lt;/a&gt;&lt;/li&gt;
 &lt;li&gt;&lt;a href="#2-the-hardware-requirements"&gt;2. The Hardware Requirements&lt;/a&gt;
 &lt;ul&gt;
 &lt;li&gt;&lt;a href="#21-storage-requirements"&gt;2.1 Storage Requirements&lt;/a&gt;&lt;/li&gt;
 &lt;li&gt;&lt;a href="#22-processor-requirements"&gt;2.2 Processor Requirements&lt;/a&gt;&lt;/li&gt;
 &lt;li&gt;&lt;a href="#23-computer-size"&gt;2.3 Computer Size&lt;/a&gt;&lt;/li&gt;
 &lt;li&gt;&lt;a href="#24-ram-requirements"&gt;2.4 RAM Requirements&lt;/a&gt;&lt;/li&gt;
 &lt;li&gt;&lt;a href="#25-short-interlude"&gt;2.5 Short Interlude&lt;/a&gt;&lt;/li&gt;
 &lt;/ul&gt;
 &lt;/li&gt;
 &lt;li&gt;&lt;a href="#3-dr-salesman-or-how-i-learned-to-stop-waiting-for-the-perfect-deal"&gt;3. Dr. Salesman or: How I Learned to Stop Waiting for the Perfect Deal&lt;/a&gt;&lt;/li&gt;
 &lt;li&gt;&lt;a href="#4-a-look-inside-the-machine"&gt;4. A look inside the Machine&lt;/a&gt;&lt;/li&gt;
 &lt;li&gt;&lt;a href="#5-my-storage-situtation"&gt;5. My Storage Situtation&lt;/a&gt;
 &lt;ul&gt;
 &lt;li&gt;&lt;a href="#51-what-is-raid"&gt;5.1 What is RAID?&lt;/a&gt;&lt;/li&gt;
 &lt;li&gt;&lt;a href="#52-the-magical-filesystem-zfs"&gt;5.2 The Magical Filesystem: ZFS&lt;/a&gt;&lt;/li&gt;
 &lt;li&gt;&lt;a href="#53-the-storage-plan"&gt;5.3 The Storage Plan&lt;/a&gt;&lt;/li&gt;
 &lt;/ul&gt;
 &lt;/li&gt;
 &lt;li&gt;&lt;a href="#6-the-server-operating-system-proxmox"&gt;6. The Server Operating System: Proxmox&lt;/a&gt;
 &lt;ul&gt;
 &lt;li&gt;&lt;a href="#61-proxmox-installation"&gt;6.1 Proxmox: Installation&lt;/a&gt;&lt;/li&gt;
 &lt;li&gt;&lt;a href="#62-proxmox-post-installation-steps"&gt;6.2 Proxmox: Post Installation Steps&lt;/a&gt;&lt;/li&gt;
 &lt;/ul&gt;
 &lt;/li&gt;
 &lt;li&gt;&lt;a href="#7-creating-our-data-vault-with-openmediavault-nas"&gt;7. Creating Our Data Vault with OpenMediaVault NAS&lt;/a&gt;
 &lt;ul&gt;
 &lt;li&gt;&lt;a href="#71-openmediavault-installation"&gt;7.1 Openmediavault: Installation&lt;/a&gt;&lt;/li&gt;
 &lt;li&gt;&lt;a href="#72-openmediavault-post-installation-steps"&gt;7.2 Openmediavault: Post-Installation Steps&lt;/a&gt;&lt;/li&gt;
 &lt;/ul&gt;
 &lt;/li&gt;
 &lt;li&gt;&lt;a href="#8-simplifying-your-urls-with-nginx-proxy-manager"&gt;8. Simplifying Your URLs with Nginx Proxy Manager&lt;/a&gt;
 &lt;ul&gt;
 &lt;li&gt;&lt;a href="#81-nginx-proxy-manager-installation"&gt;8.1 Nginx Proxy Manager: Installation&lt;/a&gt;&lt;/li&gt;
 &lt;/ul&gt;
 &lt;/li&gt;
 &lt;li&gt;&lt;a href="#9-vaultwarden-the-password-manager"&gt;9. Vaultwarden the Password Manager&lt;/a&gt;&lt;/li&gt;
 &lt;li&gt;&lt;a href="#10-news-aggregation-with-freshrss"&gt;10. News Aggregation with FreshRSS&lt;/a&gt;
 &lt;ul&gt;
 &lt;li&gt;&lt;a href="#101-installation-freshrss"&gt;10.1 Installation FreshRSS&lt;/a&gt;&lt;/li&gt;
 &lt;li&gt;&lt;a href="#102-third-party-clients"&gt;10.2 Third Party Clients&lt;/a&gt;&lt;/li&gt;
 &lt;/ul&gt;
 &lt;/li&gt;
 &lt;li&gt;&lt;a href="#11-managing-your-cooking-recipes-with-tandoor"&gt;11. Managing Your Cooking Recipes with Tandoor&lt;/a&gt;&lt;/li&gt;
 &lt;li&gt;&lt;a href="#12-service-dashboard-with-homarr"&gt;12. Service Dashboard with Homarr&lt;/a&gt;&lt;/li&gt;
 &lt;li&gt;&lt;a href="#13-torrenting-all-the-media-you-want-with-the-arr-stack"&gt;13. Torrenting All the Media You Want with the Arr-Stack&lt;/a&gt;
 &lt;ul&gt;
 &lt;li&gt;&lt;a href="#131-installation-torrenting-stack"&gt;13.1 Installation: Torrenting Stack&lt;/a&gt;&lt;/li&gt;
 &lt;li&gt;&lt;a href="#132-common-issues"&gt;13.2 Common Issues&lt;/a&gt;&lt;/li&gt;
 &lt;/ul&gt;
 &lt;/li&gt;
 &lt;li&gt;&lt;a href="#133-quality-control"&gt;13.3 Quality Control&lt;/a&gt;&lt;/li&gt;
 &lt;li&gt;&lt;a href="#14-netflix-like-media-managment-with-jellyfin"&gt;14. Netflix like Media-Managment with Jellyfin&lt;/a&gt;
 &lt;ul&gt;
 &lt;li&gt;&lt;a href="#141-jellyfin-installation"&gt;14.1 Jellyfin: Installation&lt;/a&gt;&lt;/li&gt;
 &lt;li&gt;&lt;a href="#142-jellyfin-final-note"&gt;14.2 Jellyfin: Final Note&lt;/a&gt;&lt;/li&gt;
 &lt;/ul&gt;
 &lt;/li&gt;
 &lt;li&gt;&lt;a href="#15-synchronize-files-across-multiple-devices-with-syncthing"&gt;15. Synchronize Files Across Multiple Devices with Syncthing&lt;/a&gt;
 &lt;ul&gt;
 &lt;li&gt;&lt;a href="#151-syncthing-installation"&gt;15.1 Syncthing: Installation&lt;/a&gt;&lt;/li&gt;
 &lt;/ul&gt;
 &lt;/li&gt;
 &lt;li&gt;&lt;a href="#16-document-management-with-paperless-ngx"&gt;16. Document Management with Paperless-NGX&lt;/a&gt;
 &lt;ul&gt;
 &lt;li&gt;&lt;a href="#161-paperless-ngx-installation"&gt;16.1 Paperless-Ngx: Installation&lt;/a&gt;&lt;/li&gt;
 &lt;/ul&gt;
 &lt;/li&gt;
 &lt;li&gt;&lt;a href="#17-accessing-our-services-from-outside-our-local-network-with-wg-easy"&gt;17. Accessing Our Services from Outside Our Local Network with WG-Easy&lt;/a&gt;
 &lt;ul&gt;
 &lt;li&gt;&lt;a href="#171-wg-easy-installation"&gt;17.1 Wg-easy: Installation&lt;/a&gt;&lt;/li&gt;
 &lt;/ul&gt;
 &lt;/li&gt;
 &lt;li&gt;&lt;a href="#18-book-managment-with-calibre-web-automated-and-audiobookshelvf"&gt;18. Book Managment with Calibre-Web Automated and Audiobookshelvf&lt;/a&gt;
 &lt;ul&gt;
 &lt;li&gt;&lt;a href="#181-calibre-web-automated-and-audiobookshelf-installation"&gt;18.1 Calibre-Web Automated and Audiobookshelf: Installation&lt;/a&gt;&lt;/li&gt;
 &lt;/ul&gt;
 &lt;/li&gt;
 &lt;li&gt;&lt;a href="#19-immich"&gt;19. Immich&lt;/a&gt;
 &lt;ul&gt;
 &lt;li&gt;&lt;a href="#191-immich-installation"&gt;19.1 Immich: Installation&lt;/a&gt;&lt;/li&gt;
 &lt;li&gt;&lt;a href="#1914-configuring-the-env-and-docker-compose-files"&gt;19.1.4 Configuring the &lt;code&gt;.env&lt;/code&gt; and Docker Compose Files&lt;/a&gt;&lt;/li&gt;
 &lt;/ul&gt;
 &lt;/li&gt;
 &lt;li&gt;&lt;a href="#20-backups"&gt;20. Backups&lt;/a&gt;
 &lt;ul&gt;
 &lt;li&gt;&lt;a href="#201-what-data-should-you-backup"&gt;20.1 What Data Should You Backup?&lt;/a&gt;&lt;/li&gt;
 &lt;li&gt;&lt;a href="#202-important-data-and-my-previous-backup-strategy"&gt;20.2 Important Data and My Previous Backup Strategy&lt;/a&gt;&lt;/li&gt;
 &lt;li&gt;&lt;a href="#203-my-backup-plan"&gt;20.3 My Backup Plan&lt;/a&gt;&lt;/li&gt;
 &lt;li&gt;&lt;a href="#204-the-alternative-plan"&gt;20.4 The Alternative Plan&lt;/a&gt;&lt;/li&gt;
 &lt;li&gt;&lt;a href="#205-backup-retention-strategy"&gt;20.5 Backup Retention Strategy&lt;/a&gt;&lt;/li&gt;
 &lt;li&gt;&lt;a href="#206-implementing-my-backup-strategy"&gt;20.6 Implementing My Backup Strategy&lt;/a&gt;&lt;/li&gt;
 &lt;/ul&gt;
 &lt;/li&gt;
 &lt;li&gt;&lt;a href="#21-server-power-optimization"&gt;21. Server Power Optimization&lt;/a&gt;
 &lt;ul&gt;
 &lt;li&gt;&lt;a href="#211-power-saving-optimizations"&gt;21.1 Power-Saving Optimizations&lt;/a&gt;&lt;/li&gt;
 &lt;li&gt;&lt;a href="#212-measuring-power-consumption"&gt;21.2 Measuring Power Consumption&lt;/a&gt;&lt;/li&gt;
 &lt;li&gt;&lt;a href="#213-scheduled-server-shutdowns"&gt;21.3 Scheduled Server Shutdowns&lt;/a&gt;&lt;/li&gt;
 &lt;li&gt;&lt;a href="#215-automatically-turning-your-server-back-on"&gt;21.5 Automatically Turning Your Server Back On&lt;/a&gt;&lt;/li&gt;
 &lt;/ul&gt;
 &lt;/li&gt;
 &lt;li&gt;&lt;a href="#22-notification-with-gotify"&gt;22. Notification with Gotify&lt;/a&gt;&lt;/li&gt;
 &lt;li&gt;&lt;a href="#23-the-end"&gt;23. The End&lt;/a&gt;&lt;/li&gt;
 &lt;/ul&gt;
&lt;/nav&gt;
 &lt;/div&gt;


&lt;h2 id="0-changes"&gt;0. Changes&lt;/h2&gt;
&lt;p&gt;List of Changes Made of This Article:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;15.10.24:&lt;/strong&gt; Fixed Typo.
&lt;strong&gt;23.01.25:&lt;/strong&gt; Added a Spacer to the Article.
&lt;strong&gt;23.05.25:&lt;/strong&gt; Added a new Section to Notification Managment.
&lt;strong&gt;28.05.25:&lt;/strong&gt; Added a small Section for Quality Control of Radarr.&lt;/p&gt;
&lt;h2 id="1-introduction"&gt;1. Introduction&lt;/h2&gt;
&lt;p&gt;For a while now I have been running a Homelab (:= A server that is running at home, often with low budget hardware, hosting several applications.) using a weak Raspberry 3b, originally I was using it to better &lt;a href="https://monkemanx.github.io/articles/my_homelab_part_0_prologue/"&gt;regulate my sleep schedule&lt;/a&gt; using HomeAssistant. But over time the motivation for running my Homelab changed, I wanted to experiment more, learn about various new technologies and more philosophical I wanted to be less dependented on centralized services &amp;ndash; Like, google drive for backups, netflix for entertainment, one drive for syncing devices and many more.&lt;/p&gt;
&lt;p&gt;And with this change of motivation my demand for my Homelab increased no longer did I want to run a single application, I wanted to run several applications all at once all containerized and virtualized, my two meager external hard drives dangling of my Rasperry Pi was not adequate anymore for my storage need, I wanted more drives and I wanted them in a
RAID setup for redudancy and with ZFS to prevent bit rot.
Sadly, my trusted Rasberry 3b was no longer powerfull enough to fullfill my needs, so it was time to upgarde my Homelab to something more powerfull.&lt;/p&gt;
&lt;p&gt;This post is a documentation of this upgrading undertaking, first going over the acquirement of the hardware of my homelab, then the proces of choosing a operating system, and finally through the different applications that I selfhosted with it and the different technologies they interface with.&lt;/p&gt;
&lt;p&gt;This post will probably rather long, because of the sheer amount of software I decided to selfhost, so grab a cup of coffee or tea and enjoy the reading (or not since this will be a bit dry, I&amp;rsquo;ll try to add some semi funny images).&lt;/p&gt;












&lt;figure style="display: block; margin: 0 auto; width: 50%; "&gt;
 &lt;img
 src="https://monkemanx.github.io/attachments/Love.jpg"
 loading="lazy"
 width=""
 height=""
 alt="Image"
 style="display: block; width: 100%; height: 100%; object-fit: contain; "
 &gt;
 
&lt;/figure&gt;

&lt;h2 id="2-the-hardware-requirements"&gt;2. The Hardware Requirements&lt;/h2&gt;
&lt;p&gt;Before I could think about what kind of server I wanted to buy, I first needed to know what my hardware requirements were and how important they were.
This allowed me to balance, my nice-to-have features with the cost of including them. Also, how could I waste hours looking for the perfect server, if I didn&amp;rsquo;t have a lengthy wishlist?&lt;/p&gt;
&lt;p&gt;I&amp;rsquo;ve already touched on some of my server requirements in the introduction. Now, I would like to explore them in more detail. Below is a list of factors, along with related question, that shaped my final requirements:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Size of the Computer: USFF, SFF, DT
&lt;ul&gt;
&lt;li&gt;How many disks fit into the case?&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Motherboard
&lt;ul&gt;
&lt;li&gt;How many SATA connectors do I need?&lt;/li&gt;
&lt;li&gt;Does it support ECC?&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Disks
&lt;ul&gt;
&lt;li&gt;What disk capacity do I want?&lt;/li&gt;
&lt;li&gt;Refurbished Disks vs New Disks?&lt;/li&gt;
&lt;li&gt;How many disks?&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Processor: Intel vs Amd
&lt;ul&gt;
&lt;li&gt;Does it support Quick Sync Video (QSV)?&lt;/li&gt;
&lt;li&gt;Which processor generation?&lt;/li&gt;
&lt;li&gt;How many cores do I want?&lt;/li&gt;
&lt;li&gt;What is it power usage?&lt;/li&gt;
&lt;li&gt;Does the processor include an onboard graphics card?&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;RAM
&lt;ul&gt;
&lt;li&gt;How much RAM?&lt;/li&gt;
&lt;li&gt;Do I need ECC?&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Power Usage&lt;/li&gt;
&lt;/ul&gt;
&lt;div style="margin-bottom: 70px;"&gt;&lt;/div&gt;

&lt;h3 id="21-storage-requirements"&gt;2.1 Storage Requirements&lt;/h3&gt;
&lt;p&gt;Using the server as a &lt;a href="https://en.wikipedia.org/wiki/Network-attached_storage"&gt;NAS&lt;/a&gt; and as a media center for streaming movies and TV shows to all my devices were two key factors that prompted me to upgrade my Homelab. With the NAS demanding significant storage capacity and the media center needing a more powerful processor than the one I currently had.
As such I will analyze the requirements of these two functionalities first.&lt;/p&gt;












&lt;figure style="display: block; margin: 0 auto; width: 50%; "&gt;
 &lt;img
 src="https://monkemanx.github.io/attachments/it_server.jpg"
 loading="lazy"
 width=""
 height=""
 alt="Image"
 style="display: block; width: 100%; height: 100%; object-fit: contain; "
 &gt;
 
&lt;/figure&gt;

&lt;p&gt;First of for the NAS, since I want to use my homelab as a media server for movies, tv-shows, music and photos, the most important aspect to consider for the NAS aspect of my server are the storage requirements.
The biggest bulk of required storage will come from my media server, specfically movies and tv-shows. The size of tv-shows is really hard to compare from series to series, they have different amount of seasons, different amount of episodes per season, different length per episode.
Movies on the other side, are a lot more handy, they all have roughtly the same length, making the average file size of a movie fairly repsresentetive.
Allowing me to estimate my required storage needs, by estimating the average file size of movie first and the extrapolate from there.&lt;/p&gt;
&lt;p&gt;So I created a table of various popular movies and their file size, by picking some well known movies and search for them on Piratebay, which reports for each torrent various statistics about it such as: used encoding, resolution, Video-Bitrate and many more. You can see the table below:&lt;/p&gt;



 



&lt;table class="movie_data"&gt;
	&lt;thead&gt;
			&lt;tr&gt;
					&lt;th&gt;Movie Name&lt;/th&gt;
					&lt;th&gt;Release Year&lt;/th&gt;
					&lt;th&gt;Movie Length&lt;/th&gt;
					&lt;th&gt;Encoding&lt;/th&gt;
					&lt;th&gt;Resolution&lt;/th&gt;
					&lt;th&gt;File Size(GB)&lt;/th&gt;
			&lt;/tr&gt;
	&lt;/thead&gt;
	&lt;tbody&gt;
			&lt;tr&gt;
					&lt;td&gt;Interstellar&lt;/td&gt;
					&lt;td&gt;2014&lt;/td&gt;
					&lt;td&gt;2h49m&lt;/td&gt;
					&lt;td&gt;x264&lt;/td&gt;
					&lt;td&gt;1080p&lt;/td&gt;
					&lt;td&gt;2.20&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;Interstellar&lt;/td&gt;
					&lt;td&gt;2014&lt;/td&gt;
					&lt;td&gt;2h49m&lt;/td&gt;
					&lt;td&gt;x264&lt;/td&gt;
					&lt;td&gt;4K&lt;/td&gt;
					&lt;td&gt;14.80&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;Interstellar&lt;/td&gt;
					&lt;td&gt;2014&lt;/td&gt;
					&lt;td&gt;2h49m&lt;/td&gt;
					&lt;td&gt;remux&lt;/td&gt;
					&lt;td&gt;4K&lt;/td&gt;
					&lt;td&gt;42.71&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;Pulp Fiction&lt;/td&gt;
					&lt;td&gt;1994&lt;/td&gt;
					&lt;td&gt;2h34m&lt;/td&gt;
					&lt;td&gt;x264&lt;/td&gt;
					&lt;td&gt;1080p&lt;/td&gt;
					&lt;td&gt;1.40&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;The Silence of the Lambs&lt;/td&gt;
					&lt;td&gt;1991&lt;/td&gt;
					&lt;td&gt;1h58m&lt;/td&gt;
					&lt;td&gt;x264&lt;/td&gt;
					&lt;td&gt;1080p&lt;/td&gt;
					&lt;td&gt;1.50&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;The Silence of the Lambs&lt;/td&gt;
					&lt;td&gt;1991&lt;/td&gt;
					&lt;td&gt;1h58m&lt;/td&gt;
					&lt;td&gt;remux&lt;/td&gt;
					&lt;td&gt;1080p&lt;/td&gt;
					&lt;td&gt;31.45&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;Spirited Away&lt;/td&gt;
					&lt;td&gt;2001&lt;/td&gt;
					&lt;td&gt;2h4m&lt;/td&gt;
					&lt;td&gt;x265&lt;/td&gt;
					&lt;td&gt;1080p&lt;/td&gt;
					&lt;td&gt;7.99&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;The Departed&lt;/td&gt;
					&lt;td&gt;2006&lt;/td&gt;
					&lt;td&gt;2h31m&lt;/td&gt;
					&lt;td&gt;x264&lt;/td&gt;
					&lt;td&gt;1080p&lt;/td&gt;
					&lt;td&gt;2.00&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;All Quiet on the Western Front&lt;/td&gt;
					&lt;td&gt;2022&lt;/td&gt;
					&lt;td&gt;2h28m&lt;/td&gt;
					&lt;td&gt;x264&lt;/td&gt;
					&lt;td&gt;1080p&lt;/td&gt;
					&lt;td&gt;5.29&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;Ad Astra&lt;/td&gt;
					&lt;td&gt;2019&lt;/td&gt;
					&lt;td&gt;2h3m&lt;/td&gt;
					&lt;td&gt;x264&lt;/td&gt;
					&lt;td&gt;1080p&lt;/td&gt;
					&lt;td&gt;5.99&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;Ad Astra&lt;/td&gt;
					&lt;td&gt;2019&lt;/td&gt;
					&lt;td&gt;2h3m&lt;/td&gt;
					&lt;td&gt;x265&lt;/td&gt;
					&lt;td&gt;4K&lt;/td&gt;
					&lt;td&gt;11.37&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;Jojo Rabbit&lt;/td&gt;
					&lt;td&gt;2019&lt;/td&gt;
					&lt;td&gt;1h48m&lt;/td&gt;
					&lt;td&gt;x264&lt;/td&gt;
					&lt;td&gt;1080p&lt;/td&gt;
					&lt;td&gt;1.93&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;Jojo Rabbit&lt;/td&gt;
					&lt;td&gt;2019&lt;/td&gt;
					&lt;td&gt;1h48m&lt;/td&gt;
					&lt;td&gt;x265&lt;/td&gt;
					&lt;td&gt;4K&lt;/td&gt;
					&lt;td&gt;6.79&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;Jojo Rabbit&lt;/td&gt;
					&lt;td&gt;2019&lt;/td&gt;
					&lt;td&gt;1h48m&lt;/td&gt;
					&lt;td&gt;remux&lt;/td&gt;
					&lt;td&gt;4K&lt;/td&gt;
					&lt;td&gt;48.5&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;Blade Runner 2049&lt;/td&gt;
					&lt;td&gt;2017&lt;/td&gt;
					&lt;td&gt;2h44m&lt;/td&gt;
					&lt;td&gt;x264&lt;/td&gt;
					&lt;td&gt;1080p&lt;/td&gt;
					&lt;td&gt;3.14&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;Blade Runner 2049&lt;/td&gt;
					&lt;td&gt;2017&lt;/td&gt;
					&lt;td&gt;2h44m&lt;/td&gt;
					&lt;td&gt;x265&lt;/td&gt;
					&lt;td&gt;4K&lt;/td&gt;
					&lt;td&gt;19.2&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;Blade Runner 2049&lt;/td&gt;
					&lt;td&gt;2017&lt;/td&gt;
					&lt;td&gt;2h44m&lt;/td&gt;
					&lt;td&gt;remux&lt;/td&gt;
					&lt;td&gt;4K&lt;/td&gt;
					&lt;td&gt;77.97&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;Ex Machina&lt;/td&gt;
					&lt;td&gt;2015&lt;/td&gt;
					&lt;td&gt;1h48m&lt;/td&gt;
					&lt;td&gt;x265&lt;/td&gt;
					&lt;td&gt;1080p&lt;/td&gt;
					&lt;td&gt;1.63&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;Ex Machina&lt;/td&gt;
					&lt;td&gt;2015&lt;/td&gt;
					&lt;td&gt;1h48m&lt;/td&gt;
					&lt;td&gt;x265&lt;/td&gt;
					&lt;td&gt;4K&lt;/td&gt;
					&lt;td&gt;22.13&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;The Big Short&lt;/td&gt;
					&lt;td&gt;2015&lt;/td&gt;
					&lt;td&gt;2h10m&lt;/td&gt;
					&lt;td&gt;x264&lt;/td&gt;
					&lt;td&gt;1080p&lt;/td&gt;
					&lt;td&gt;3.28&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;The Big Short&lt;/td&gt;
					&lt;td&gt;2015&lt;/td&gt;
					&lt;td&gt;2h10m&lt;/td&gt;
					&lt;td&gt;x264&lt;/td&gt;
					&lt;td&gt;1080p&lt;/td&gt;
					&lt;td&gt;3.28&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;Inception&lt;/td&gt;
					&lt;td&gt;2010&lt;/td&gt;
					&lt;td&gt;2h28m&lt;/td&gt;
					&lt;td&gt;x265&lt;/td&gt;
					&lt;td&gt;1080p&lt;/td&gt;
					&lt;td&gt;2.87&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;Inception&lt;/td&gt;
					&lt;td&gt;2010&lt;/td&gt;
					&lt;td&gt;2h28m&lt;/td&gt;
					&lt;td&gt;x265&lt;/td&gt;
					&lt;td&gt;4K&lt;/td&gt;
					&lt;td&gt;8.91&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;The Dark Knight&lt;/td&gt;
					&lt;td&gt;2008&lt;/td&gt;
					&lt;td&gt;2h32m&lt;/td&gt;
					&lt;td&gt;x265&lt;/td&gt;
					&lt;td&gt;1080p&lt;/td&gt;
					&lt;td&gt;1.87&lt;/td&gt;
			&lt;/tr&gt;
	&lt;/tbody&gt;
&lt;/table&gt;


 &lt;p class="source"&gt;Source: Piratebay, August. 2024&lt;/p&gt;


&lt;p&gt;You can skip the following boring python code section, which calculates the average movie file size, by collapsing the section and continuing reading from afterwards it:&lt;/p&gt;
&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details open&gt;
 &lt;summary&gt;Calculating the Average Movie Length&lt;/summary&gt;
 
 &lt;style&gt;
 .info {
 background-color: #e6f7ff; 
 padding: 15px; 
 border-radius: 5px; 
 margin-bottom: 15px; 
 }

 .info-title {
 font-size: 20px; 
 margin-bottom: 10px; 
 color: #000080; 
 font-weight: bold; 
 }
&lt;/style&gt;
&lt;div class="info"&gt;
 &lt;div class="info-title"&gt;Info&lt;/div&gt;
 &lt;p&gt;For the subsequent calulcations it is important to note, that they are only rough estimates. For example we can have two times the same movie which both use the same encoding, but drastically different file size based on the quality preset choosen when the movie was encoded.
Another example, I have seen a fair number of movies with the same resolution where they differ in encoding one using &lt;code&gt;x264&lt;/code&gt; and the other one &lt;code&gt;x265&lt;/code&gt; and even though &lt;code&gt;x265&lt;/code&gt; is supposed the more efficient one, the file with the &lt;code&gt;x264&lt;/code&gt; encoding ends up having a smaller file size (this too is the fault of the set quality preset when encoding).&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;I could have used an calculator to quickly crunch the numbers, but because I like doing it harder than it already is; I used python in combination with pandas, a data anlaysis libary.&lt;/p&gt;
&lt;p&gt;The first thing we do is importing the pandas libary and/cap importing our data into python:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-python" data-lang="python"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;1&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="nn"&gt;pandas&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="nn"&gt;pd&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;2&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;df&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;pd&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;read_csv&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;movies.txt&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;sep&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;|&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;3&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;df&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;head&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Which will return in the following output:&lt;/p&gt;
&lt;figure style="display: block; margin: 0 auto; width: 100%; "&gt;
 &lt;img
 src="https://monkemanx.github.io/attachments/homelab_jupyter_1.jpg"
 loading="lazy"
 width=""
 height=""
 alt="Image"
 style="display: block; width: 100%; height: 100%; object-fit: contain; "
 &gt;
&lt;/figure&gt;
&lt;p&gt;As you can see, there are multiple issues: for one we have two weird columns titld &lt;code&gt;unamed: 0&lt;/code&gt; and &lt;code&gt;unamed 7&lt;/code&gt; and second our first row is also weird, we should remove both.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-python" data-lang="python"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;1&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;df&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;df&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;dropna&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;how&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;all&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;axis&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;columns&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="c1"&gt;# drops the columns&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;2&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;df&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;df&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;drop&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="c1"&gt;# drops the first column&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;3&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;df&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;head&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Which will result in the following output:&lt;/p&gt;
&lt;figure style="display: block; margin: 0 auto; width: 70%; "&gt;
 &lt;img
 src="https://monkemanx.github.io/attachments/homelab_jupyter_2.jpg"
 loading="lazy"
 width=""
 height=""
 alt="Image"
 style="display: block; width: 100%; height: 100%; object-fit: contain; "
 &gt;
&lt;/figure&gt;
&lt;p&gt;There are still one issue persisting, we have whitespaces in the column names and in the data fields, you can see that through the following command:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-python" data-lang="python"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;1&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;df&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;columns&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Which will return the following:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-python" data-lang="python"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;1&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;Index&lt;/span&gt;&lt;span class="p"&gt;([&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39; Movie Name &amp;#39;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39; Year &amp;#39;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39; Movie Length &amp;#39;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;2&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="s1"&gt;&amp;#39; Encoding &amp;#39;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39; Resolution &amp;#39;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39; File Size(GB) &amp;#39;&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;3&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;dtype&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;object&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;In order to remove the white-spaces we can do the following:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-python" data-lang="python"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;1&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;df&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;df&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;rename&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;columns&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="k"&gt;lambda&lt;/span&gt; &lt;span class="n"&gt;x&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;strip&lt;/span&gt;&lt;span class="p"&gt;())&lt;/span&gt; &lt;span class="c1"&gt;# strips whitespaces from the columns&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;2&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;df&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;df&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;apply&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;lambda&lt;/span&gt; &lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;str&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;strip&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;dtype&lt;/span&gt;&lt;span class="o"&gt;==&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;object&amp;#34;&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="c1"&gt;# Remove white spaces in the dataframes&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;We have one last problem, when we execute:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-python" data-lang="python"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;1&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;df&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;info&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;We get:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-python" data-lang="python"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 1&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="err"&gt;&amp;#39;&lt;/span&gt;&lt;span class="nc"&gt;pandas&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;core&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;frame&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;DataFrame&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 2&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;RangeIndex&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;24&lt;/span&gt; &lt;span class="n"&gt;entries&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt; &lt;span class="n"&gt;to&lt;/span&gt; &lt;span class="mi"&gt;24&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 3&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;Data&lt;/span&gt; &lt;span class="n"&gt;columns&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;total&lt;/span&gt; &lt;span class="mi"&gt;6&lt;/span&gt; &lt;span class="n"&gt;columns&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 4&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="c1"&gt;# Column Non-Null Count Dtype&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 5&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="o"&gt;---&lt;/span&gt; &lt;span class="o"&gt;------&lt;/span&gt; &lt;span class="o"&gt;--------------&lt;/span&gt; &lt;span class="o"&gt;-----&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 6&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="mi"&gt;0&lt;/span&gt; &lt;span class="n"&gt;Movie&lt;/span&gt; &lt;span class="n"&gt;Name&lt;/span&gt; &lt;span class="mi"&gt;24&lt;/span&gt; &lt;span class="n"&gt;non&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;null&lt;/span&gt; &lt;span class="nb"&gt;object&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 7&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="mi"&gt;1&lt;/span&gt; &lt;span class="n"&gt;Year&lt;/span&gt; &lt;span class="mi"&gt;24&lt;/span&gt; &lt;span class="n"&gt;non&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;null&lt;/span&gt; &lt;span class="nb"&gt;object&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 8&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="mi"&gt;2&lt;/span&gt; &lt;span class="n"&gt;Movie&lt;/span&gt; &lt;span class="n"&gt;Length&lt;/span&gt; &lt;span class="mi"&gt;24&lt;/span&gt; &lt;span class="n"&gt;non&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;null&lt;/span&gt; &lt;span class="nb"&gt;object&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 9&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="mi"&gt;3&lt;/span&gt; &lt;span class="n"&gt;Encoding&lt;/span&gt; &lt;span class="mi"&gt;24&lt;/span&gt; &lt;span class="n"&gt;non&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;null&lt;/span&gt; &lt;span class="nb"&gt;object&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;10&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="mi"&gt;4&lt;/span&gt; &lt;span class="n"&gt;Resolution&lt;/span&gt; &lt;span class="mi"&gt;24&lt;/span&gt; &lt;span class="n"&gt;non&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;null&lt;/span&gt; &lt;span class="nb"&gt;object&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;11&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="mi"&gt;5&lt;/span&gt; &lt;span class="n"&gt;File&lt;/span&gt; &lt;span class="n"&gt;Size&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;GB&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="mi"&gt;24&lt;/span&gt; &lt;span class="n"&gt;non&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;null&lt;/span&gt; &lt;span class="nb"&gt;object&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;12&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;dtypes&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;object&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;6&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;13&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;memory&lt;/span&gt; &lt;span class="n"&gt;usage&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mf"&gt;1.3&lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="n"&gt;KB&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;As we can see the the column &lt;code&gt;File Size(GB)&lt;/code&gt; is from type &lt;code&gt;object&lt;/code&gt;, with which we can&amp;rsquo;t calculate, so we need to transform it into the &lt;code&gt;float&lt;/code&gt; dtype:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-python" data-lang="python"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;1&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;df&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;File Size(GB)&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;pd&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;to_numeric&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;df&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;File Size(GB)&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Finally, we can calculate the average file size:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-python" data-lang="python"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;1&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="nb"&gt;round&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;df&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;loc&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;df&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;Resolution&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="s2"&gt;&amp;#34;1080p&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;][&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;File Size(GB)&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;mean&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;2&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="nb"&gt;round&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;df&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;loc&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;df&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;Resolution&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="s2"&gt;&amp;#34;4K&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;][&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;File Size(GB)&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;mean&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;3&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="nb"&gt;round&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;df&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;loc&lt;/span&gt;&lt;span class="p"&gt;[(&lt;/span&gt;&lt;span class="n"&gt;df&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;Resolution&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="s2"&gt;&amp;#34;4K&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;df&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;Encoding&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="s2"&gt;&amp;#34;remux&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;)][&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;File Size(GB)&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;mean&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;4&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="nb"&gt;round&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;df&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;loc&lt;/span&gt;&lt;span class="p"&gt;[(&lt;/span&gt;&lt;span class="n"&gt;df&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;Resolution&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="s2"&gt;&amp;#34;4K&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;df&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;Encoding&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;!=&lt;/span&gt; &lt;span class="s2"&gt;&amp;#34;remux&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;)][&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;File Size(GB)&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;mean&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Which gives us the following result:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-fallback" data-lang="fallback"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;1&lt;/span&gt;&lt;span class="cl"&gt;5.05
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;2&lt;/span&gt;&lt;span class="cl"&gt;28.04
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;3&lt;/span&gt;&lt;span class="cl"&gt;26.39
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;4&lt;/span&gt;&lt;span class="cl"&gt;13.87
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
 
&lt;/details&gt;


&lt;style&gt;
 .info {
 background-color: #e6f7ff; 
 padding: 15px; 
 border-radius: 5px; 
 margin-bottom: 15px; 
 }

 .info-title {
 font-size: 20px; 
 margin-bottom: 10px; 
 color: #000080; 
 font-weight: bold; 
 }
&lt;/style&gt;

&lt;div class="info"&gt;
 &lt;div class="info-title"&gt;Info&lt;/div&gt;
 &lt;p&gt;&lt;strong&gt;Remux:&lt;/strong&gt; The data was copied without being changed e.g. from the Blueray. It is most often the highest quality, the media can be.&lt;/p&gt;
&lt;/div&gt;

&lt;p&gt;With the previous calculation we get the following table:&lt;/p&gt;



 



&lt;table class="movie_avg"&gt;
	&lt;thead&gt;
			&lt;tr&gt;
					&lt;th&gt;&lt;/th&gt;
					&lt;th&gt;Avg. File Size(GB)&lt;/th&gt;
			&lt;/tr&gt;
	&lt;/thead&gt;
	&lt;tbody&gt;
			&lt;tr&gt;
					&lt;td&gt;1080p&lt;/td&gt;
					&lt;td&gt;5.05&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;4K&lt;/td&gt;
					&lt;td&gt;28.04&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;4K &amp;amp; remux&lt;/td&gt;
					&lt;td&gt;26.39&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;4K &amp;amp; non remux&lt;/td&gt;
					&lt;td&gt;13.87&lt;/td&gt;
			&lt;/tr&gt;
	&lt;/tbody&gt;
&lt;/table&gt;



&lt;p&gt;As we can see, the size increase from higher resolution movies is substantial, which makes sense since 4K contains &lt;code&gt;4&lt;/code&gt; times more pixels than 1080p. Although I haven&amp;rsquo;t personally measured it, with reasonable quality presets, we can expect &lt;code&gt;x265&lt;/code&gt; encoding to save up to &lt;a href="https://cloudinary.com/guides/video-formats/decoding-the-future-x264-vs-x265"&gt;50%&lt;/a&gt; bitrate compared to &lt;code&gt;x264&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Assuming my estimates are accurate, this means we can store roughly 198 movies in 1080p or about 35 movies in 4K per terabyte of disk space. Since I currently don&amp;rsquo;t have any 4K-capable devices, I’ll go with the 1080p estimate.&lt;/p&gt;
&lt;p&gt;With that in mind, 1TB should be sufficient for my movie media needs. However, it’s important to remember that movies aren&amp;rsquo;t the only data I plan to store on the server. Additionally, we want to leave room for future expansion should my storage needs increase significantly. What this estimate gives me is a rough idea of the storage I need—not 1000TB or even 100TB, but more likely around 10TB.&lt;/p&gt;












&lt;figure style="display: block; margin: 0 auto; width: 50%; "&gt;
 &lt;img
 src="https://monkemanx.github.io/attachments/Titanic.jpg"
 loading="lazy"
 width=""
 height=""
 alt="Image"
 style="display: block; width: 100%; height: 100%; object-fit: contain; "
 &gt;
 
&lt;/figure&gt;

&lt;h3 id="22-processor-requirements"&gt;2.2 Processor Requirements&lt;/h3&gt;
&lt;p&gt;For my processor, there were three important aspects that I needed to consider:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Number of Cores&lt;/strong&gt;: Since the processor would run in a server environment, more cores would help with concurrency.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Power Usage&lt;/strong&gt;: Power costs where I live in Germany are rather expensive, so I wanted to minimize them as much as possible.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Integrated Graphics Card&lt;/strong&gt;: This would help when streaming movies and TV shows from my server to a client.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Price&lt;/strong&gt;: How expensive the processor is.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;I quickly decided that the processor should be from Intel. Intel processors are great for media streaming due to &lt;a href="https://en.wikipedia.org/wiki/Intel_Quick_Sync_Video"&gt;Quick Sync Video (QSV)&lt;/a&gt;, Intel&amp;rsquo;s video encoding and decoding engine, which excels at handling video formats like movies. Another reason is that Intel processors come with integrated graphics cards, which QSV uses for the encoding/decoding process. Additionally, Intel’s i3 and i5 processors, particularly from the later generations, are very power efficient—perhaps not as efficient as ARM processors, but still quite close.&lt;/p&gt;
&lt;p&gt;It was also fairly easy to decide on which generation of CPU I wanted. Anything beyond the 13th generation was a no-go due to &lt;a href="https://www.xda-developers.com/intel-13th-gen-14th-gen-crashes/"&gt;instability issues&lt;/a&gt; with the newer models. Anything older than the 5th generation was out of the question because they don’t support QSV. The 9th generation was ideal, as it was the first to support HVEC codecs, making any generation beyond that a solid choice.&lt;/p&gt;
&lt;p&gt;An added benefit of processors from the 8th generation onwards is that the default number of cores increased from 4 to 6, which improves performance a lot for multi task workloads. The 9th generation processors use the UHD 630 as their integrated graphics chip, with the next major performance jump arriving in the 11th generation. For more details on codec support for Intel CPUs, you can refer to the &lt;a href="https://www.intel.com/content/www/us/en/docs/onevpl/developer-reference-media-intel-hardware/1-1/overview.html#ENCODE-OVERVIEW-9TH"&gt;Media Capabilities Supported by Intel Hardware List&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Finally, within the Intel Core series, the i9 and i7 models were too expensive, both in terms of price and power usage, leaving me with the option of either an i3, which is more efficient but less performant, or an i5, which consumes more power but offers better performance.&lt;/p&gt;
&lt;p&gt;To recap, I am looking for an Intel i3 or i5 processor, preferably from the 9th generation, with the 11th generation as an even better option.&lt;/p&gt;
&lt;h3 id="23-computer-size"&gt;2.3 Computer Size&lt;/h3&gt;
&lt;p&gt;A quick note on the size of the computer: I wanted a server that had enough space for my disks but was still compact enough to fit comfortably in the corner of a room. Because of this, I primarily focused on small form factor (SFF) computer cases.&lt;/p&gt;












&lt;figure style="display: block; margin: 0 auto; width: 50%; "&gt;
 &lt;img
 src="https://monkemanx.github.io/attachments/desktop_size.jpg"
 loading="lazy"
 width=""
 height=""
 alt="Image"
 style="display: block; width: 100%; height: 100%; object-fit: contain; "
 &gt;
 
&lt;/figure&gt;

&lt;h3 id="24-ram-requirements"&gt;2.4 RAM Requirements&lt;/h3&gt;
&lt;p&gt;Regarding RAM, there isn’t much to say—you only need as much memory as you actually use (unless you&amp;rsquo;re doing something extreme like using &lt;a href="https://www.truenas.com/docs/references/zfsdeduplication/"&gt;ZFS Deduplication&lt;/a&gt;). I&amp;rsquo;ll start with a modest amount and buy more when needed. Scalability isn’t a big concern, as most modern motherboards have four slots for RAM sticks.&lt;/p&gt;
&lt;p&gt;One thing worth mentioning is that having &lt;a href="https://www.truenas.com/docs/references/zfsdeduplication/"&gt;ECC RAM&lt;/a&gt; would be nice, but it’s not essential, especially for a small home setup like mine and it is rather expensive.&lt;/p&gt;
&lt;h3 id="25-short-interlude"&gt;2.5 Short Interlude&lt;/h3&gt;
&lt;p&gt;From the decisions I’ve made so far, you’ve probably noticed that this server sounds more like a consumer desktop computer than a sleek, rack-mounted server. And that’s true, but in my defense, &amp;ldquo;real&amp;rdquo; servers are both expensive and power-hungry. Compared to my previous server (a Raspberry Pi 3b), this is already a significant upgrade.&lt;/p&gt;












&lt;figure style="display: block; margin: 0 auto; width: 60%; "&gt;
 &lt;img
 src="https://monkemanx.github.io/attachments/server_meme.webp"
 loading="lazy"
 width=""
 height=""
 alt="Image"
 style="display: block; width: 100%; height: 100%; object-fit: contain; "
 &gt;
 
&lt;/figure&gt;

&lt;h2 id="3-dr-salesman-or-how-i-learned-to-stop-waiting-for-the-perfect-deal"&gt;3. Dr. Salesman or: How I Learned to Stop Waiting for the Perfect Deal&lt;/h2&gt;
&lt;p&gt;Now that we&amp;rsquo;ve gone through the server requirements, it was time to actually make the purchase. The first option I considered was buying all the parts separately and building it myself. However, after using &lt;a href="https://pcpartpicker.com/"&gt;pcpartpicker&lt;/a&gt;, I arrived at a total cost of around 600€, which was more than I wanted to spend. I could have bought the parts used and individually, which would have saved me a lot of money, but it also carried the risk of purchasing faulty components or exceeding my budget if I didn&amp;rsquo;t track the expenses closely.&lt;/p&gt;
&lt;p&gt;So, I went with my second option: shopping for used office computers that met my specifications. Initially, I tried several random websites, but I eventually shifted my focus entirely to &lt;a href="https://www.ebay.com/"&gt;eBay&lt;/a&gt;, where I spent about two weeks checking deals every day before finding something that worked for me. There are certain manufacturers and product lines that work well as servers, such as:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Fujitsu Thin Clients&lt;/li&gt;
&lt;li&gt;Dell Wyse&lt;/li&gt;
&lt;li&gt;Dell Optiplex&lt;/li&gt;
&lt;li&gt;HP ProDesk&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Just keep in mind that different versions of these machines exist, and some are better suited than others. I&amp;rsquo;d recommend monitoring eBay for a while to get a feel for the prices, and when you see a good deal, go for it.&lt;/p&gt;
&lt;p&gt;The only components I bought separately were the hard disks and, later, additional RAM when I needed it. For disks, many people recommend &lt;a href="https://serverpartdeals.com/collections/manufacturer-recertified-drives"&gt;Server Part Deals&lt;/a&gt;, but using &lt;a href="https://diskprices.com/"&gt;DiskPrices&lt;/a&gt;, I ended up purchasing my drives from Amazon.&lt;/p&gt;
&lt;p&gt;Here’s a breakdown of my final costs:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;HP ProDesk 600 G5 (16GB RAM, i5-9500, 250GB SSD): 180€&lt;/li&gt;
&lt;li&gt;Kingston Fury Beast DDR4 2x32GB RAM: 120€&lt;/li&gt;
&lt;li&gt;1x Intenso SSD 256GB: 20€&lt;/li&gt;
&lt;li&gt;2x Seagate Enterprise v6 10TB ST10000NM0046: 220€&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Total&lt;/strong&gt;: 540€&lt;/p&gt;
&lt;p&gt;It turned out to be a bit more expensive than I initially expected, mostly because I underestimated the cost of RAM and hard disks.&lt;/p&gt;












&lt;figure style="display: block; margin: 0 auto; width: 50%; "&gt;
 &lt;img
 src="https://monkemanx.github.io/attachments/naked.jpg"
 loading="lazy"
 width=""
 height=""
 alt="Image"
 style="display: block; width: 100%; height: 100%; object-fit: contain; "
 &gt;
 
&lt;/figure&gt;

&lt;h2 id="4-a-look-inside-the-machine"&gt;4. A look inside the Machine&lt;/h2&gt;
&lt;p&gt;I thought I had taken a photo when the machine first arrived, but I didn’t, so here’s how the computer is currently set up. On top of the computer are two hard disks that I use for regular backups. You can’t really see them in the photo, but just because they’re not visible doesn’t mean they’re not there!&lt;/p&gt;












&lt;figure style="display: block; margin: 0 auto; width: 50%; "&gt;
 &lt;img
 src="https://monkemanx.github.io/attachments/server_imgs/IMG_20240927_204550120.jpg"
 loading="lazy"
 width=""
 height=""
 alt="Image"
 style="display: block; width: 100%; height: 100%; object-fit: contain; "
 &gt;
 
&lt;/figure&gt;

&lt;p&gt;Below you can see how I installed the disks into the machine. The ProDesk 600 G5 has exactly four SATA connectors, which is just enough for the disks I needed. I had to get a bit creative with the mounting spots -— Yes, I did use duct tape to mount them.&lt;/p&gt;


&lt;figure style="display: flex; justify-content: center;" height="235px"&gt;
 &lt;img loading="lazy" style="width: 50%;" src="https://monkemanx.github.io/attachments/server_imgs/IMG_20240815_234023627.jpg"&gt;
 &lt;img loading="lazy" style="width: 50%;" src="https://monkemanx.github.io/attachments/server_imgs/IMG_20240815_234153914.jpg"&gt;
&lt;/figure&gt;


&lt;h2 id="5-my-storage-situtation"&gt;5. My Storage Situtation&lt;/h2&gt;
&lt;p&gt;Before discussing the operating system I chose, I want to first touch on my storage setup. As mentioned earlier, I purchased two 10TB hard drives and a 256GB SSD, in addition to the 256GB SSD that came with the computer. I also had two 1TB external disks lying around that I wanted to use.&lt;/p&gt;
&lt;p&gt;The big question now is: which disks should be responsible for what? Should I separate data from running software and configuration files? Should I use some disks for backup? Should I set up the drives in a RAID system? Should I go for hardware or software RAID? These and many other questions arose as I planned the setup.&lt;/p&gt;
&lt;h3 id="51-what-is-raid"&gt;5.1 What is RAID?&lt;/h3&gt;
&lt;p&gt;To better explain my decision on how I use the disks, I’d like to briefly introduce what RAID is.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Redundant Array of Independent Disks (RAID)&lt;/strong&gt; is a system used to organize disk storage. It is a data virtualization technology that combines multiple physical disks into one logical unit, typically for performance gains, redundancy, or both. There isn’t a single RAID system; instead, there are multiple RAID levels, each with its own set of advantages and disadvantages. These levels are identified by numbers, which uniquely define the configuration and capabilities of each system.&lt;/p&gt;
&lt;p&gt;In &lt;strong&gt;RAID-0&lt;/strong&gt;, also known as &lt;strong&gt;striping&lt;/strong&gt;, multiple disks are combined into one by distributing the data across the disks in rows, as shown in the image below. This configuration has one major advantage: performance. Since consecutive sectors are spread across different disks, when we need to access a large block of data, we can read from multiple disks simultaneously. This parallel access significantly increases bandwidth compared to accessing data from just one disk, which would be limited by the bandwidth of that single device.&lt;/p&gt;
&lt;p&gt;However, RAID-0 also has a major disadvantage. If any of the disks in the RAID array fails, the data on that disk is permanently lost, with no chance of recovery. This can be catastrophic, as the lost sectors could be part of critical data, rendering the entire dataset unusable.&lt;/p&gt;












&lt;figure style="display: block; margin: 0 auto; width: 30%; "&gt;
 &lt;img
 src="https://monkemanx.github.io/attachments/RAID_0.png"
 loading="lazy"
 width=""
 height=""
 alt="Image"
 style="display: block; width: 100%; height: 100%; object-fit: contain; "
 &gt;
 
&lt;/figure&gt;

&lt;p&gt;In &lt;strong&gt;RAID-1&lt;/strong&gt;, also known as &lt;strong&gt;mirroring&lt;/strong&gt;, two disks are synchronized so that when data is written to one disk, it is simultaneously written to the other. This ensures that at all times, you have two copies of your data. If one disk fails, the other still holds a complete copy, providing redundancy as the main benefit.&lt;/p&gt;
&lt;p&gt;However, this setup comes with a downside: you sacrifice 50% of your storage capacity for redundancy, which can be costly. For example, if you buy two 10TB hard drives for €120 each, instead of having 20TB of usable storage, you only get 10TB because the other 10TB is used for mirroring, &amp;ldquo;wasting&amp;rdquo; 120€ in the process.&lt;/p&gt;












&lt;figure style="display: block; margin: 0 auto; width: 30%; "&gt;
 &lt;img
 src="https://monkemanx.github.io/attachments/RAID_1.png"
 loading="lazy"
 width=""
 height=""
 alt="Image"
 style="display: block; width: 100%; height: 100%; object-fit: contain; "
 &gt;
 
&lt;/figure&gt;

&lt;p&gt;RAID-0 and RAID-1 can be combined into a setup called &lt;strong&gt;RAID-01&lt;/strong&gt;, which provides both the redundancy of mirroring and the performance gains of striping. RAID-01 works by first striping the data across disks and then mirroring those striped sets.&lt;/p&gt;
&lt;p&gt;With RAID-01, the performance improvement is even greater than with RAID-0 because now you can read from four disks simultaneously and write to two disks at the same time. This results in 4x read access and 2x write access.&lt;/p&gt;
&lt;p&gt;The disadvantage of RAID-01 is that it requires at least four disks, and like with RAID-1, you lose 50% of your storage to redundancy. However, this redundancy allows one disk to fail without any data loss.&lt;/p&gt;












&lt;figure style="display: block; margin: 0 auto; width: 50%; "&gt;
 &lt;img
 src="https://monkemanx.github.io/attachments/RAID_01.png"
 loading="lazy"
 width=""
 height=""
 alt="Image"
 style="display: block; width: 100%; height: 100%; object-fit: contain; "
 &gt;
 
&lt;/figure&gt;

&lt;p&gt;The last RAID system I want to introduce is &lt;strong&gt;RAID-5&lt;/strong&gt;. To use RAID-5, you need at least three disks. Like RAID-0, it uses striping to improve performance. However, RAID-5 also provides redundancy, allowing for the failure of one disk without data loss.&lt;/p&gt;
&lt;p&gt;This redundancy is achieved by using parity blocks, which are distributed across all the disks. If one disk fails, the system can use these parity blocks to reconstruct the missing data. However, after a disk failure, it may take some time to rebuild and restore full access to all data. RAID-5 is one of the most cost-efficient RAID setups, offering a good balance between performance, redundancy, and storage capacity.&lt;/p&gt;












&lt;figure style="display: block; margin: 0 auto; width: 50%; "&gt;
 &lt;img
 src="https://monkemanx.github.io/attachments/RAID_5.png"
 loading="lazy"
 width=""
 height=""
 alt="Image"
 style="display: block; width: 100%; height: 100%; object-fit: contain; "
 &gt;
 
&lt;/figure&gt;

&lt;p&gt;There are many more RAID systems than the ones I’ve introduced, but these are some of the most important ones, especially for my use case. You can use the &lt;a href="https://www.raid-calculator.com/"&gt;raid-calculator&lt;/a&gt; to explore more options.&lt;/p&gt;
&lt;h3 id="52-the-magical-filesystem-zfs"&gt;5.2 The Magical Filesystem: ZFS&lt;/h3&gt;
&lt;p&gt;There are many file systems available to choose from, ranging from long-established ones like EXT4 and Windows-compatible NTFS to more modern options like Btrfs and the relatively new &lt;a href="https://www.phoronix.com/news/Linus-Torvalds-Bcachefs-Regrets"&gt;drama-infested&lt;/a&gt; file system, Bcachefs. Each of these file systems has its own strengths and weaknesses.&lt;/p&gt;
&lt;p&gt;However, I want to briefly discuss a special file system called &lt;strong&gt;Zettabyte File System (ZFS)&lt;/strong&gt;. ZFS has been around in some shape or form since 2001, but it only became widely available on Linux in 2010. It offers some really powerful features. While I won’t provide a comprehensive overview, there are many guides that do a far better job than I ever could, I want like to highlight some of its cool features:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Natively supports RAID storage.&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Prevents &lt;a href="https://en.wikipedia.org/wiki/Data_degradation"&gt;bit rot&lt;/a&gt;&lt;/strong&gt; through automatic checksum calculation, enabling silent self-healing of data.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Allows for automatic backups and version rollback&lt;/strong&gt; through snapshots.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Natively supports data compression&lt;/strong&gt;, including for snapshots and deduplication.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Although ZFS is quite impressive, it is &lt;a href="https://blog.fosketts.net/2017/07/10/zfs-best-filesystem-now/"&gt;not perfect&lt;/a&gt; and can be somewhat inflexible, along with having a few other issues.&lt;/p&gt;
&lt;h3 id="53-the-storage-plan"&gt;5.3 The Storage Plan&lt;/h3&gt;
&lt;style&gt;
 .info {
 background-color: #e6f7ff; 
 padding: 15px; 
 border-radius: 5px; 
 margin-bottom: 15px; 
 }

 .info-title {
 font-size: 20px; 
 margin-bottom: 10px; 
 color: #000080; 
 font-weight: bold; 
 }
&lt;/style&gt;

&lt;div class="info"&gt;
 &lt;div class="info-title"&gt;Info&lt;/div&gt;
 &lt;p&gt;Normally, when building a RAID system, it&amp;rsquo;s advisable to buy disks from separate brands to reduce the likelihood that multiple disks will fail at the same time. I didn’t follow this guideline, so we’ll see if that decision comes back to bite me.&lt;/p&gt;
&lt;/div&gt;

&lt;p&gt;To recap, my available storage consists of:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;2x 256GB SSDs&lt;/li&gt;
&lt;li&gt;2x 10TB hard drives&lt;/li&gt;
&lt;li&gt;2x 1TB external disks&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The most important aspect for my server was redundancy. While extra performance would be nice, it was not essential for the type of software and use cases I planned to run, which excluded RAID-0. Additionally, since I only purchased two of each disk type, RAID-01 and RAID-5 were not viable options.&lt;/p&gt;
&lt;p&gt;For a while, I considered buying additional disks to meet the three-disk requirement for RAID-5. However, the HP ProDesk 600 G5 I purchased didn’t have enough SATA connectors, and I would have had to buy an &lt;a href="https://www.techtarget.com/searchstorage/definition/host-bus-adapter"&gt;HBA card&lt;/a&gt;, which seemed like too much work and expense.&lt;/p&gt;
&lt;p&gt;Ultimately, I settled on the following setup:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;SSDs in a RAID mirror configuration with ZFS for the operating system and running software.&lt;/li&gt;
&lt;li&gt;HDDs in a RAID mirror configuration with ZFS for all my data, such as movies and photos.&lt;/li&gt;
&lt;li&gt;External disks in a RAID mirror configuration with ZFS for backups.&lt;/li&gt;
&lt;/ul&gt;












&lt;figure style="display: block; margin: 0 auto; width: 50%; "&gt;
 &lt;img
 src="https://monkemanx.github.io/attachments/seattle.jpg"
 loading="lazy"
 width=""
 height=""
 alt="Image"
 style="display: block; width: 100%; height: 100%; object-fit: contain; "
 &gt;
 
&lt;/figure&gt;

&lt;h2 id="6-the-server-operating-system-proxmox"&gt;6. The Server Operating System: Proxmox&lt;/h2&gt;
&lt;p&gt;For the Operating System, I decided to use &lt;a href="https://www.proxmox.com/en/"&gt;Proxmox&lt;/a&gt;, which is an open-source virtualization platform. A virtualization platform allows you to quickly spin up containers and virtual machines to run programs in isolated environments. You might ask yourself, &amp;ldquo;What is the benefit of virtualizing my programs?&amp;rdquo;&lt;/p&gt;
&lt;p&gt;I&amp;rsquo;m glad you asked, there are numerous benefits:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Increased Security:&lt;/strong&gt; Virtualization which containers your programs, enhances security. If one container is compromised, it’s very difficult for an attacker to escalate the breach to the entire system.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Avoiding Dependency Conflicts:&lt;/strong&gt; If you install everything directly on bare metal, you might run into a major issue: different programs may have conflicting dependencies. This can land you in &amp;ldquo;dependency hell,&amp;rdquo; resulting in a bloated system. For instance, have you ever (accidentally, of course) installed some programs that depend on &lt;a href="https://en.wikipedia.org/wiki/Wayland_(protocol)"&gt;Wayland&lt;/a&gt; and others that depend on &lt;a href="https://en.wikipedia.org/wiki/X.Org_Server"&gt;X.Org&lt;/a&gt;? Then, when you try to remove one of them, you find yourself having to reinstall everything. Not fun, right?&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Impact of Failure:&lt;/strong&gt; Virtualization ensures that if one of your containers fails, whether due to an update or something else, it won’t affect the rest of your system. This minimizes the impact a single program failure can have.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Ease of Management:&lt;/strong&gt; Managing your software becomes much simpler. You can start or stop containers in seconds, configure them to start on boot, duplicate them easily, and even limit how many resources each container is allowed to use.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Simplified Backup:&lt;/strong&gt; Backing up your software i.e. configurations and data, is also straightforward with containers. You can even back up the running state, minimizing downtime during the process.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Dynamic Load Balancing:&lt;/strong&gt; Finally, if you have multiple servers, you can combine them into one large data center cluster. This allows you to dynamically balance server loads, where a container can be moved from one server to another to reduce the load. If one server goes down, containers can be transferred to another, improving uptime.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;You could also get all these benefits without using Proxmox by running an operating system like Debian or Arch with Docker or LXC. However, Proxmox provides a convenient web-based GUI that makes managing containers much easier.&lt;/p&gt;












&lt;figure style="display: block; margin: 0 auto; width: 90%; "&gt;
 &lt;img
 src="https://monkemanx.github.io/attachments/proxmox.jpg"
 loading="lazy"
 width=""
 height=""
 alt="Image"
 style="display: block; width: 100%; height: 100%; object-fit: contain; "
 &gt;
 
 &lt;figcaption style="text-align: center; margin-top: 0.5rem;"&gt; An example of my Proxmox setup.&lt;/figcaption&gt;
 
&lt;/figure&gt;

&lt;h3 id="61-proxmox-installation"&gt;6.1 Proxmox: Installation&lt;/h3&gt;
&lt;p&gt;Setting up Proxmox is fairly straightforward. First, download the &lt;a href="https://www.proxmox.com/en/downloads/proxmox-virtual-environment/iso"&gt;ISO&lt;/a&gt; and create a bootable medium. I recommend using a USB stick, and one tool you can use for this is &lt;a href="https://github.com/pop-os/popsicle"&gt;Popsicle&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Next, ramm the USB stick with all the force you can into the correct port of your newly purchased computer (trust me, it helps!). Boot up the computer, enter the BIOS/EFI settings, and select the USB stick as the boot device. Then, follow the &lt;a href="https://pve.proxmox.com/wiki/Installation"&gt;installation guide&lt;/a&gt;. You’ll need a monitor, keyboard, and mouse during the installation process, but once it&amp;rsquo;s done, you can safely disconnect them.&lt;/p&gt;
&lt;p&gt;When you reach the screen where you need to choose the installation destination and if you’re following the same set-up as me, select ZFS with RAID 1 and choose the two SSDs as the target disks. We’ll deal with the external disks and hard drives later.&lt;/p&gt;












&lt;figure style="display: block; margin: 0 auto; width: 80%; "&gt;
 &lt;img
 src="https://monkemanx.github.io/attachments/proxmox_setup_select_disks.png"
 loading="lazy"
 width=""
 height=""
 alt="Image"
 style="display: block; width: 100%; height: 100%; object-fit: contain; "
 &gt;
 
&lt;/figure&gt;

&lt;p&gt;When prompted to create an account, I highly recommend using a real email (or even creating a separate email just for your server). This will allow you to receive regular reports on backups and alerts when something goes wrong, such as a hard disk failure.&lt;/p&gt;












&lt;figure style="display: block; margin: 0 auto; width: 80%; "&gt;
 &lt;img
 src="https://monkemanx.github.io/attachments/pve-set-password.png"
 loading="lazy"
 width=""
 height=""
 alt="Image"
 style="display: block; width: 100%; height: 100%; object-fit: contain; "
 &gt;
 
&lt;/figure&gt;

&lt;p&gt;For the network configuration, make sure to select an IP address that is actually free. You can check your router to see the currently occupied addresses. Your DNS server will most likely be your router, so enter its address. The netmask will probably be &lt;code&gt;255.255.255.0&lt;/code&gt;, but verify this with your router to be sure.&lt;/p&gt;












&lt;figure style="display: block; margin: 0 auto; width: 80%; "&gt;
 &lt;img
 src="https://monkemanx.github.io/attachments/pve-setup-network.png"
 loading="lazy"
 width=""
 height=""
 alt="Image"
 style="display: block; width: 100%; height: 100%; object-fit: contain; "
 &gt;
 
&lt;/figure&gt;

&lt;p&gt;After the installation is complete, you can remove all peripherals and connect to your Proxmox server via the selected IP address and port 8006: &lt;code&gt;http://&amp;lt;selected-ip&amp;gt;:8006&lt;/code&gt;.&lt;/p&gt;
&lt;h3 id="62-proxmox-post-installation-steps"&gt;6.2 Proxmox: Post Installation Steps&lt;/h3&gt;
&lt;p&gt;After connecting to Proxmox via the web app, you’ll be prompted to log in. Use the login credentials you created during the installation process, and make sure to write them down somewhere —- It would really suck to forget them. The default username is &lt;code&gt;root&lt;/code&gt;. When logging in, ensure that &lt;code&gt;PAM&lt;/code&gt; is selected as the &lt;em&gt;realm&lt;/em&gt;, or you won’t be able to connect.&lt;/p&gt;
&lt;h4 id="621-activating-no-subscription-repo"&gt;6.2.1 Activating No-Subscription Repo&lt;/h4&gt;
&lt;p&gt;The first thing you’ll probably want to do is enable the &amp;ldquo;No-Subscription Repository&amp;rdquo; for updates. To do this, navigate to: &lt;code&gt;machine (pve) -&amp;gt; Updates -&amp;gt; Repositories -&amp;gt; Add -&amp;gt; No-Subscription&lt;/code&gt;.&lt;/p&gt;












&lt;figure style="display: block; margin: 0 auto; width: 80%; "&gt;
 &lt;img
 src="https://monkemanx.github.io/attachments/gui-node-repositories.png"
 loading="lazy"
 width=""
 height=""
 alt="Image"
 style="display: block; width: 100%; height: 100%; object-fit: contain; "
 &gt;
 
&lt;/figure&gt;

&lt;p&gt;After you have enabled the community repository, you can update Proxmox by navigating to: &lt;code&gt;machine (pve) -&amp;gt; Updates -&amp;gt; press refresh &amp;amp; press upgrade&lt;/code&gt;.&lt;/p&gt;












&lt;figure style="display: block; margin: 0 auto; width: 80%; "&gt;
 &lt;img
 src="https://monkemanx.github.io/attachments/proxmox_update.jpg"
 loading="lazy"
 width=""
 height=""
 alt="Image"
 style="display: block; width: 100%; height: 100%; object-fit: contain; "
 &gt;
 
&lt;/figure&gt;

&lt;h4 id="622-creating-zfs-pool"&gt;6.2.2 Creating ZFS-Pool&lt;/h4&gt;
&lt;p&gt;Next, we want to create a ZFS pool for the four remaining disks (the two external ones and the two hard drives). To do this, navigate to: &lt;code&gt;machine (pve) -&amp;gt; Disks -&amp;gt; ZFS -&amp;gt; Create ZFS&lt;/code&gt;. For the RAID level, select &lt;code&gt;Mirror&lt;/code&gt;, and leave compression set to &lt;code&gt;on&lt;/code&gt;. This will slightly reduce performance, but you&amp;rsquo;ll save disk space. Do this once for the external drives and name the pool &lt;code&gt;backups&lt;/code&gt;, then repeat this for the hard drives and name the pool &lt;code&gt;data&lt;/code&gt;.&lt;/p&gt;












&lt;figure style="display: block; margin: 0 auto; width: 80%; "&gt;
 &lt;img
 src="https://monkemanx.github.io/attachments/proxmox_zfs.jpg"
 loading="lazy"
 width=""
 height=""
 alt="Image"
 style="display: block; width: 100%; height: 100%; object-fit: contain; "
 &gt;
 
&lt;/figure&gt;

&lt;p&gt;If you are finished, this should look like this:&lt;/p&gt;












&lt;figure style="display: block; margin: 0 auto; width: 80%; "&gt;
 &lt;img
 src="https://monkemanx.github.io/attachments/proxmox_zfs_overview.jpg"
 loading="lazy"
 width=""
 height=""
 alt="Image"
 style="display: block; width: 100%; height: 100%; object-fit: contain; "
 &gt;
 
&lt;/figure&gt;

&lt;h4 id="623-check-disks-smart-settings"&gt;6.2.3 Check Disks S.M.A.R.T Settings&lt;/h4&gt;
&lt;p&gt;Next, we want to check if &lt;a href="https://en.wikipedia.org/wiki/Self-Monitoring,_Analysis_and_Reporting_Technology"&gt;S.M.A.R.T. monitoring&lt;/a&gt; is enabled and functioning. S.M.A.R.T. is a vital monitoring service that performs checks to detect the health of HDDs and SSDs, which is crucial when running a server, as disk failures can happen easily through the constant disk usage. Navigate to: &lt;code&gt;machine (pve) -&amp;gt; Disks&lt;/code&gt; you can then select the disks and press the &lt;code&gt;Show S.M.A.R.T values&lt;/code&gt; button. This should similar to this:&lt;/p&gt;












&lt;figure style="display: block; margin: 0 auto; width: 80%; "&gt;
 &lt;img
 src="https://monkemanx.github.io/attachments/proxmox_smart_values.jpg"
 loading="lazy"
 width=""
 height=""
 alt="Image"
 style="display: block; width: 100%; height: 100%; object-fit: contain; "
 &gt;
 
&lt;/figure&gt;

&lt;h4 id="624-iommu"&gt;6.2.4 IOMMU&lt;/h4&gt;
&lt;p&gt;If you plan to use a graphics card or other PCIe devices inside your containers and VMs, you&amp;rsquo;ll need to enable &lt;em&gt;IOMMU&lt;/em&gt;. This can be done in your computer&amp;rsquo;s BIOS. The exact steps vary depending on the manufacturer, so I won’t provide further details here. Later, when this is really important I will say more to this.&lt;/p&gt;
&lt;h2 id="7-creating-our-data-vault-with-openmediavault-nas"&gt;7. Creating Our Data Vault with OpenMediaVault NAS&lt;/h2&gt;
&lt;p&gt;I wanted one central service to manage all the data on my disks. Typically, you&amp;rsquo;d use an external NAS in addition to your server, which helps with redundancy—if the server fails, your data is still safe on another device. However, since I’m as poor as a church mouse, I need to combine the server and NAS into one system.&lt;/p&gt;
&lt;p&gt;To achieve this, I’ll use a VM running the &lt;a href="https://www.openmediavault.org/"&gt;Openmediavault&lt;/a&gt; operating system. It provides a nice graphical interface for managing permissions and shared folders. Initially, I considered using software like &lt;a href="https://github.com/45Drives/cockpit-file-sharing"&gt;Cockpit&lt;/a&gt; to create NFS shares instead of a full NAS operating system, but I ultimately decided that using a full VM as a NAS would make the process easier.&lt;/p&gt;
&lt;h3 id="71-openmediavault-installation"&gt;7.1 Openmediavault: Installation&lt;/h3&gt;
&lt;p&gt;The first step is to download the OpenMediaVault &lt;a href="https://www.openmediavault.org/download.html"&gt;ISO&lt;/a&gt; to your computer. After that, you can upload it to the server by navigating to: &lt;code&gt;local -&amp;gt; ISO Images -&amp;gt; Upload&lt;/code&gt;.&lt;/p&gt;












&lt;figure style="display: block; margin: 0 auto; width: 80%; "&gt;
 &lt;img
 src="https://monkemanx.github.io/attachments/proxmox_upload.jpg"
 loading="lazy"
 width=""
 height=""
 alt="Image"
 style="display: block; width: 100%; height: 100%; object-fit: contain; "
 &gt;
 
&lt;/figure&gt;

&lt;p&gt;After this you can press the big blue button with the text &lt;code&gt;Create VM&lt;/code&gt; in the top right to create a virtual machine. For the storage choose &lt;code&gt;local&lt;/code&gt; we want the VM to run on the SSDs, choose &lt;code&gt;openmediavault&lt;/code&gt; as ISO image, for the hardware 1 core with 6GB RAM and 32GB disk space should be enough.&lt;/p&gt;












&lt;figure style="display: block; margin: 0 auto; width: 80%; "&gt;
 &lt;img
 src="https://monkemanx.github.io/attachments/proxmox_nas.jpg"
 loading="lazy"
 width=""
 height=""
 alt="Image"
 style="display: block; width: 100%; height: 100%; object-fit: contain; "
 &gt;
 
&lt;/figure&gt;

&lt;p&gt;In the Proxmox sidebar, you can now double-click on the NAS, which will open a new browser window, allowing you to access the NAS interface. You should be able to see the IP address in the terminal. Alternatively, you can copy the IP address and use proper remote access software to connect to the NAS. The default login name when connecting via ssh is &lt;code&gt;root&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;OpenMediaVault (OMV) should now be available as a web service. This means you can open your browser and enter &lt;code&gt;http://&amp;lt;nas-ip-address&amp;gt;&lt;/code&gt;, where you&amp;rsquo;ll be greeted by a login screen. The default login credentials are &lt;code&gt;admin&lt;/code&gt; as the username and &lt;code&gt;openmediavault&lt;/code&gt; as the password. After logging in, you should see the OMV dashboard (your version might look slightly different).&lt;/p&gt;












&lt;figure style="display: block; margin: 0 auto; width: 80%; "&gt;
 &lt;img
 src="https://monkemanx.github.io/attachments/omv_dashboard.jpg"
 loading="lazy"
 width=""
 height=""
 alt="Image"
 style="display: block; width: 100%; height: 100%; object-fit: contain; "
 &gt;
 
&lt;/figure&gt;

&lt;h3 id="72-openmediavault-post-installation-steps"&gt;7.2 Openmediavault: Post-Installation Steps&lt;/h3&gt;
&lt;p&gt;The first thing you should do is change the default password. Click on the person icon in the top right corner and select &lt;code&gt;Change Password&lt;/code&gt;. Next, we want to create a filesystem that we can later use for all our data. Navigate to: &lt;code&gt;Storage -&amp;gt; File System -&amp;gt; Create&lt;/code&gt;. Since we are already using ZFS for the underlying disks, be sure to choose &lt;code&gt;ext4&lt;/code&gt; as the file system. You can mount the file system by pressing the play button while having selected the new file system.&lt;/p&gt;












&lt;figure style="display: block; margin: 0 auto; width: 80%; "&gt;
 &lt;img
 src="https://monkemanx.github.io/attachments/omv_file_system.jpg"
 loading="lazy"
 width=""
 height=""
 alt="Image"
 style="display: block; width: 100%; height: 100%; object-fit: contain; "
 &gt;
 
&lt;/figure&gt;

&lt;p&gt;Next, we want to create a user who will be able to access the data on the file system over the network. To do this, navigate to &lt;code&gt;Users -&amp;gt; Create&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Once you&amp;rsquo;ve created the user, we can finally set up a shared folder, which will allow access to its data as long as you are connected to the network. Go to: &lt;code&gt;Storage -&amp;gt; Shared Folders -&amp;gt; Create&lt;/code&gt;, give it a name, and select the new file system.&lt;/p&gt;
&lt;p&gt;After creating the shared folder, you need to grant your newly created user permissions to access it. Select your shared folder and click on &lt;code&gt;Permissions&lt;/code&gt;, where you can assign read or read-and-write access to users.&lt;/p&gt;
&lt;p&gt;In the end, we need to enable the SAMBA service and add our shared folder to it, to make it accessible. For this navigate to: &lt;code&gt;Service -&amp;gt; SMB -&amp;gt; Settings -&amp;gt; Enable&lt;/code&gt; and then &lt;code&gt;Services -&amp;gt; SMB -&amp;gt; Shares -&amp;gt; Create&lt;/code&gt; select your previous created shared folder. Make sure to save the changes in OMV.&lt;/p&gt;
&lt;p&gt;You should now be able to connect to your shared folder via your file manager both in linux and windows.&lt;/p&gt;












&lt;figure style="display: block; margin: 0 auto; width: 80%; "&gt;
 &lt;img
 src="https://monkemanx.github.io/attachments/nas_access.jpg"
 loading="lazy"
 width=""
 height=""
 alt="Image"
 style="display: block; width: 100%; height: 100%; object-fit: contain; "
 &gt;
 
&lt;/figure&gt;

&lt;h2 id="8-simplifying-your-urls-with-nginx-proxy-manager"&gt;8. Simplifying Your URLs with Nginx Proxy Manager&lt;/h2&gt;
&lt;p&gt;&lt;a href="https://nginxproxymanager.com/"&gt;Nginx Proxy Manager&lt;/a&gt; is, as you might have guessed from the name, a proxy manager. A proxy manager is essentially a central routing service through which all requests to access a service must pass. This setup enhances security and simplifies access to those services. If you&amp;rsquo;d like to learn more about proxy managers, you can check out a previous article of mine on the &lt;a href="https://monkemanx.github.io/articles/my_homelab_part_9_caddy_fileserver_and_duckdns/"&gt;Caddy Proxy Manager&lt;/a&gt;. In this article, however, I&amp;rsquo;ll focus on how I installed Nginx Proxy Manager.&lt;/p&gt;
&lt;h3 id="81-nginx-proxy-manager-installation"&gt;8.1 Nginx Proxy Manager: Installation&lt;/h3&gt;
&lt;p&gt;For the installation, I used the &lt;a href="https://tteck.github.io/Proxmox/"&gt;Proxmox Helper Scripts by tteck&lt;/a&gt;. I installed the service on the SSD ZFS dataset. To install Nginx Proxy Manager, simply copy the helper command from the website and paste it into the terminal of your Proxmox machine (&lt;code&gt;pve&lt;/code&gt;). You&amp;rsquo;ll then be greeted by the &lt;em&gt;tteck&lt;/em&gt; installation script, which will guide you through the installation process.&lt;/p&gt;












&lt;figure style="display: block; margin: 0 auto; width: 80%; "&gt;
 &lt;img
 src="https://monkemanx.github.io/attachments/proxmox_nginx_installation.jpg"
 loading="lazy"
 width=""
 height=""
 alt="Image"
 style="display: block; width: 100%; height: 100%; object-fit: contain; "
 &gt;
 
&lt;/figure&gt;

&lt;p&gt;Once the installation process is complete, you should see a new container under your Proxmox machine (&lt;code&gt;pve&lt;/code&gt;) in the sidebar. You can click on it to view its details. In the top-right corner, you&amp;rsquo;ll find options to start or shut down the container. Under the &lt;code&gt;Options&lt;/code&gt; tab, you can enable the container to start automatically if you wish.&lt;/p&gt;
&lt;p&gt;Similar to the OpenMediaVault virtual machine, you can double-click the new Nginx container to connect to it. In the container&amp;rsquo;s shell, use the command &lt;code&gt;hostname -I&lt;/code&gt; to view its IP address. Once you have the IP, you can connect to the Nginx web service by visiting &lt;code&gt;http://&amp;lt;your_ip&amp;gt;/admin&lt;/code&gt;. The default login is &lt;code&gt;admin@example.com&lt;/code&gt;, with the password &lt;code&gt;changeme&lt;/code&gt;. As the name suggests, make sure to change both the email and password in the Nginx settings.&lt;/p&gt;












&lt;figure style="display: block; margin: 0 auto; width: 80%; "&gt;
 &lt;img
 src="https://monkemanx.github.io/attachments/nginx_home.jpg"
 loading="lazy"
 width=""
 height=""
 alt="Image"
 style="display: block; width: 100%; height: 100%; object-fit: contain; "
 &gt;
 
&lt;/figure&gt;

&lt;p&gt;You can use &lt;a href="https://www.duckdns.org/"&gt;DuckDns&lt;/a&gt; to make your service accessible via a domain name like &lt;code&gt;myverycoolserver.duckdns.org&lt;/code&gt;. However, to use this with Nginx Proxy Manager, you first need to install its dependencies. You can do this by accessing the container&amp;rsquo;s shell and typing: &lt;code&gt;pip install certbot_dns_duckdns&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;At this point, you have two options:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;You can make your services (currently just Nginx, but later we’ll install more) accessible from anywhere on the internet.&lt;/li&gt;
&lt;li&gt;You can restrict access to your services so they are only available on your local network.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;I chose the second option. Making your services accessible over the internet can be risky, as it allows attackers to potentially infiltrate your home network. I recommend doing this only if you&amp;rsquo;re confident in securing your setup.&lt;/p&gt;
&lt;p&gt;To proceed with the second option, go to DuckDns (although you can also use a purchased domain or another free domain name service, but for this guide, I’ll use DuckDns). Once logged in, create a new domain by entering a name in the &lt;code&gt;subdomains&lt;/code&gt; field.&lt;/p&gt;
&lt;p&gt;After creating the domain, it will point to your &lt;strong&gt;external IP address&lt;/strong&gt;. Since we only want to access the service on the local network, you’ll need to change this to the &lt;strong&gt;local IP address&lt;/strong&gt; of your Nginx Proxy Manager. This is the same IP you used to access Nginx through your browser. For example, my local IP address follows the format &lt;code&gt;192.168.xxx.xxx&lt;/code&gt;, but this may vary for you.&lt;/p&gt;












&lt;figure style="display: block; margin: 0 auto; width: 80%; "&gt;
 &lt;img
 src="https://monkemanx.github.io/attachments/duckdns.jpg"
 loading="lazy"
 width=""
 height=""
 alt="Image"
 style="display: block; width: 100%; height: 100%; object-fit: contain; "
 &gt;
 
&lt;/figure&gt;

&lt;p&gt;We can now make Proxmox and Nginx Proxy Manager accessible through your newly created domain. If you want your service to be accessible via &lt;code&gt;https&lt;/code&gt; (instead of just &lt;code&gt;http&lt;/code&gt;), you can use &lt;a href="https://letsencrypt.org/"&gt;Let’s Encrypt&lt;/a&gt;, which provides free certificates for your domain using ACME challenges. Fortunately, Nginx can handle this automatically.&lt;/p&gt;
&lt;p&gt;Go to the Nginx web interface and navigate to &lt;code&gt;SSL Certificates -&amp;gt; Add SSL Certificate&lt;/code&gt;. Choose &lt;code&gt;Let’s Encrypt&lt;/code&gt;, and for the domain name, enter two entries: &lt;code&gt;&amp;lt;your_domain&amp;gt;&lt;/code&gt; and &lt;code&gt;*.&amp;lt;your_domain&amp;gt;&lt;/code&gt; from DuckDns. The &lt;code&gt;*&lt;/code&gt; in front of your domain is called a &lt;em&gt;wildcard&lt;/em&gt; and allows you to secure subdomains like &lt;code&gt;proxmox.&amp;lt;your_domain&amp;gt;&lt;/code&gt;, which is very useful for all the services we will add here later on.&lt;/p&gt;
&lt;p&gt;Activate the slider for the &lt;code&gt;DNS challenge&lt;/code&gt;, select DuckDns as the provider, and enter your DuckDns token (you can find it under your email address when logged into DuckDns). After this, press save. It may take some time for the certificate to fully propagate, so if there’s a delay, you can edit the SSL certificate and increase the propagation time.&lt;/p&gt;
&lt;p&gt;Now, let’s add your first proxy. Go to &lt;code&gt;Hosts -&amp;gt; Proxy Hosts -&amp;gt; Add Proxy Host&lt;/code&gt;. Enter the domain name you want for your service. For Nginx, I recommend using just your domain name, and for Proxmox, use something like &lt;code&gt;prox.&amp;lt;your_domain&amp;gt;&lt;/code&gt;. Don&amp;rsquo;t forget to select the SSL certificate you created earlier, I also recommend to enable &lt;em&gt;Force SSL&lt;/em&gt; and &lt;em&gt;HTTP/2 Support&lt;/em&gt;.&lt;/p&gt;


&lt;figure style="display: flex; justify-content: center;" height="367px"&gt;
 &lt;img loading="lazy" style="width: 40%;" src="https://monkemanx.github.io/attachments/nginx_proxy_1.jpg"&gt;
 &lt;img loading="lazy" style="width: 50%;" src="https://monkemanx.github.io/attachments/nginx_proxy_2.jpg"&gt;
&lt;/figure&gt;


&lt;p&gt;In principle, you can add all the services you self-host that are accessible via an IP address to Nginx Proxy Manager. This will allow you to access them using a domain name instead of needing to remember the IP address. However, some services may not work right out of the box with the proxy manager and might require additional configurations, such as Home Assistant.&lt;/p&gt;
&lt;h2 id="9-vaultwarden-the-password-manager"&gt;9. Vaultwarden the Password Manager&lt;/h2&gt;
&lt;p&gt;I’ve also previously written about &lt;a href="https://github.com/dani-garcia/vaultwarden"&gt;Vaultwarden&lt;/a&gt; in a &lt;a href="https://monkemanx.github.io/articles/my_homelab_part_10_vaultwarden/"&gt;prior post&lt;/a&gt;. To recap, it’s a self-hosted, free, open-source password manager based on the popular Bitwarden software.&lt;/p&gt;
&lt;p&gt;Vaultwarden can be easily installed using the &lt;a href="https://tteck.github.io/Proxmox/"&gt;Proxmox Helper Scripts by tteck&lt;/a&gt;, I recommend isntalling it on the local SSD ZFS dataset. Once installed, you can add it to the list of proxy hosts in Nginx, as shown in the previous section. Just remember, when adding a service to Nginx, you should use the &lt;strong&gt;internal IP address&lt;/strong&gt; (the one you use to access the service, which you can find using the command &lt;code&gt;hostname -I&lt;/code&gt; in the container&amp;rsquo;s shell), not the &lt;strong&gt;external IP address&lt;/strong&gt;.&lt;/p&gt;
&lt;h2 id="10-news-aggregation-with-freshrss"&gt;10. News Aggregation with FreshRSS&lt;/h2&gt;
&lt;p&gt;&lt;a href="https://en.wikipedia.org/wiki/RSS"&gt;Really Simple Syndication (RSS)&lt;/a&gt; is a protocol used for news aggregation. Websites can offer an RSS feed that users can subscribe to, allowing newly released information on the feed to be forwarded directly to the user&amp;rsquo;s RSS client. The content of an RSS feed can vary widely, though most of it is text-based. It can also notify users of new podcast episodes, among other updates. &lt;a href="https://github.com/FreshRSS/FreshRSS"&gt;FreshRSS&lt;/a&gt; is one of these RSS clients, that is selfhosted free and open source.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Why use RSS?&lt;/strong&gt;
Nowadays, more and more platforms use automated &lt;a href="https://www.nvidia.com/en-us/glossary/recommendation-system/"&gt;recommendation systems&lt;/a&gt; to suggest new content. Whether it&amp;rsquo;s social media like Facebook, or even worse, TikTok—where all content is driven by recommendation algorithms—or the news pages on Android phones or Windows machines, the trend is the same.
I believe that, on a large scale, these recommendation systems are unhealthy for society. They are optimized for user retention, which often leads to the promotion of more extreme content. &lt;em&gt;AlmostFridayTv&lt;/em&gt; has a great semi-related &lt;a href="https://www.youtube.com/watch?v=jZkGqlq8xwE"&gt;sketch on this&lt;/a&gt;, which I highly recommend.
This is where RSS comes in. It gives people the power to take control back from the algorithm by allowing them to curate their own news feed, free from the influence of any recommendation system.&lt;/p&gt;
&lt;h3 id="101-installation-freshrss"&gt;10.1 Installation FreshRSS&lt;/h3&gt;
&lt;p&gt;The installation for this setup is a bit more complicated than for Vaultwarden since there isn’t a single script available. However, we can use tteck’s &lt;a href="https://tteck.github.io/Proxmox/#docker-lxc"&gt;Docker LXC&lt;/a&gt; script and then utilize Docker Compose. Just like with Vaultwarden, copy the command from tteck’s page and paste it into the shell of your Proxmox machine (&lt;code&gt;pve&lt;/code&gt;). Be sure to use the first link, not the second one, which is based on an Alpine container. When asked whether you want to install additional software, only agree to &lt;code&gt;docker-compose&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Once the installation is complete, a new container should appear in your Proxmox sidebar. It’s a good idea to give it a more specific name, which you can do under &lt;code&gt;DNS -&amp;gt; Hostname&lt;/code&gt;. Enter the container’s shell, as we’ll now create a &lt;code&gt;docker-compose&lt;/code&gt; file to define the settings for your software. I’ve discussed this process in more detail in my posts &lt;a href="http://localhost:1313/articles/my_homelab_part_1_introduction/"&gt;My Homelab Part 1: Introduction&lt;/a&gt; and &lt;a href="https://monkemanx.github.io/articles/my_homelab_part_3_calibre/"&gt;My Homelab Part 3: Calibre&lt;/a&gt;, if you’d like to learn more.&lt;/p&gt;
&lt;p&gt;You can create the &lt;code&gt;docker-compose.yaml&lt;/code&gt; file using &lt;code&gt;vi&lt;/code&gt; or &lt;code&gt;nano&lt;/code&gt;. If you prefer another editor, you can install it using &lt;code&gt;apt-get&lt;/code&gt;, for example, &lt;code&gt;apt-get install vim&lt;/code&gt;. Once the file is created, add the following content to it:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-yaml" data-lang="yaml"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 1&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="nt"&gt;version&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;2.4&amp;#34;&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 2&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 3&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="nt"&gt;volumes&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 4&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;data&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 5&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;extensions&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 6&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 7&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="nt"&gt;services&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 8&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;freshrss&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 9&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;image&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;freshrss/freshrss:latest&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;10&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;container_name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;freshrss&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;11&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;hostname&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;freshrss&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;12&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;restart&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;unless-stopped&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;13&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;volumes&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;14&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="l"&gt;./rss/data:/var/www/FreshRSS/data&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;15&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="l"&gt;./rss/extensions:/var/www/FreshRSS/extensions&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;16&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;environment&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;17&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;TZ&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;Europe/Berlin&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;18&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;CRON_MIN&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;3,33&amp;#39;&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;19&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;ports&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;20&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="s2"&gt;&amp;#34;8080:80&amp;#34;&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;After you’ve created the &lt;code&gt;docker-compose.yaml&lt;/code&gt; file, you can run the software using the command:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;1&lt;/span&gt;&lt;span class="cl"&gt;docker compose -f docker-compose.yaml up -d
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;To check the status of the running Docker containers, you can use the command:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;1&lt;/span&gt;&lt;span class="cl"&gt;docker ps -a
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The output should look similar to this:&lt;/p&gt;












&lt;figure style="display: block; margin: 0 auto; width: 100%; "&gt;
 &lt;img
 src="https://monkemanx.github.io/attachments/freshrss_docker.jpg"
 loading="lazy"
 width=""
 height=""
 alt="Image"
 style="display: block; width: 100%; height: 100%; object-fit: contain; "
 &gt;
 
&lt;/figure&gt;

&lt;p&gt;As with the previous services, you should be able to connect to the web service using the container&amp;rsquo;s IP address and port &lt;code&gt;8080&lt;/code&gt;. The URL will look like this: &lt;code&gt;http://&amp;lt;your_ip&amp;gt;:8080&lt;/code&gt;. With this setup, you now have a central server for aggregating news and blog posts.&lt;/p&gt;












&lt;figure style="display: block; margin: 0 auto; width: 80%; "&gt;
 &lt;img
 src="https://monkemanx.github.io/attachments/freshrss_home.jpg"
 loading="lazy"
 width=""
 height=""
 alt="Image"
 style="display: block; width: 100%; height: 100%; object-fit: contain; "
 &gt;
 
&lt;/figure&gt;

&lt;p&gt;Your site’s appearance can be customized under &lt;code&gt;Settings -&amp;gt; Display -&amp;gt; Theme&lt;/code&gt;. Here, you can change the look of your RSS reader. Personally, I prefer the Nord theme, which is also what you can see in the image above.&lt;/p&gt;
&lt;p&gt;If you&amp;rsquo;re behind a reverse proxy like Nginx, you may need to change the base address of FreshRSS. To check this, visit &lt;code&gt;https://&amp;lt;your_domain&amp;gt;/api/&lt;/code&gt;. If you receive a warning or see the IP address instead of the domain name, you&amp;rsquo;ll need to update the base URL.&lt;/p&gt;
&lt;p&gt;To do this:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Shut down FreshRSS by running the command &lt;code&gt;docker stop freshrss&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Enter the config folder via the container&amp;rsquo;s shell and look for the &lt;code&gt;data/config.php&lt;/code&gt; file.&lt;/li&gt;
&lt;li&gt;Open the file and change the base URL to match your domain name.&lt;/li&gt;
&lt;li&gt;Once done, restart FreshRSS with &lt;code&gt;docker start freshrss&lt;/code&gt;.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;You can verify if the base URL is set correctly by going to &lt;code&gt;Settings -&amp;gt; System Configuration -&amp;gt; Base URL&lt;/code&gt;.&lt;/p&gt;
&lt;h3 id="102-third-party-clients"&gt;10.2 Third Party Clients&lt;/h3&gt;
&lt;p&gt;You have now a central website from which you can read blog posts from, but maybe you want to read some of RSS content offline, for that you can use client that synchronizes your read articles and favourites with your server. A full list of compatible clients can be found &lt;a href="https://github.com/FreshRSS/FreshRSS?tab=readme-ov-file#apis--native-apps"&gt;here&lt;/a&gt;. I personally use &lt;a href="https://github.com/martinrotter/rssguard"&gt;RSSGuard&lt;/a&gt; for my windows laptop and &lt;a href="https://github.com/Ashinch/ReadYou/"&gt;Read You&lt;/a&gt; for my phone.&lt;/p&gt;












&lt;figure style="display: block; margin: 0 auto; width: 30%; "&gt;
 &lt;img
 src="https://monkemanx.github.io/attachments/read_you_rss.png"
 loading="lazy"
 width=""
 height=""
 alt="Image"
 style="display: block; width: 100%; height: 100%; object-fit: contain; "
 &gt;
 
&lt;/figure&gt;

&lt;p&gt;To allow clients to synchronize with your FreshRSS instance, you first need to enable this. Navigate to &lt;code&gt;Settings -&amp;gt; Authentication&lt;/code&gt; and check the box for &lt;code&gt;Allow API Access&lt;/code&gt;. Then, go to the &lt;code&gt;Profile&lt;/code&gt; section in settings and fill in the &lt;code&gt;API password&lt;/code&gt; field. This will be the password required to log in from your clients.&lt;/p&gt;
&lt;p&gt;To synchronize the &lt;em&gt;Read You&lt;/em&gt; app with your server, go to &lt;code&gt;Settings -&amp;gt; Accounts -&amp;gt; Add Account -&amp;gt; FreshRSS&lt;/code&gt;. When adding the URL, make sure to append the following suffix: &lt;code&gt;/api/greader.php&lt;/code&gt;. For more details, you can refer to this &lt;a href="https://freshrss.github.io/FreshRSS/en/users/06_Mobile_access.html"&gt;guide&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id="11-managing-your-cooking-recipes-with-tandoor"&gt;11. Managing Your Cooking Recipes with Tandoor&lt;/h2&gt;
&lt;p&gt;&lt;a href="https://github.com/TandoorRecipes/recipes"&gt;Tandoor&lt;/a&gt; is a self-hosted, free, open-source recipe manager. It allows you to create recipes, meal plans, and shopping lists, save them on your server, and make them accessible to your entire network.&lt;/p&gt;












&lt;figure style="display: block; margin: 0 auto; width: 80%; "&gt;
 &lt;img
 src="https://monkemanx.github.io/attachments/tandoor_example.jpg"
 loading="lazy"
 width=""
 height=""
 alt="Image"
 style="display: block; width: 100%; height: 100%; object-fit: contain; "
 &gt;
 
&lt;/figure&gt;

&lt;p&gt;The service is easy to install, thanks to the &lt;a href="https://tteck.github.io/Proxmox/#tandoor-recipes-lxc"&gt;tteck script&lt;/a&gt;. After installation, all you need to do is create a user and a workspace, and then you can start creating recipes.&lt;/p&gt;
&lt;p&gt;By default, Tandoor doesn’t come with any ingredients preloaded. You can manually create ingredients for each recipe, or alternatively, you can import pre-existing ingredients. To do this, go to &lt;code&gt;Space Settings -&amp;gt; Open Data Importer&lt;/code&gt;, choose the language (&lt;code&gt;en&lt;/code&gt; for English), select the items you want, and press &lt;code&gt;Import&lt;/code&gt;.&lt;/p&gt;
&lt;h2 id="12-service-dashboard-with-homarr"&gt;12. Service Dashboard with Homarr&lt;/h2&gt;
&lt;p&gt;By now, we have a good number of services running. Even though they’re behind a reverse proxy with easily remembered names, as the number of services grows, it might become difficult to remember how to access each one.&lt;/p&gt;
&lt;p&gt;This is where &lt;a href="https://github.com/ajnart/homarr"&gt;Homarr&lt;/a&gt; comes in. Homarr is a modern dashboard that centralizes all your services in one place, making it easy to access everything. It’s easily configurable through its web interface and offers many widget integrations with different apps.&lt;/p&gt;
&lt;p&gt;There are plenty of other dashboard services out there, such as &lt;a href="https://github.com/Lissy93/dashy"&gt;Dashy&lt;/a&gt;, &lt;a href="https://github.com/glanceapp/glance"&gt;Glance&lt;/a&gt;, &lt;a href="https://github.com/gethomepage/homepage"&gt;Homepage&lt;/a&gt;, and many more. The exact dashboard you choose is largely a matter of personal preference, as they all function similarly. I chose Homarr because it had a &lt;a href="https://tteck.github.io/Proxmox/#homarr-lxc"&gt;tteck script&lt;/a&gt; available, making installation easier.&lt;/p&gt;












&lt;figure style="display: block; margin: 0 auto; width: 80%; "&gt;
 &lt;img
 src="https://monkemanx.github.io/attachments/homarr.jpg"
 loading="lazy"
 width=""
 height=""
 alt="Image"
 style="display: block; width: 100%; height: 100%; object-fit: contain; "
 &gt;
 
&lt;/figure&gt;

&lt;p&gt;To add a service to Homarr, click on the &lt;em&gt;Edit Mode&lt;/em&gt; button in the top-right corner. Once in edit mode, you can add new tiles by clicking the button in the top-right corner again. These tiles can be a service, a widget, or a category, which can be used to group services together.&lt;/p&gt;
&lt;h2 id="13-torrenting-all-the-media-you-want-with-the-arr-stack"&gt;13. Torrenting All the Media You Want with the Arr-Stack&lt;/h2&gt;
&lt;style&gt;
 .info {
 background-color: #e6f7ff; 
 padding: 15px; 
 border-radius: 5px; 
 margin-bottom: 15px; 
 }

 .info-title {
 font-size: 20px; 
 margin-bottom: 10px; 
 color: #000080; 
 font-weight: bold; 
 }
&lt;/style&gt;

&lt;div class="info"&gt;
 &lt;div class="info-title"&gt;Info&lt;/div&gt;
 &lt;p&gt;&lt;p&gt;&lt;strong&gt;Torrenting&lt;/strong&gt; is the act of downloading and uploading files through the BitTorrent network. Instead of downloading from a central server, users download and upload files to each other in a process called peer-to-peer (P2P) file sharing. Each torrent has a &lt;code&gt;.torrent&lt;/code&gt; file associated with it, which contains metadata about the files and folders being shared, as well as a list of &lt;em&gt;trackers&lt;/em&gt; that help participants find each other.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Torrent Trackers&lt;/strong&gt; are a special type of server that assist in the communication between peers. They keep track of where file copies reside on peer machines, which ones are available, and help coordinate the transmission and reassembly of the files being shared.&lt;/p&gt;
&lt;/p&gt;
&lt;/div&gt;

&lt;p&gt;The &lt;strong&gt;arr-stack&lt;/strong&gt; is a suite of software used to manage and automate the torrenting of media, such as movies, TV shows, music, and books. The exact composition of the arr-stack can vary, but my setup includes the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Torrent Client:&lt;/strong&gt; This is responsible for the actual torrenting process. Popular options include &lt;a href="https://github.com/transmission/transmission"&gt;Transmission&lt;/a&gt; and &lt;a href="https://github.com/qbittorrent/qBittorrent"&gt;qBittorrent&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;VPN:&lt;/strong&gt; A VPN is crucial to hide your torrenting activity, especially if torrenting is illegal in your country. I use &lt;a href="https://airvpn.org/"&gt;AirVPN&lt;/a&gt;, which supports port forwarding—an important feature for torrenting.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Media Management Tools:&lt;/strong&gt; These tools help organize and automate media downloading.
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/Sonarr/Sonarr"&gt;Sonarr&lt;/a&gt;: Manages TV shows.&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/Radarr/Radarr"&gt;Radarr&lt;/a&gt;: Manages movies.&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/Lidarr/Lidarr"&gt;Lidarr&lt;/a&gt;: Manages music.&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/Readarr/Readarr"&gt;Readarr&lt;/a&gt;: Manages books.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;a href="https://github.com/Fallenbagel/jellyseerr"&gt;Jellyseerr&lt;/a&gt;:&lt;/strong&gt; A tool for managing media requests, allowing users to request new movies or TV shows for the library.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;a href="https://github.com/qdm12/gluetun"&gt;Gluetun&lt;/a&gt;:&lt;/strong&gt; A VPN client running inside a Docker container, supporting multiple VPN providers.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;I won’t go into too much detail since there are already many excellent guides on the topic, such as:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://zerodya.net/self-host-jellyfin-media-streaming-stack/"&gt;Self-host an automated Jellyfin media streaming Stack&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://sysblob.com/posts/plex/"&gt;Plex and the *ARR stack&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://mafyuh.com/posts/docker-arr-stack-guide/"&gt;Docker Compose Arr Stack&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;As a basic overview, Jellyseerr provides a Netflix-like interface where users can request media (movies or TV shows). These requests are forwarded to Radarr for movies and to Sonarr for TV shows. These tools, in turn, forward the requests to Prowlarr (or Jackett), which searches for torrents and sends them to the torrent client (in my case, qBittorrent, though Transmission is another option). Once the torrent is downloaded, the media becomes available in Jellyfin for consumption.&lt;/p&gt;
&lt;p&gt;Everything runs inside a Docker container with Gluetun, which tunnels all network activity from qBittorrent through the VPN. If downloading &lt;code&gt;.torrent&lt;/code&gt; files is illegal in your country, you should also route the network activity of Prowlarr, Sonarr, and Radarr through the VPN.&lt;/p&gt;












&lt;figure style="display: block; margin: 0 auto; width: 100%; "&gt;
 &lt;img
 src="https://monkemanx.github.io/attachments/mediastack.png"
 loading="lazy"
 width=""
 height=""
 alt="Image"
 style="display: block; width: 100%; height: 100%; object-fit: contain; "
 &gt;
 
 &lt;figcaption style="text-align: center; margin-top: 0.5rem;"&gt;Image is from &lt;i&gt;zerodya&lt;/i&gt;. In my setup, I use &lt;i&gt;Prowlarr&lt;/i&gt; instead of Jackett and &lt;i&gt;qBittorrent&lt;/i&gt; instead of Transmission.&lt;/figcaption&gt;
 
&lt;/figure&gt;

&lt;h3 id="131-installation-torrenting-stack"&gt;13.1 Installation: Torrenting Stack&lt;/h3&gt;
&lt;p&gt;The first step is to set up a virtual machine (VM) for the arr-stack. I chose &lt;strong&gt;Debian 12&lt;/strong&gt; as the operating system, which you can download &lt;a href="https://www.debian.org/download"&gt;here&lt;/a&gt;. Like we did with the NAS and OpenMediaVault setup, first, download the ISO file and upload it to your Proxmox server.&lt;/p&gt;
&lt;p&gt;Once the ISO is uploaded, we can create the VM. Here are the settings that worked well for me:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;8GB RAM&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;32GB Disk Space&lt;/strong&gt; (on the SSD, i.e., the local ZFS dataset)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;2 Processors&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Since the local ZFS dataset doesn&amp;rsquo;t have enough space to store all the movies, we want to save the torrented media on our &lt;strong&gt;data&lt;/strong&gt; ZFS dataset instead. To do this, follow these steps:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Enter the shell of the newly created VM and install &lt;strong&gt;cifs-utils&lt;/strong&gt; to enable the VM to connect to shared folders on your NAS via SAMBA. Run:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;1&lt;/span&gt;&lt;span class="cl"&gt;apt install cifs-utils
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;On OpenMediaVault, create a new shared folder called &lt;code&gt;media_root&lt;/code&gt; and share it via SAMBA.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;On your VM, create a corresponding folder to mount this shared folder:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;1&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="nb"&gt;cd&lt;/span&gt; /mnt/ &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; mkdir media_root
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Now, add an entry to your &lt;strong&gt;fstab&lt;/strong&gt; file to automatically mount the newly created SAMBA directory on your VM. Open the &lt;code&gt;fstab&lt;/code&gt; file with:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;1&lt;/span&gt;&lt;span class="cl"&gt;nano /etc/fstab
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Add the following entry to the file:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;1&lt;/span&gt;&lt;span class="cl"&gt;//&amp;lt;your_nas_ip&amp;gt;/media_root /mnt/media_root cifs _netdev,x-systemd.automount,noatime,uid&lt;span class="o"&gt;=&lt;/span&gt;1000,gid&lt;span class="o"&gt;=&lt;/span&gt;1000,dir_mode&lt;span class="o"&gt;=&lt;/span&gt;0770,file_mode&lt;span class="o"&gt;=&lt;/span&gt;0770,credentials&lt;span class="o"&gt;=&lt;/span&gt;/etc/smbcredentials
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Create a new credentials file in the &lt;code&gt;etc&lt;/code&gt; directory, in this we will save in plaintext the username and password used to connect to the SMB share:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;1&lt;/span&gt;&lt;span class="cl"&gt;nano /etc/smbcredentials
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The file shoud be in the following format:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;1&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="nv"&gt;username&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;xxxx
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;2&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="nv"&gt;password&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;xxxx
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;After creating the credential file, restart your VM:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;1&lt;/span&gt;&lt;span class="cl"&gt;reboot
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Once your VM is restarted, the &lt;code&gt;media_root&lt;/code&gt; folder should be mounted. I recommend setting up your folders by following the &lt;a href="https://trash-guides.info/Hardlinks/How-to-setup-for/Docker/"&gt;Trash folder structure guide&lt;/a&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;A final note is that the &lt;em&gt;arr-stack&lt;/em&gt; depends on &lt;em&gt;OpenMediaVault (OMV)&lt;/em&gt; already running, as it uses the Samba drives from &lt;em&gt;OMV&lt;/em&gt;. Therefore, you should change the reboot order: set &lt;em&gt;arr-stack&lt;/em&gt; to order 2 and &lt;em&gt;OMV&lt;/em&gt; to order 1. It’s advisable to add a slight delay to allow &lt;em&gt;OMV&lt;/em&gt; some time to set up before other services that depend on it start. You can do this by setting UP to, for example, 60, which means all VMs that come after it will start 60 seconds after &lt;em&gt;OpenMediaVault&lt;/em&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;


&lt;figure height="543px"&gt;
 &lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width:80%" src="https://monkemanx.github.io/attachments/arr_stack_boot.jpg"&gt;
 &lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width:80%" src="https://monkemanx.github.io/attachments/nas_boot.jpg"&gt;
&lt;/figure&gt;


&lt;p&gt;Now, you&amp;rsquo;re ready to create a &lt;strong&gt;Docker Compose&lt;/strong&gt; file for the arr-stack. Make sure to adjust the VPN settings in the &lt;strong&gt;Gluetun&lt;/strong&gt; service to match your specific VPN provider.&lt;/p&gt;
&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Arr Stack Docker Compose&lt;/summary&gt;
 
 &lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-yaml" data-lang="yaml"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 1&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="nt"&gt;services&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 2&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;gluetun&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 3&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;image&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;qmcgaw/gluetun&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 4&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;container_name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;gluetun&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 5&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;cap_add&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 6&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="l"&gt;NET_ADMIN&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 7&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;devices&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 8&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="l"&gt;/dev/net/tun:/dev/net/tun&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 9&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;ports&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 10&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="m"&gt;8888&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="m"&gt;8888&lt;/span&gt;&lt;span class="l"&gt;/tcp&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="c"&gt;# HTTP proxy&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 11&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="m"&gt;8388&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="m"&gt;8388&lt;/span&gt;&lt;span class="l"&gt;/tcp&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="c"&gt;# Shadowsocks&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 12&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="m"&gt;8388&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="m"&gt;8388&lt;/span&gt;&lt;span class="l"&gt;/udp&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="c"&gt;# Shadowsocks&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 13&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="m"&gt;8085&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="m"&gt;8085&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="c"&gt;# qbittorrent&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 14&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="m"&gt;6885&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="m"&gt;6881&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="c"&gt;# qbittorrent&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 15&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="m"&gt;6885&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="m"&gt;6881&lt;/span&gt;&lt;span class="l"&gt;/udp&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="c"&gt;# qbittorrent&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 16&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="m"&gt;7878&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="m"&gt;7878&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="c"&gt;# radarr&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 17&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="m"&gt;8989&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="m"&gt;8989&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="c"&gt;# sonarr&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 18&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="m"&gt;6767&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="m"&gt;6767&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="c"&gt;# bazarr&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 19&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="m"&gt;8686&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="m"&gt;8686&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="c"&gt;# lidarr&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 20&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;volumes&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 21&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="l"&gt;./gluetun:/gluetun&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 22&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;environment&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 23&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="c"&gt;# See https://github.com/qdm12/gluetun-wiki/tree/main/setup#setup&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 24&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="l"&gt;VPN_SERVICE_PROVIDER=&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 25&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="l"&gt;VPN_TYPE=openvpn&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 26&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="l"&gt;OPENVPN_USER=&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 27&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="l"&gt;OPENVPN_PASSWORD=&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 28&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="l"&gt;SERVER_COUNTRIES=Netherlands&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 29&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="c"&gt;# Timezone for accurate log times&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 30&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="l"&gt;TZ=Europe/Berlin&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 31&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="c"&gt;# Server list updater&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 32&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="c"&gt;# See https://github.com/qdm12/gluetun-wiki/blob/main/setup/servers.md#update-the-vpn-servers-list&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 33&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="l"&gt;UPDATER_PERIOD=24h&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 34&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 35&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;qbittorrent&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 36&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;image&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;lscr.io/linuxserver/qbittorrent:latest&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 37&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;container_name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;qbittorrent&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 38&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;env_file&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;arr-stack.env&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 39&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;network_mode&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;service:gluetun&amp;#34;&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 40&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;environment&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 41&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="l"&gt;WEBUI_PORT=8085&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 42&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;volumes&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 43&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="l"&gt;./qbittorrent/config:/config&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 44&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="l"&gt;/mnt/media_root/torrents/:/data/torrents/&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 45&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;restart&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;unless-stopped&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 46&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 47&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;radarr&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 48&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;image&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;lscr.io/linuxserver/radarr:latest&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 49&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;container_name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;radarr&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 50&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;env_file&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;arr-stack.env&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 51&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;network_mode&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;service:gluetun&amp;#34;&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 52&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;volumes&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 53&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="l"&gt;./radarr/config:/config&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 54&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="l"&gt;/mnt/media_root:/media_root/&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 55&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;restart&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;unless-stopped&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 56&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 57&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;sonarr&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 58&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;image&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;lscr.io/linuxserver/sonarr:latest&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 59&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;container_name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;sonarr&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 60&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;env_file&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;arr-stack.env&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 61&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;network_mode&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;service:gluetun&amp;#34;&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 62&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;volumes&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 63&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="l"&gt;./sonarr/config:/config&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 64&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="l"&gt;/mnt/media_root:/media_root/&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 65&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;restart&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;unless-stopped&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 66&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 67&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;lidarr&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 68&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;image&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;lscr.io/linuxserver/lidarr:latest&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 69&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;container_name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;lidarr&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 70&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;env_file&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;arr-stack.env&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 71&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;network_mode&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;service:gluetun&amp;#34;&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 72&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;volumes&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 73&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="l"&gt;./lidarr/config:/config&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 74&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="l"&gt;/mnt/media_root:/media_root/&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 75&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;restart&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;unless-stopped&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 76&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 77&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;bazarr&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 78&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;image&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;lscr.io/linuxserver/bazarr:latest&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 79&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;container_name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;bazarr&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 80&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;env_file&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;arr-stack.env&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 81&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;volumes&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 82&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="l"&gt;./bazarr/config:/config&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 83&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="l"&gt;/mnt/media_root:/media_root/&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 84&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;restart&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;unless-stopped&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 85&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 86&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 87&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;prowlarr&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 88&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;image&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;lscr.io/linuxserver/prowlarr:latest&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 89&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;container_name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;prowlarr&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 90&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;env_file&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;arr-stack.env&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 91&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;ports&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 92&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="m"&gt;9696&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="m"&gt;9696&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="c"&gt;# prowlarr&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 93&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;volumes&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 94&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="l"&gt;./prowlarr/config:/config&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 95&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="l"&gt;/mnt/media_root/torrents/:/data/torrents/&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 96&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;restart&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;unless-stopped&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 97&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 98&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 99&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="nt"&gt;flaresolverr&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;100&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;image&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;ghcr.io/flaresolverr/flaresolverr:latest&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;101&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;container_name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;flaresolverr&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;102&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;ports&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;103&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="m"&gt;8191&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="m"&gt;8191&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="c"&gt;# flaresolverr&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;104&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;environment&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;105&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="l"&gt;LOG_LEVEL=info&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;106&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;restart&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;unless-stopped&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
 
&lt;/details&gt;


&lt;p&gt;In addition to the &lt;code&gt;docker-compose.yaml&lt;/code&gt; file, you will also need a &lt;code&gt;.env&lt;/code&gt; file, which defines some environment-specific settings. Make sure to create this &lt;code&gt;.env&lt;/code&gt; file in the same directory as your &lt;code&gt;docker-compose.yaml&lt;/code&gt; file.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-env" data-lang="env"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;1&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;# this file is used to set environment variables for all the linuxserver images&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;2&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="nv"&gt;TZ&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;Europe/Berlin
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;3&lt;/span&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;4&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;# set to your own user id and group&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;5&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;# this is required for filesytem management&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;6&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;# use: `$ id $(whoami)` in terminal to find out&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;7&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="nv"&gt;PUID&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="m"&gt;1000&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;8&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="nv"&gt;PGID&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="m"&gt;1000&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;style&gt;
 .warning {
 background-color: #ffe4e1; 
 padding: 15px; 
 border-radius: 5px; 
 margin-bottom: 15px; 
 }

 .warning-title {
 font-size: 20px; 
 margin-bottom: 10px; 
 color: #8b0000; 
 font-weight: bold; 
 }
&lt;/style&gt;

&lt;div class="warning"&gt;
 &lt;div class="warning-title"&gt;Warning&lt;/div&gt;
 &lt;p&gt;It&amp;rsquo;s important to note that using the user with ID &lt;code&gt;1000&lt;/code&gt; for the arr-stack setup, which corresponds to the &lt;code&gt;root&lt;/code&gt; user (with administrative privileges), carries certain security implications.&lt;/p&gt;
&lt;/div&gt;

&lt;p&gt;You can now create the Docker container for the &lt;code&gt;arr-stack&lt;/code&gt; by running:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;1&lt;/span&gt;&lt;span class="cl"&gt;docker compose up -f arr-stack-compose.yaml up -d
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id="132-common-issues"&gt;13.2 Common Issues&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Docker Daemon Socket Permission Error&lt;/strong&gt;:
If you encounter the error &lt;code&gt;permission denied while trying to connect to the docker daemon socket&lt;/code&gt;, you can check the permissions of the Docker socket with the command:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;1&lt;/span&gt;&lt;span class="cl"&gt;ls -l /var/run/docker.sock
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;If the permissions appear broken, you can fix them with:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;1&lt;/span&gt;&lt;span class="cl"&gt;sudo chmod &lt;span class="m"&gt;666&lt;/span&gt; /var/run/docker.sock
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This command gives all users read and write permissions to the Docker socket, allowing non-root users to access Docker commands.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;File Permissions in &lt;code&gt;media_root&lt;/code&gt;&lt;/strong&gt;:
You need to ensure that your user has access to all directories inside the &lt;code&gt;media_root&lt;/code&gt; shared folder. This can be done with the following commands:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;1&lt;/span&gt;&lt;span class="cl"&gt;sudo chown -R &lt;span class="nv"&gt;$USER&lt;/span&gt;:&lt;span class="nv"&gt;$USER&lt;/span&gt; /data
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;2&lt;/span&gt;&lt;span class="cl"&gt;sudo chmod -R &lt;span class="nv"&gt;a&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;,a+rX,u+w,g+w /data
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;ul&gt;
&lt;li&gt;&lt;code&gt;chown&lt;/code&gt; sets the ownership of &lt;code&gt;/data&lt;/code&gt; to your current user.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;chmod&lt;/code&gt; sets appropriate permissions, allowing you to read, write, and execute as necessary.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;qBittorrent WebUI Authorization Error&lt;/strong&gt;:
When trying to connect to qBittorrent, you might get an error like &lt;code&gt;app is unauthorized&lt;/code&gt;. If you encounter this issue, refer to this &lt;a href="https://discourse.linuxserver.io/t/opening-qbittorrent-webui-via-dashboard-app-is-unauthorized-mismatched-ips/7363/3"&gt;forum article&lt;/a&gt; for guidance. Following its steps should resolve the authorization problem.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;












&lt;figure style="display: block; margin: 0 auto; width: 50%; "&gt;
 &lt;img
 src="https://monkemanx.github.io/attachments/500days.jpg"
 loading="lazy"
 width=""
 height=""
 alt="Image"
 style="display: block; width: 100%; height: 100%; object-fit: contain; "
 &gt;
 
 &lt;figcaption style="text-align: center; margin-top: 0.5rem;"&gt;&lt;i&gt;Completly unrelated, another cool movie poster.&lt;/i&gt;&lt;/figcaption&gt;
 
&lt;/figure&gt;

&lt;h2 id="133-quality-control"&gt;13.3 Quality Control&lt;/h2&gt;
&lt;p&gt;Maybe you have already requested some movies using &lt;em&gt;Radarr&lt;/em&gt; and have noticed that the files you are downloading are rather large—exceeding your requirements, especially if your storage is limited, like mine.&lt;/p&gt;
&lt;p&gt;The first thing you can do when requesting media is to change the quality profile. This will determine the quality of the media you download.&lt;/p&gt;












&lt;figure style="display: block; margin: 0 auto; width: 70%; "&gt;
 &lt;img
 src="https://monkemanx.github.io/attachments/request_movie.jpg"
 loading="lazy"
 width=""
 height=""
 alt="Image"
 style="display: block; width: 100%; height: 100%; object-fit: contain; "
 &gt;
 
&lt;/figure&gt;

&lt;p&gt;But maybe even after you&amp;rsquo;ve done this, the file is still too large. For this purpose, you can change what the quality profile means. To do this, navigate to &lt;code&gt;Settings -&amp;gt; Quality -&amp;gt; Quality Definition&lt;/code&gt;.
Here you will find quality labels that a media file can have. You can use the slider to set the minimum and maximum size for each file. For example, if the media size is too big, you can decrease the slider.&lt;/p&gt;












&lt;figure style="display: block; margin: 0 auto; width: 70%; "&gt;
 &lt;img
 src="https://monkemanx.github.io/attachments/quality_prfofile_radarr.jpg"
 loading="lazy"
 width=""
 height=""
 alt="Image"
 style="display: block; width: 100%; height: 100%; object-fit: contain; "
 &gt;
 
&lt;/figure&gt;

&lt;p&gt;For a more extensive elaboration on this topic, refer to the &lt;a href="https://trash-guides.info/"&gt;Trash Guide&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id="14-netflix-like-media-managment-with-jellyfin"&gt;14. Netflix like Media-Managment with Jellyfin&lt;/h2&gt;
&lt;p&gt;&lt;a href="https://jellyfin.org/"&gt;Jellyfin&lt;/a&gt; is a free, open-source media server that allows you to manage and stream your media collection, much like Netflix. It organizes and displays all your downloaded media in a user-friendly interface, keeping track of what you&amp;rsquo;ve watched, your progress, and additional information like cast details, IMDb scores, and more.&lt;/p&gt;
&lt;p&gt;Jellyfin integrates smoothly with the &lt;em&gt;arr-stack&lt;/em&gt;, which is responsible for the acquisition of media, whereas Jellyfin&amp;rsquo;s role is to manage and play back the already downloaded content. This way, your entire media management workflow is streamlined: from downloading media through the &lt;em&gt;arr-stack&lt;/em&gt; to consuming it through Jellyfin.&lt;/p&gt;


&lt;figure height="653px"&gt;
 &lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width:80%" src="https://monkemanx.github.io/attachments/jellyfin_movies.jpg"&gt;
 &lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width:80%" src="https://monkemanx.github.io/attachments/jellyfin_details.jpg"&gt;
&lt;/figure&gt;


&lt;h3 id="141-jellyfin-installation"&gt;14.1 Jellyfin: Installation&lt;/h3&gt;
&lt;p&gt;Just like with previously installed software like &lt;em&gt;Tandoor&lt;/em&gt; or &lt;em&gt;Homarr&lt;/em&gt;, we can use a &lt;a href="https://tteck.github.io/Proxmox/#jellyfin-media-server-lxc"&gt;Tteck script&lt;/a&gt; to easily install Jellyfin. However, setting up Jellyfin is a bit more complicated than in these two previous cases.&lt;/p&gt;
&lt;p&gt;The first thing to note is that an unprivileged container &lt;strong&gt;should&lt;/strong&gt; work, but you may encounter issues with hardware encoding. Personally, I opted for a privileged container because it simplifies the setup process for hardware acceleration and allows for direct mounting of Samba devices.&lt;/p&gt;
&lt;p&gt;If you prefer to use an unprivileged container, it is still possible to mount the Samba drive on the host machine (&lt;code&gt;pve&lt;/code&gt;) and utilize &lt;a href="https://pve.proxmox.com/wiki/Linux_Container#_bind_mount_points"&gt;LXC bind mounts&lt;/a&gt; to make it available in Jellyfin. I will demonstrate this technique for other software later in this article. Alternatively, you can check out &lt;a href="https://forum.proxmox.com/threads/tutorial-unprivileged-lxcs-mount-cifs-shares.101795/"&gt;this forum post&lt;/a&gt; for more information.&lt;/p&gt;
&lt;p&gt;To set up hardware encoding in Jellyfin, you can follow the &lt;a href="https://jellyfin.org/docs/general/administration/hardware-acceleration/intel/#lxc-on-proxmox"&gt;official guide&lt;/a&gt;. Remember, for this to work, IOMMU must be supported by your CPU and motherboard, and it needs to be enabled.&lt;/p&gt;
&lt;h4 id="1411-enabling-iommu"&gt;14.1.1 Enabling IOMMU&lt;/h4&gt;
&lt;p&gt;To enable IOMMU, we need to edit our boot configuration file:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;1&lt;/span&gt;&lt;span class="cl"&gt;nano /etc/default/grub
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Change the following line. This only works for Intel graphics cards; if your graphics card is from another manufacturer, you will need to research how to enable IOMMU for that specific card:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;1&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="nv"&gt;GRUB_CMDLINE_LINUX_DEFAULT&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;quiet intel_iommu=on&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;After this, we can update our GRUB configuration by running:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;1&lt;/span&gt;&lt;span class="cl"&gt;update-grub
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Next, edit the modules file:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;1&lt;/span&gt;&lt;span class="cl"&gt;nano /etc/modules
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Add the following modules:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;1&lt;/span&gt;&lt;span class="cl"&gt;vfio
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;2&lt;/span&gt;&lt;span class="cl"&gt;vfio_iommu_type1
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;3&lt;/span&gt;&lt;span class="cl"&gt;vfio_pci
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;4&lt;/span&gt;&lt;span class="cl"&gt;vfio_virqfd
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;After making these changes, reboot the server and run the following command to verify if IOMMU is successfully enabled:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;1&lt;/span&gt;&lt;span class="cl"&gt;dmesg &lt;span class="p"&gt;|&lt;/span&gt; grep -d DMAR -e IOMMU
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h4 id="1412-gpu-configuration"&gt;14.1.2 GPU Configuration&lt;/h4&gt;
&lt;p&gt;Type the following command into your shell to find your GPU&amp;rsquo;s address:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;1&lt;/span&gt;&lt;span class="cl"&gt;lspci -nnv &lt;span class="p"&gt;|&lt;/span&gt; grep VGA
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Here is an example output:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;1&lt;/span&gt;&lt;span class="cl"&gt;0:02.0 VGA compatible controller &lt;span class="o"&gt;[&lt;/span&gt;0300&lt;span class="o"&gt;]&lt;/span&gt;: Intel Corporation CoffeeLake-S GT2 &lt;span class="o"&gt;[&lt;/span&gt;UHD Graphics 630&lt;span class="o"&gt;]&lt;/span&gt; &lt;span class="o"&gt;[&lt;/span&gt;8086:3e92&lt;span class="o"&gt;]&lt;/span&gt; &lt;span class="o"&gt;(&lt;/span&gt;prog-if &lt;span class="m"&gt;00&lt;/span&gt; &lt;span class="o"&gt;[&lt;/span&gt;VGA controller&lt;span class="o"&gt;])&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Next, in Proxmox, navigate to &lt;code&gt;Datacenter -&amp;gt; Resource Mapping -&amp;gt; Add&lt;/code&gt; and add your GPU. It should look similar to this:&lt;/p&gt;












&lt;figure style="display: block; margin: 0 auto; width: 80%; "&gt;
 &lt;img
 src="https://monkemanx.github.io/attachments/ressource_mapping_ihpu.jpg"
 loading="lazy"
 width=""
 height=""
 alt="Image"
 style="display: block; width: 100%; height: 100%; object-fit: contain; "
 &gt;
 
&lt;/figure&gt;

&lt;h4 id="1413-setting-permissions"&gt;14.1.3 Setting Permissions&lt;/h4&gt;
&lt;style&gt;
 .info {
 background-color: #e6f7ff; 
 padding: 15px; 
 border-radius: 5px; 
 margin-bottom: 15px; 
 }

 .info-title {
 font-size: 20px; 
 margin-bottom: 10px; 
 color: #000080; 
 font-weight: bold; 
 }
&lt;/style&gt;

&lt;div class="info"&gt;
 &lt;div class="info-title"&gt;Info&lt;/div&gt;
 &lt;p&gt;&lt;p&gt;If you&amp;rsquo;re using an &lt;strong&gt;unprivileged&lt;/strong&gt; Jellyfin container, you&amp;rsquo;ll need to edit the LXC configuration file to give the container access to your graphics card for hardware-accelerated video playback. This can be done by adding the following lines to the LXC configuration file:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;1&lt;/span&gt;&lt;span class="cl"&gt;lxc.mount.entry: /dev/dri dev/dri none bind,optional,create&lt;span class="o"&gt;=&lt;/span&gt;dir
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;2&lt;/span&gt;&lt;span class="cl"&gt;lxc.mount.entry: /dev/dri/renderD128 dev/dri/renderD128 none bind,optional,create&lt;span class="o"&gt;=&lt;/span&gt;file
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/p&gt;
&lt;/div&gt;

&lt;p&gt;We need to ensure that our user has permission to access the graphics card. Enter the following commands in the host shell:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;1&lt;/span&gt;&lt;span class="cl"&gt;chmod -R &lt;span class="m"&gt;777&lt;/span&gt; /dev/dri
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Then, in the LXC container shell, run:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;1&lt;/span&gt;&lt;span class="cl"&gt;sudo usermod -aG render jellyfin
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;2&lt;/span&gt;&lt;span class="cl"&gt;sudo usermod -aG video jellyfin
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;These permissions will reset upon a reboot, so we need to make them persistent. To do this, edit the crontab file with:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;1&lt;/span&gt;&lt;span class="cl"&gt;crontab -e
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Then, add the following entry:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;1&lt;/span&gt;&lt;span class="cl"&gt;@reboot sleep &lt;span class="m"&gt;20&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; chmod -R &lt;span class="m"&gt;777&lt;/span&gt; /dev/dri
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;We add a delay because the graphics drivers may not be initialized yet.&lt;/p&gt;
&lt;p&gt;For more information, check out this &lt;a href="https://forum.proxmox.com/threads/guide-jellyfin-remote-network-shares-hw-transcoding-with-intels-qsv-unprivileged-lxc.142639/"&gt;forum post&lt;/a&gt; on the Proxmox forum.&lt;/p&gt;
&lt;h4 id="1414-testing-hardware-encoding"&gt;14.1.4 Testing Hardware Encoding&lt;/h4&gt;
&lt;p&gt;To ensure hardware encoding is working, run a movie that requires &lt;a href="https://corp.kaltura.com/blog/what-is-transcoding/#"&gt;transcoding&lt;/a&gt; and execute the following command in the shell:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;1&lt;/span&gt;&lt;span class="cl"&gt;intel_gpu_top
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;(Note: You need to install &lt;code&gt;intel-gpu-tools&lt;/code&gt; first and need to have a movie on your Jellyfin instance.) You should see some utilization of your graphics card.&lt;/p&gt;
&lt;p&gt;Another test to confirm hardware encoding is to run:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;1&lt;/span&gt;&lt;span class="cl"&gt;sudo -u jellyfin /usr/lib/jellyfin-ffmpeg/ffmpeg -v verbose -init_hw_device &lt;span class="nv"&gt;vaapi&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;va:/dev/dri/renderD128 -init_hw_device opencl@va
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;After running the previous command, you should receive an output that looks similar to this:&lt;/p&gt;












&lt;figure style="display: block; margin: 0 auto; width: 100%; "&gt;
 &lt;img
 src="https://monkemanx.github.io/attachments/jellyfin_hw_test.jpg"
 loading="lazy"
 width=""
 height=""
 alt="Image"
 style="display: block; width: 100%; height: 100%; object-fit: contain; "
 &gt;
 
&lt;/figure&gt;

&lt;h4 id="1415-giving-jellyfin-access-to-the-nas"&gt;14.1.5 Giving Jellyfin Access to the NAS&lt;/h4&gt;
&lt;p&gt;Since our data is on the &lt;strong&gt;data&lt;/strong&gt; ZFS dataset, we need to connect this ZFS dataset with our newly created Jellyfin LXC container.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Just like with the ARR-stack, Jellyfin should start after the NAS-VM.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;First, install &lt;code&gt;cifs-utils&lt;/code&gt;:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;1&lt;/span&gt;&lt;span class="cl"&gt;apt install cifs-utils
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Normally, you should be able to define the mount point of your SMB share in the host shell under &lt;code&gt;/etc/pve/lxc/your_lxc_container_id.conf&lt;/code&gt;. However, if this doesn&amp;rsquo;t work, you can use &lt;code&gt;crontab&lt;/code&gt;. Open it with:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;1&lt;/span&gt;&lt;span class="cl"&gt;crontab -e
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Then add the following line:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;1&lt;/span&gt;&lt;span class="cl"&gt;@reboot sleep &lt;span class="m"&gt;5&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; mount -t cifs //&amp;lt;your_nas_ip&amp;gt;/media_root /mnt/media_root -o ro,_netdev,x-systemd.automount,noatime,dir_mode&lt;span class="o"&gt;=&lt;/span&gt;0770,file_mode&lt;span class="o"&gt;=&lt;/span&gt;0770,credentials&lt;span class="o"&gt;=&lt;/span&gt;/etc/smbcredentials
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;&lt;em&gt;(The &lt;code&gt;ro&lt;/code&gt; option means read-only; Jellyfin shouldn&amp;rsquo;t need write access to our media.)&lt;/em&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The mounted directory will be owned by root, so we need to give Jellyfin permission to access it:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;1&lt;/span&gt;&lt;span class="cl"&gt;usermod -aG root jellyfin
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;&lt;em&gt;(Be careful; this has security implications, as you are essentially giving Jellyfin root access.)&lt;/em&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;You can test if Jellyfin has access by running the following command:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;1&lt;/span&gt;&lt;span class="cl"&gt;sudo -u jellyfin ls /mnt/media_root
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;h3 id="142-jellyfin-final-note"&gt;14.2 Jellyfin: Final Note&lt;/h3&gt;
&lt;p&gt;When creating your media library, you should enable the &lt;code&gt;NFO&lt;/code&gt; option, which will save metadata locally. This is necessary because we didn&amp;rsquo;t grant Jellyfin write access to the &lt;code&gt;media_root&lt;/code&gt; directory.&lt;/p&gt;












&lt;figure style="display: block; margin: 0 auto; width: 80%; "&gt;
 &lt;img
 src="https://monkemanx.github.io/attachments/cat7.jpg"
 loading="lazy"
 width=""
 height=""
 alt="Image"
 style="display: block; width: 100%; height: 100%; object-fit: contain; "
 &gt;
 
 &lt;figcaption style="text-align: center; margin-top: 0.5rem;"&gt;&lt;i&gt;A picture of a cat inside a server, has nothing to do Jellyfin.&lt;/i&gt;&lt;/figcaption&gt;
 
&lt;/figure&gt;

&lt;h2 id="15-synchronize-files-across-multiple-devices-with-syncthing"&gt;15. Synchronize Files Across Multiple Devices with Syncthing&lt;/h2&gt;
&lt;p&gt;I already talked about &lt;a href="https://monkemanx.github.io/articles/my_homelab_part_6_syncthing/"&gt;Syncthing&lt;/a&gt; in a prior post, which I recommend checking out for more information.&lt;/p&gt;
&lt;p&gt;To recap, Syncthing is a synchronization service that allows you to sync files across multiple devices. I personally use it to synchronize my written notes across all my devices.&lt;/p&gt;












&lt;figure style="display: block; margin: 0 auto; width: 80%; "&gt;
 &lt;img
 src="https://monkemanx.github.io/attachments/synthing.jpg"
 loading="lazy"
 width=""
 height=""
 alt="Image"
 style="display: block; width: 100%; height: 100%; object-fit: contain; "
 &gt;
 
&lt;/figure&gt;

&lt;h3 id="151-syncthing-installation"&gt;15.1 Syncthing: Installation&lt;/h3&gt;
&lt;p&gt;As luck would have it, there is a &lt;a href="https://tteck.github.io/Proxmox/#syncthing-lxc"&gt;TTeck script&lt;/a&gt; that we can use for the installation process.&lt;/p&gt;
&lt;p&gt;After this, we need to change one last thing. We created the &lt;em&gt;local&lt;/em&gt; SSD ZFS dataset and the &lt;em&gt;data&lt;/em&gt; HDD ZFS dataset to separate where we save our software and their associated configuration files (on the &lt;em&gt;local&lt;/em&gt; dataset) from where we save the actual data (on the &lt;em&gt;data&lt;/em&gt; dataset), e.g., movies in the case of the Arr-Stack.&lt;/p&gt;
&lt;p&gt;We want to do the same with Syncthing, where we save our data on an SMB share of OMV, while the software itself is stored on the &lt;em&gt;local&lt;/em&gt; dataset. To achieve this, during the installation process, choose to use the &lt;em&gt;local&lt;/em&gt; dataset for installation.&lt;/p&gt;
&lt;p&gt;Once the installation is complete, we can add our SMB share to the LXC container. To do that, we will use &lt;a href="https://pve.proxmox.com/wiki/Linux_Container#_bind_mount_points"&gt;LXC bind mounts&lt;/a&gt;.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Open the OpenMediaVault web interface and create a new shared folder, which I’ll call &lt;code&gt;syncthing&lt;/code&gt;. Navigate to &lt;code&gt;Storage -&amp;gt; Shared Folder -&amp;gt; Create&lt;/code&gt;. After creating it, you’ll need to share the folder: go to &lt;code&gt;Services -&amp;gt; SMB -&amp;gt; Shares -&amp;gt; Create&lt;/code&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Next, create a new user with read-write permission to access this shared folder: &lt;code&gt;Users -&amp;gt; Users -&amp;gt; Create&lt;/code&gt;. To grant the user access to the new share, go to &lt;code&gt;Storage -&amp;gt; Shared Folders -&amp;gt; Select the correct folder -&amp;gt; Permissions&lt;/code&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;With OMV configured, create a &lt;code&gt;syncthing&lt;/code&gt; folder (or whatever you named your shared folder) in both the host system and the LXC container, under the &lt;code&gt;/mnt&lt;/code&gt; directory.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Now, we need to mount the folder to our local machine (&lt;code&gt;PVE&lt;/code&gt;). To do this, edit the &lt;code&gt;fstab&lt;/code&gt; file using &lt;code&gt;nano /etc/fstab&lt;/code&gt; on the host machine and add the following entry:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;1&lt;/span&gt;&lt;span class="cl"&gt;//&amp;lt;your_nas_ip&amp;gt;/syncthing /mnt/lxc_shares/syncthing cifs _netdev,x-systemd.automount,noatime,nobrl,uid&lt;span class="o"&gt;=&lt;/span&gt;100000,gid&lt;span class="o"&gt;=&lt;/span&gt;110000,dir_mode&lt;span class="o"&gt;=&lt;/span&gt;0770,file_mode&lt;span class="o"&gt;=&lt;/span&gt;0770,credentials&lt;span class="o"&gt;=&lt;/span&gt;/etc/smbcredentials_syncthing &lt;span class="m"&gt;0&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;In this example, I mounted the folder inside the &lt;code&gt;lxc_share&lt;/code&gt; directory. If you chose a different directory, adjust the path accordingly.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Inside the &lt;code&gt;/etc&lt;/code&gt; directory on your host machine, create an &lt;code&gt;smbcredentials&lt;/code&gt; file and add the username and password, just like we did with the Arr-Stack setup.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Find the ID of your LXC container. You can check this in the Proxmox sidebar where it will be displayed next to the container&amp;rsquo;s name.&lt;/p&gt;

 
 
 
 
 
 
 
 
 
 
 
 &lt;figure style="display: block; margin: 0 auto; width: 30%; "&gt;
 &lt;img
 src="https://monkemanx.github.io/attachments/proxmox_id.jpg"
 loading="lazy"
 width=""
 height=""
 alt="Image"
 style="display: block; width: 100%; height: 100%; object-fit: contain; "
 &gt;
 
 &lt;/figure&gt;

&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Now, edit the LXC configuration file by running:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;1&lt;/span&gt;&lt;span class="cl"&gt;nano /etc/pve/lxc/&amp;lt;your_syncthing_id&amp;gt;.conf
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Add the following entry:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;1&lt;/span&gt;&lt;span class="cl"&gt;mp0: /mnt/lxc_shares/syncthing,mp&lt;span class="o"&gt;=&lt;/span&gt;/mnt/syncthing
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This will allow the SMB drive from the host machine to be accessed inside the Syncthing LXC container.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Reboot the LXC container, and you should now be able to access the mounted &lt;code&gt;syncthing&lt;/code&gt; folder inside the LXC container.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Lastly, since this LXC container depends on OMV, don’t forget to change the boot priority of this container to 2.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;You should now be able to add your sync folder and syncrhonize them across devices.&lt;/p&gt;
&lt;h2 id="16-document-management-with-paperless-ngx"&gt;16. Document Management with Paperless-NGX&lt;/h2&gt;
&lt;blockquote&gt;
&lt;p&gt;Are your shelves overflowing with paper documents like car insurance, health insurance forms, or bank statements? Do you find yourself spending too much time rummaging through stacks of folders, hopelessly searching for that one important document? Worse yet, are you tired of manually copying details from physical papers to your digital files?&lt;/p&gt;
&lt;p&gt;Introducing &lt;a href="https://docs.paperless-ngx.com/"&gt;Paperless-Ngx&lt;/a&gt;, the open-source solution designed to simplify your document management. Say goodbye to the clutter of physical paperwork and the headache of searching through piles of folders.&lt;/p&gt;
&lt;p&gt;With Paperless-Ngx, you can automatically import documents from various sources, converting them into neatly organized, searchable PDFs that are stored securely on your own server—completely free from third-party access. No more data being transmitted elsewhere!&lt;/p&gt;
&lt;p&gt;Our powerful OCR (Optical Character Recognition) feature ensures that even scanned images are transformed into fully searchable text, allowing you to find exactly what you need, when you need it. Supporting over 100 languages, Paperless-Ngx ensures global functionality, so you’ll never be left searching aimlessly again.&lt;/p&gt;
&lt;p&gt;Ready to regain control over &lt;strong&gt;your&lt;/strong&gt; documents? Download Paperless-Ngx today.Completely free and see how easy it is to take back your space and sanity.&lt;/p&gt;
&lt;/blockquote&gt;












&lt;figure style="display: block; margin: 0 auto; width: 100%; "&gt;
 &lt;img
 src="https://monkemanx.github.io/attachments/documents-smallcards-dark.png"
 loading="lazy"
 width=""
 height=""
 alt="Image"
 style="display: block; width: 100%; height: 100%; object-fit: contain; "
 &gt;
 
&lt;/figure&gt;

&lt;h3 id="161-paperless-ngx-installation"&gt;16.1 Paperless-Ngx: Installation&lt;/h3&gt;
&lt;p&gt;Installation is very easy thanks to the &lt;a href="https://tteck.github.io/Proxmox/#paperless-ngx-lxc"&gt;TTeck script&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;If, after installation, you encounter the error: &amp;ldquo;&lt;code&gt;CSRF verification failed&lt;/code&gt;&amp;rdquo;, it could be due to your reverse proxy. To fix this, go to &lt;code&gt;/opt/paperless/paperless.conf&lt;/code&gt; and set &lt;code&gt;PAPERLESS_URL&lt;/code&gt; to your reverse proxy URL.&lt;/p&gt;
&lt;p&gt;As with previous software, we want to save our files on the &lt;em&gt;data&lt;/em&gt; ZFS dataset. To do this, create a new shared folder in OMV, add a new user with permission to access it, and then add the SMB share to the &lt;code&gt;fstab&lt;/code&gt; of the host machine. Afterward, edit the LXC config file to bind the SMB share from the host machine to the LXC container.
And as always, don&amp;rsquo;t forget to change the boot order of Paperless-NGX to 2.
If you need additional information about any of these tips, check out the prior section on Syncthing.&lt;/p&gt;
&lt;p&gt;As an additional tip, there is a &lt;a href="https://github.com/astubenbord/paperless-mobile"&gt;Paperless app&lt;/a&gt; available on Android for browsing your documents.&lt;/p&gt;
&lt;h2 id="17-accessing-our-services-from-outside-our-local-network-with-wg-easy"&gt;17. Accessing Our Services from Outside Our Local Network with WG-Easy&lt;/h2&gt;
&lt;p&gt;We have installed many services, such as Tandoor, Syncthing, and Paperless-NGX, but so far, we can only access them within our local network. However, there may be times when we want to access these services from outside our local network without exposing them directly to the internet, which could leave us vulnerable to cyber attacks.&lt;/p&gt;
&lt;p&gt;To address this, we can host our own VPN with &lt;a href="https://github.com/wg-easy/wg-easy"&gt;WG-Easy&lt;/a&gt;, which tunnels all our network activity when we&amp;rsquo;re outside our local network. I also considered using &lt;a href="https://tailscale.com/"&gt;Tailscale&lt;/a&gt;, which has a nicer and easier interface. However, their free plan only allows a limited number of users. If you’re okay with this limitation, I highly recommend Tailscale.&lt;/p&gt;












&lt;figure style="display: block; margin: 0 auto; width: 60%; "&gt;
 &lt;img
 src="https://monkemanx.github.io/attachments/wg-easy.png"
 loading="lazy"
 width=""
 height=""
 alt="Image"
 style="display: block; width: 100%; height: 100%; object-fit: contain; "
 &gt;
 
 &lt;figcaption style="text-align: center; margin-top: 0.5rem;"&gt;&lt;i&gt;Wg-easy dashboard.&lt;/i&gt;&lt;/figcaption&gt;
 
&lt;/figure&gt;

&lt;h3 id="171-wg-easy-installation"&gt;17.1 Wg-easy: Installation&lt;/h3&gt;
&lt;p&gt;There is no direct TTeck script for WG-Easy, but like we did with &lt;em&gt;FreshRSS&lt;/em&gt;, we can use the &lt;a href="https://tteck.github.io/Proxmox/#docker-lxc"&gt;TTeck Docker script&lt;/a&gt;. You only need to install Docker Compose when prompted by the script; the other software is not required.&lt;/p&gt;
&lt;p&gt;After the installation is complete, we can rename the hostname of the container to clarify what service this container is for. To do this, go to &lt;code&gt;New LXC Container -&amp;gt; DNS -&amp;gt; Hostname&lt;/code&gt;. We also do not need two processors, which is the default setting of the script; you can change that by going to &lt;code&gt;New LXC Container -&amp;gt; Resources -&amp;gt; Cores&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;The first thing we need to do is create a new domain. This time, unlike before, this domain needs to point to our &lt;strong&gt;external&lt;/strong&gt; IP address. This is necessary so that we can always use the same domain to connect to our VPN instead of using the IP address.&lt;/p&gt;
&lt;p&gt;Just like last time, I used DuckDNS again, but this time I left the default IP address that was already written in it. Sometimes your IP can change; for example, this can happen if you have a dynamic IP. Because of this, we need to regularly update the IP address that the DuckDNS domain points to. For this, we can use a &lt;a href="https://www.duckdns.org/install.jsp"&gt;Linux cron&lt;/a&gt; script from their website. Just follow the instructions on their page and install it on the host machine (&lt;code&gt;PVE&lt;/code&gt;).&lt;/p&gt;
&lt;p&gt;Now, we can use the following Docker Compose script:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-yaml" data-lang="yaml"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 1&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="nt"&gt;volumes&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 2&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;etc_wireguard&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 3&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 4&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="nt"&gt;services&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 5&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;wg-easy&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 6&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;environment&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 7&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="c"&gt;# Change Language:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 8&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="c"&gt;# (Supports: en, ua, ru, tr, no, pl, fr, de, ca, es, ko, vi, nl, is, pt, chs, cht, it, th, hi)&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 9&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="l"&gt;LANG=en&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;10&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="c"&gt;# ⚠️ Required:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;11&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="c"&gt;# Change this to your host&amp;#39;s public address&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;12&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="l"&gt;WG_HOST=&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;13&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="l"&gt;PASSWORD_HASH=&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;14&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;15&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;image&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;ghcr.io/wg-easy/wg-easy&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;16&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;container_name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;wg-easy&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;17&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;volumes&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;18&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="l"&gt;etc_wireguard:/etc/wireguard&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;19&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;ports&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;20&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="s2"&gt;&amp;#34;51820:51820/udp&amp;#34;&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;21&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="s2"&gt;&amp;#34;51821:51821/tcp&amp;#34;&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;22&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;restart&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;unless-stopped&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;23&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;cap_add&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;24&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="l"&gt;NET_ADMIN&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;25&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="l"&gt;SYS_MODULE&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;26&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="c"&gt;# - NET_RAW # ⚠️ Uncomment if using Podman&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;27&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;sysctls&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;28&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="l"&gt;net.ipv4.ip_forward=1&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;29&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="l"&gt;net.ipv4.conf.all.src_valid_mark=1&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;There are two important parameters you need to change: &lt;code&gt;WG_HOST&lt;/code&gt;, which should equal the new domain you created, and &lt;code&gt;PASSWORD_HASH&lt;/code&gt;. For this, use the following &lt;a href="https://github.com/wg-easy/wg-easy/blob/master/How_to_generate_an_bcrypt_hash.md"&gt;guide&lt;/a&gt; to generate the password hash.&lt;/p&gt;
&lt;p&gt;After that, you can start the software with &lt;code&gt;docker compose up -f &amp;lt;name&amp;gt; -d&lt;/code&gt;. It is important when using Nginx Proxy Manager to still use the standard domain, not the new domain, because the standard domain is for internal use.&lt;/p&gt;
&lt;p&gt;The last thing you need to do is forward port &lt;code&gt;51820&lt;/code&gt; of your &lt;code&gt;docker-wgeasy&lt;/code&gt; container, not of the host machine.&lt;/p&gt;
&lt;p&gt;For more information refer to my &lt;a href="https://monkemanx.github.io/articles/my_homelab_part_4_wireguard_vpn/"&gt;prior article&lt;/a&gt; on this subject.&lt;/p&gt;
&lt;h2 id="18-book-managment-with-calibre-web-automated-and-audiobookshelvf"&gt;18. Book Managment with Calibre-Web Automated and Audiobookshelvf&lt;/h2&gt;
&lt;p&gt;&lt;a href="https://github.com/crocodilestick/Calibre-Web-Automated"&gt;Calibre-Web Automated&lt;/a&gt;, which is based on &lt;a href="https://calibre-ebook.com/"&gt;Calibre&lt;/a&gt; and &lt;a href="https://github.com/janeczku/calibre-web"&gt;Calibre-Web&lt;/a&gt;, is a book management software that allows you to read books, rate them, view their metadata, create book lists, send books to an e-reader, and enjoy many other features.&lt;/p&gt;












&lt;figure style="display: block; margin: 0 auto; width: 80%; "&gt;
 &lt;img
 src="https://monkemanx.github.io/attachments/calibre_automated.jpg"
 loading="lazy"
 width=""
 height=""
 alt="Image"
 style="display: block; width: 100%; height: 100%; object-fit: contain; "
 &gt;
 
&lt;/figure&gt;

&lt;p&gt;&lt;a href="https://www.audiobookshelf.org/"&gt;Audiobookshelf&lt;/a&gt;, similar to Calibre, is an audiobook management software that offers a range of features. It allows you to organize your audiobook collection, stream audiobooks to different devices, track your listening progress, and customize metadata. Additionally, it supports multiple users, making it perfect for shared libraries.&lt;/p&gt;












&lt;figure style="display: block; margin: 0 auto; width: 80%; "&gt;
 &lt;img
 src="https://monkemanx.github.io/attachments/audiobookshelf.png"
 loading="lazy"
 width=""
 height=""
 alt="Image"
 style="display: block; width: 100%; height: 100%; object-fit: contain; "
 &gt;
 
 &lt;figcaption style="text-align: center; margin-top: 0.5rem;"&gt;&lt;i&gt;Image is from geek-cookbook.&lt;/i&gt;&lt;/figcaption&gt;
 
&lt;/figure&gt;

&lt;p&gt;In addition to both of these software, I will use &lt;a href="https://github.com/Readarr/Readarr"&gt;Readarr&lt;/a&gt;, &lt;em&gt;Prowlarr&lt;/em&gt;, &lt;em&gt;gluetune&lt;/em&gt;, and &lt;em&gt;qBittorrent&lt;/em&gt; to create a setup similar to my *Arr-Stack. This will allow me to automatically torrent e-books and audiobooks, streamlining the process just like I do with other media.&lt;/p&gt;
&lt;h3 id="181-calibre-web-automated-and-audiobookshelf-installation"&gt;18.1 Calibre-Web Automated and Audiobookshelf: Installation&lt;/h3&gt;
&lt;p&gt;Just like with &lt;em&gt;WG-Easy&lt;/em&gt;, there isn&amp;rsquo;t a direct TTeck script available for this. Instead, we’ll use the &lt;a href="https://tteck.github.io/Proxmox/#docker-lxc"&gt;TTeck Docker script&lt;/a&gt; and install the software via Docker.&lt;/p&gt;
&lt;p&gt;If you want to store your books on the &lt;em&gt;data&lt;/em&gt; ZFS dataset, you can follow the same process we used for Syncthing. If you go this route, as always, remember to change the boot order to 2. Personally, I created two shared folders—one for books and another for audiobooks.&lt;/p&gt;
&lt;p&gt;When initializing Calibre, the software requires an empty library that it can populate in order to function properly, so make sure you have that ready. You can read more about this in my &lt;a href="https://monkemanx.github.io/articles/my_homelab_part_3_calibre/"&gt;old blog post&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;You can use the following Docker Compose setup:
&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Book *Arr-Stack&lt;/summary&gt;
 
 &lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-yaml" data-lang="yaml"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 1&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="nt"&gt;services&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 2&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;gluetun&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 3&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;image&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;qmcgaw/gluetun&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 4&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;container_name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;gluetun&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 5&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;cap_add&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 6&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="l"&gt;NET_ADMIN&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 7&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;devices&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 8&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="l"&gt;/dev/net/tun:/dev/net/tun&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 9&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;ports&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 10&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="m"&gt;8888&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="m"&gt;8888&lt;/span&gt;&lt;span class="l"&gt;/tcp&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="c"&gt;# HTTP proxy&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 11&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="m"&gt;8388&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="m"&gt;8388&lt;/span&gt;&lt;span class="l"&gt;/tcp&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="c"&gt;# Shadowsocks&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 12&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="m"&gt;8388&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="m"&gt;8388&lt;/span&gt;&lt;span class="l"&gt;/udp&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="c"&gt;# Shadowsocks&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 13&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="m"&gt;8080&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="m"&gt;8080&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="c"&gt;# qbittorrent&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 14&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="m"&gt;41957&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="m"&gt;41957&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="c"&gt;# qbittorrent&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 15&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="m"&gt;41957&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="m"&gt;41957&lt;/span&gt;&lt;span class="l"&gt;/udp&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="c"&gt;# qbittorrent&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 16&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;volumes&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 17&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="l"&gt;./gluetun:/gluetun&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 18&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;environment&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 19&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="c"&gt;# See https://github.com/qdm12/gluetun-wiki/tree/main/setup#setup&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 20&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="l"&gt;VPN_SERVICE_PROVIDER=&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 21&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="l"&gt;VPN_TYPE=&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 22&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="l"&gt;SERVER_NAMES=&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 23&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="c"&gt;# Timezone for accurate log times&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 24&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="l"&gt;TZ=Europe/Berlin&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 25&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="c"&gt;# Server list updater&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 26&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="c"&gt;# See https://github.com/qdm12/gluetun-wiki/blob/main/setup/servers.md#update-the-vpn-servers-list&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 27&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="l"&gt;UPDATER_PERIOD=24h&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 28&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 29&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;calibre-web-automated&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 30&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;image&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;crocodilestick/calibre-web-automated:latest&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 31&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;container_name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;calibre-web-automated&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 32&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;environment&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 33&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="l"&gt;PUID=0&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 34&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="l"&gt;PGID=0&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 35&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="l"&gt;TZ=UTC&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 36&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="l"&gt;DOCKER_MODS=linuxserver/mods:universal-calibre&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 37&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;volumes&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 38&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="l"&gt;./calibre/config:/config&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 39&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="l"&gt;./calibre/book-ingest:/cwa-book-ingest&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 40&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="l"&gt;/mnt/calibre/libary:/calibre-library&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 41&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;ports&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 42&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="m"&gt;8084&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="m"&gt;8083&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="c"&gt;# Change the first number to change the port you want to access the Web UI, not the second&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 43&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;restart&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;unless-stopped&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 44&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 45&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;qbittorrent&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 46&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;image&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;lscr.io/linuxserver/qbittorrent:4.6.6&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 47&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;network_mode&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;service:gluetun&amp;#34;&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 48&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;container_name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;qbittorrent&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 49&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;environment&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 50&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="l"&gt;PUID=0&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 51&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="l"&gt;PGID=0&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 52&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="l"&gt;TZ=Etc/UTC&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 53&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="l"&gt;WEBUI_PORT=8080&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 54&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="l"&gt;TORRENTING_PORT=41957&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 55&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;volumes&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 56&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="l"&gt;/mnt/audiobookshelf/audiobooks:/audiobooks&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 57&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="l"&gt;./calibre/book-ingest:/cwa-book-ingest&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 58&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="l"&gt;./qbittorrent/scripts:/scripts&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 59&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="l"&gt;./qbittorrent/appdata:/config&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 60&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="l"&gt;./qbittorrent/downloads:/downloads&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="c"&gt;#optional&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 61&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;restart&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;unless-stopped&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 62&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 63&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;audiobookshelf&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 64&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;image&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;ghcr.io/advplyr/audiobookshelf:latest&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 65&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="c"&gt;# ABS runs on port 13378 by default. If you want to change&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 66&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="c"&gt;# the port, only change the external port, not the internal port&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 67&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;ports&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 68&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="m"&gt;13378&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="m"&gt;80&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 69&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;volumes&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 70&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="c"&gt;# These volumes are needed to keep your library persistent&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 71&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="c"&gt;# and allow media to be accessed by the ABS server.&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 72&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="c"&gt;# The path to the left of the colon is the path on your computer,&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 73&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="c"&gt;# and the path to the right of the colon is where the data is&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 74&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="c"&gt;# available to ABS in Docker.&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 75&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="c"&gt;# You can change these media directories or add as many as you want&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 76&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="l"&gt;/mnt/audiobookshelf/audiobooks:/audiobooks&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 77&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="l"&gt;/mnt/audiobookshelf/podcasts:/podcasts&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 78&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="c"&gt;# The metadata directory can be stored anywhere on your computer&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 79&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="l"&gt;./audiobookshelf/metadata:/metadata&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 80&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="c"&gt;# The config directory needs to be on the same physical machine&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 81&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="c"&gt;# you are running ABS on&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 82&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="l"&gt;./audiobookshelf/config:/config&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 83&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;restart&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;unless-stopped&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 84&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="c"&gt;# You can use the following environment variable to run the ABS&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 85&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="c"&gt;# docker container as a specific user. You will need to change&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 86&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="c"&gt;# the UID and GID to the correct values for your user.&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 87&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;environment&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 88&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="l"&gt;user=0:0&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 89&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 90&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;prowlarr&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 91&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;image&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;lscr.io/linuxserver/prowlarr:latest&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 92&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;container_name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;prowlarr&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 93&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;environment&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 94&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="l"&gt;PUID=0&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 95&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="l"&gt;PGID=0&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 96&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="l"&gt;TZ=Etc/UTC&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 97&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;volumes&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 98&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="l"&gt;./prowlarr/data:/config&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 99&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;ports&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;100&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="m"&gt;9696&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="m"&gt;9696&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;101&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;restart&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;unless-stopped&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
 
&lt;/details&gt;

&lt;/p&gt;
&lt;p&gt;Make sure to configure the VPN settings for Gluetun or remove Gluetun from the Docker Compose file. Additionally, double-check the volumes to ensure they match your setup if you&amp;rsquo;re not using the same configuration as mine.
I set the version of qBittorrent to 4.6.6 because I was using &lt;a href="https://www.myanonamouse.net/"&gt;MyAnonamouse&lt;/a&gt;, a &lt;a href="https://www.reddit.com/r/torrents/comments/174b1d/what_are_private_trackers_and_how_do_they_work/"&gt;private tracker&lt;/a&gt; that, at the time, didn&amp;rsquo;t allow higher qBittorrent versions. I highly recommend myanommouse, it&amp;rsquo;s not very hard to get into and offers a wide range of books. If you don’t plan on joining MyAnonamouse, you can replace &lt;code&gt;image: lscr.io/linuxserver/qbittorrent:4.6.6&lt;/code&gt; with &lt;code&gt;image: lscr.io/linuxserver/qbittorrent:latest&lt;/code&gt; in the Docker Compose file.&lt;/p&gt;
&lt;style&gt;
 .warning {
 background-color: #ffe4e1; 
 padding: 15px; 
 border-radius: 5px; 
 margin-bottom: 15px; 
 }

 .warning-title {
 font-size: 20px; 
 margin-bottom: 10px; 
 color: #8b0000; 
 font-weight: bold; 
 }
&lt;/style&gt;

&lt;div class="warning"&gt;
 &lt;div class="warning-title"&gt;Warning&lt;/div&gt;
 &lt;p&gt;I set &lt;code&gt;PUID&lt;/code&gt; and &lt;code&gt;GID&lt;/code&gt; to &lt;code&gt;0&lt;/code&gt;, which essentially gives the container root-level access. While this simplifies permissions management, it also has significant security implications, as it could potentially expose your system to vulnerabilities or unauthorized access. If security is a priority, consider using a non-root user by setting the appropriate &lt;code&gt;PUID&lt;/code&gt; and &lt;code&gt;GID&lt;/code&gt; values for better isolation and protection.&lt;/p&gt;
&lt;/div&gt;

&lt;p&gt;For post-installation steps, follow the &lt;a href="https://github.com/crocodilestick/Calibre-Web-Automated"&gt;official Calibre-Web Automated guide&lt;/a&gt;. You should change the default username and set the location of your database to ensure proper functionality.&lt;/p&gt;
&lt;p&gt;For qBittorrent, the default username is &lt;em&gt;admin&lt;/em&gt;, and you’ll find the password inside the Docker logs. After logging in, make sure to change the default credentials. I also recommend setting a speed limit to prevent bandwidth issues.&lt;/p&gt;
&lt;p&gt;In Prowlarr, you need to add Readarr as a connection. You can do this by navigating to &lt;code&gt;Settings -&amp;gt; Apps -&amp;gt; Readarr&lt;/code&gt;. Additionally, add qBittorrent as your download client. After this, you&amp;rsquo;ll want to add some book trackers in Proxmox, which will automatically sync to Readarr.&lt;/p&gt;












&lt;figure style="display: block; margin: 0 auto; width: 80%; "&gt;
 &lt;img
 src="https://monkemanx.github.io/attachments/prowlarr.jpg"
 loading="lazy"
 width=""
 height=""
 alt="Image"
 style="display: block; width: 100%; height: 100%; object-fit: contain; "
 &gt;
 
&lt;/figure&gt;

&lt;p&gt;When setting up a reverse proxy for these services, ensure you enable WebSocket support for Audiobookshelf.&lt;/p&gt;
&lt;p&gt;The last step is to ensure that books and audiobooks are downloaded to the correct folders. To do this, go to Prowlarr and add two categories: &lt;code&gt;audiobookshelf&lt;/code&gt; and &lt;code&gt;books&lt;/code&gt;. Navigate to &lt;code&gt;Settings -&amp;gt; Download Clients -&amp;gt; qBittorrent -&amp;gt; Mapped Categories&lt;/code&gt; and configure them accordingly.&lt;/p&gt;


&lt;figure height="1010px"&gt;
 &lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width:80%" src="https://monkemanx.github.io/attachments/prowlarr_category.jpg"&gt;
 &lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width:80%" src="https://monkemanx.github.io/attachments/prowlarr_books.jpg"&gt;
 &lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width:80%" src="https://monkemanx.github.io/attachments/prowlarr_audiobooks.jpg"&gt;
&lt;/figure&gt;


&lt;p&gt;Once completed, you should see these categories on the sidebar in qBittorrent. For the audiobook category, set the download folder to &lt;code&gt;/audiobooks&lt;/code&gt;, and for books, choose &lt;code&gt;/downloads&lt;/code&gt;. Books saved in the &lt;code&gt;cwa-ingest&lt;/code&gt; folder will be imported and deleted automatically, which means they can&amp;rsquo;t be seeded.&lt;/p&gt;
&lt;p&gt;To ensure books are moved to the correct folder after downloading, go to qBittorrent&amp;rsquo;s settings and add an external program to run when downloads are finished: &lt;code&gt;cp -r &amp;quot;%F&amp;quot; &amp;quot;/cwa-book-ingest&amp;quot;&lt;/code&gt;. This will automatically copy the book to Calibre while still allowing you to seed it in qBittorrent.&lt;/p&gt;












&lt;figure style="display: block; margin: 0 auto; width: 80%; "&gt;
 &lt;img
 src="https://monkemanx.github.io/attachments/qbittorent_external_programm.jpg"
 loading="lazy"
 width=""
 height=""
 alt="Image"
 style="display: block; width: 100%; height: 100%; object-fit: contain; "
 &gt;
 
&lt;/figure&gt;

&lt;p&gt;Now, whenever you search for a book on Prowlarr, it should automatically download to the correct folder and show up in both Audiobookshelf and Calibre-Web.&lt;/p&gt;
&lt;h2 id="19-immich"&gt;19. Immich&lt;/h2&gt;
&lt;p&gt;&lt;a href="https://immich.app/"&gt;Immich&lt;/a&gt; is an open-source image management software designed for self-hosting on local servers. It provides a user experience similar to Google Photos, offering features such as automatic photo backup, organization, sharing, and search capabilities. Immich supports a range of functionalities like facial recognition, location tagging, and album creation, a versatile tool for managing personal photos without relying on cloud-based services.&lt;/p&gt;












&lt;figure style="display: block; margin: 0 auto; width: 80%; "&gt;
 &lt;img
 src="https://monkemanx.github.io/attachments/immich.webp"
 loading="lazy"
 width=""
 height=""
 alt="Image"
 style="display: block; width: 100%; height: 100%; object-fit: contain; "
 &gt;
 
 &lt;figcaption style="text-align: center; margin-top: 0.5rem;"&gt; &lt;i&gt;Image is from elest.io&lt;/i&gt;&lt;/figcaption&gt;
 
&lt;/figure&gt;

&lt;h3 id="191-immich-installation"&gt;19.1 Immich: Installation&lt;/h3&gt;
&lt;p&gt;Similar to &lt;em&gt;Calibre&lt;/em&gt;, there isn&amp;rsquo;t a dedicated TTeck script available for Immich. Instead, we’ll use the &lt;a href="https://tteck.github.io/Proxmox/#docker-lxc"&gt;TTeck Docker script&lt;/a&gt; and install the software via Docker.&lt;/p&gt;
&lt;p&gt;If you have any questions during the process, you can refer to the &lt;a href="https://immich.app/docs/install/docker-compose"&gt;official Immich Docker Compose guide&lt;/a&gt;, which also provides the necessary Docker Compose file.&lt;/p&gt;
&lt;h4 id="1911-data-storage-configuration"&gt;19.1.1 Data Storage Configuration&lt;/h4&gt;
&lt;p&gt;When running Immich, it generates additional data, such as thumbnails or facial recognition data. If you&amp;rsquo;d like, you can separate the storage location for this data from your actual photos. For more details on how to do this, refer to &lt;a href="https://github.com/immich-app/immich/discussions/2328"&gt;this discussion&lt;/a&gt;. Personally, I store the generated data on my &lt;em&gt;local&lt;/em&gt; SSD ZFS dataset and my photos on the &lt;em&gt;data&lt;/em&gt; ZFS dataset.&lt;/p&gt;
&lt;p&gt;If you plan to go this route, you&amp;rsquo;ll need to create a new shared folder in OMV for your Immich photos, mount it on your host machine, and use LXC binds to make it available in your container.&lt;/p&gt;
&lt;h4 id="1912-hardware-acceleration"&gt;19.1.2 Hardware Acceleration&lt;/h4&gt;
&lt;p&gt;If you want to use features like facial recognition, I highly recommend enabling hardware acceleration, similar to how we did it for Jellyfin.&lt;/p&gt;
&lt;style&gt;
 .info {
 background-color: #e6f7ff; 
 padding: 15px; 
 border-radius: 5px; 
 margin-bottom: 15px; 
 }

 .info-title {
 font-size: 20px; 
 margin-bottom: 10px; 
 color: #000080; 
 font-weight: bold; 
 }
&lt;/style&gt;

&lt;div class="info"&gt;
 &lt;div class="info-title"&gt;Info&lt;/div&gt;
 &lt;p&gt;&lt;p&gt;If you&amp;rsquo;re using an &lt;strong&gt;unprivileged&lt;/strong&gt; Immich container, the first step is to edit the LXC configuration file to grant the container access to your graphics card for hardware acceleration. Add the following lines to the LXC configuration file:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;1&lt;/span&gt;&lt;span class="cl"&gt;lxc.mount.entry: /dev/dri dev/dri none bind,optional,create&lt;span class="o"&gt;=&lt;/span&gt;dir
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;2&lt;/span&gt;&lt;span class="cl"&gt;lxc.mount.entry: /dev/dri/renderD128 dev/dri/renderD128 none bind,optional,create&lt;span class="o"&gt;=&lt;/span&gt;file
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/p&gt;
&lt;/div&gt;

&lt;p&gt;Next, you&amp;rsquo;ll need to give the user permission to access the graphics card by setting permissions in crontab with &lt;code&gt;@reboot sleep 20 &amp;amp;&amp;amp; chmod -R 777 /dev/dri&lt;/code&gt;. This step is necessary because the permissions reset after a container reboot.&lt;/p&gt;
&lt;p&gt;Additionally, you will need to execute the following command in the LXC container shell:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;1&lt;/span&gt;&lt;span class="cl"&gt;sudo usermod -aG render immich
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;2&lt;/span&gt;&lt;span class="cl"&gt;sudo usermod -aG video immich
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This will give the immich user the necessary permissions to access the graphics card.&lt;/p&gt;
&lt;h4 id="1913-external-library-configuration"&gt;19.1.3 External Library Configuration&lt;/h4&gt;
&lt;p&gt;If you want to include an external library (e.g., old family photos that aren’t on your smartphone), you can follow &lt;a href="https://immich.app/docs/guides/external-library/"&gt;this guide&lt;/a&gt;. I personally use the following folder structure:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-fallback" data-lang="fallback"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;1&lt;/span&gt;&lt;span class="cl"&gt;photos/
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;2&lt;/span&gt;&lt;span class="cl"&gt;├── ExternalLibraries/
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;3&lt;/span&gt;&lt;span class="cl"&gt;│ ├── holidays_2020
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;4&lt;/span&gt;&lt;span class="cl"&gt;│ ├── holidays_2021
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;5&lt;/span&gt;&lt;span class="cl"&gt;│ └── holidays_2019
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;6&lt;/span&gt;&lt;span class="cl"&gt;└── Immich/
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id="1914-configuring-the-env-and-docker-compose-files"&gt;19.1.4 Configuring the &lt;code&gt;.env&lt;/code&gt; and Docker Compose Files&lt;/h3&gt;
&lt;p&gt;In addition to the Docker Compose file from the official Immich guide I linked earlier, you’ll also need a &lt;code&gt;.env&lt;/code&gt; file to set certain parameters, such as storage locations. If you plan to separate your photos from immich&amp;rsquo;s generated data, you can use the following &lt;code&gt;.env&lt;/code&gt; file:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-gdscript3" data-lang="gdscript3"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;1&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;LIBRARY_LOCATION&lt;/span&gt;&lt;span class="o"&gt;=/&lt;/span&gt;&lt;span class="n"&gt;mnt&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;photos&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;Immich&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;2&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;THUMBS_LOCATION&lt;/span&gt;&lt;span class="o"&gt;=./&lt;/span&gt;&lt;span class="n"&gt;thumbs&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;3&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;UPLOAD_LOCATION&lt;/span&gt;&lt;span class="o"&gt;=./&lt;/span&gt;&lt;span class="n"&gt;upload&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;4&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;PROFILE_LOCATION&lt;/span&gt;&lt;span class="o"&gt;=./&lt;/span&gt;&lt;span class="n"&gt;profile&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;5&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;VIDEO_LOCATION&lt;/span&gt;&lt;span class="o"&gt;=~./&lt;/span&gt;&lt;span class="n"&gt;encoded&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;video&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;You&amp;rsquo;ll also need to modify the volumes section of the Docker Compose file as follows:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-gdscript3" data-lang="gdscript3"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;1&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="o"&gt;$&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="n"&gt;LIBRARY_LOCATION&lt;/span&gt;&lt;span class="p"&gt;}:&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;usr&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;src&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;app&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;upload&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;library&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;2&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="o"&gt;$&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="n"&gt;UPLOAD_LOCATION&lt;/span&gt;&lt;span class="p"&gt;}:&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;usr&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;src&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;app&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;upload&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;upload&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;3&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="o"&gt;$&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="n"&gt;THUMBS_LOCATION&lt;/span&gt;&lt;span class="p"&gt;}:&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;usr&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;src&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;app&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;upload&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;thumbs&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;4&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="o"&gt;$&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="n"&gt;PROFILE_LOCATION&lt;/span&gt;&lt;span class="p"&gt;}:&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;usr&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;src&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;app&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;upload&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;profile&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;5&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="o"&gt;$&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="n"&gt;VIDEO_LOCATION&lt;/span&gt;&lt;span class="p"&gt;}:&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;usr&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;src&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;app&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;upload&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;encoded&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;video&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;6&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;mnt&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;photos&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;ExternalLibraries&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;mnt&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;ExternalLibraries&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="n"&gt;ro&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;7&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;etc&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;localtime&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;etc&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;localtime&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="n"&gt;ro&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h4 id="1915-migrating-from-google-photos"&gt;19.1.5 Migrating from Google Photos&lt;/h4&gt;
&lt;p&gt;To migrate from Google Photos, you can either use the &lt;a href="https://immich.app/docs/features/mobile-app/"&gt;Immich mobile app&lt;/a&gt; or follow &lt;a href="https://www.chuck-builds.com/immich-and-google-photos/"&gt;this guide&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id="20-backups"&gt;20. Backups&lt;/h2&gt;
&lt;p&gt;We’ve hosted various software applications, and this took considerable time and effort. The last thing we want is to lose all of this progress due to disk failures, so it’s essential to set up a proper backup system.&lt;/p&gt;
&lt;p&gt;You might think that using a RAID system, which mirrors every disk, provides backup protection. However, RAID is not a backup.&lt;/p&gt;












&lt;figure style="display: block; margin: 0 auto; width: 70%; "&gt;
 &lt;img
 src="https://monkemanx.github.io/attachments/raid_backup.png"
 loading="lazy"
 width=""
 height=""
 alt="Image"
 style="display: block; width: 100%; height: 100%; object-fit: contain; "
 &gt;
 
&lt;/figure&gt;

&lt;p&gt;Here’s a comment that explains this well:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;If your home server were stolen, a backup would be used to restore your data elsewhere.&lt;/p&gt;
&lt;p&gt;If your home server were in a house fire, a backup would be used to restore your data.&lt;/p&gt;
&lt;p&gt;If both hard drives failed before the rebuild finished, a backup would restore your data.&lt;/p&gt;
&lt;p&gt;If you accidentally opened a file that encrypted your data, a backup would restore your data.&lt;/p&gt;
&lt;p&gt;If your home server was dropped during a move, a backup would restore your data.&lt;/p&gt;
&lt;p&gt;If you were editing a video and overwrote the original, a backup would recover the original file.&lt;/p&gt;
&lt;p&gt;If a hacker got in and destroyed your data, you’d need the backup.&lt;/p&gt;
&lt;p&gt;If a family member messed things up, you’d need the backup.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h3 id="201-what-data-should-you-backup"&gt;20.1 What Data Should You Backup?&lt;/h3&gt;
&lt;p&gt;Not all data needs to be backed up, only the original data that is important to you. This is crucial because backing up everything can require a lot of storage space—and that can be expensive.&lt;/p&gt;
&lt;p&gt;The best practice for backups is the &lt;strong&gt;3-2-1 rule&lt;/strong&gt;, which suggests you should have:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;3 copies&lt;/strong&gt; of your data,&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;2 different types&lt;/strong&gt; of storage media, and&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;1 offsite copy&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This is the ideal goal, but in practice, it may not always be feasible due to costs.&lt;/p&gt;
&lt;h3 id="202-important-data-and-my-previous-backup-strategy"&gt;20.2 Important Data and My Previous Backup Strategy&lt;/h3&gt;
&lt;p&gt;The first step is to identify which data is important for you to back up. For me, this includes:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;My Proxmox configuration files.&lt;/li&gt;
&lt;li&gt;My personal notes (including this website).&lt;/li&gt;
&lt;li&gt;My personal images and family photos.&lt;/li&gt;
&lt;li&gt;My Linux configuration files.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Once you’ve identified the critical data, think about your backup strategy.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;My &lt;strong&gt;Linux configuration files&lt;/strong&gt; are already stored on two different devices, with one being offsite (on my computer and in a GitHub repository).&lt;/li&gt;
&lt;li&gt;My &lt;strong&gt;personal notes&lt;/strong&gt; are relatively secure as I sync them between my laptop, desktop, and server, resulting in 3 copies on different devices.&lt;/li&gt;
&lt;li&gt;My &lt;strong&gt;personal image collection&lt;/strong&gt; is less secure. My personal images are on my phone and server, while my family photos have two copies: one on my server and one with my dad.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;That leaves my &lt;strong&gt;Proxmox configuration&lt;/strong&gt;, which currently has no backup. Since I tinker with my homelab often, things can go wrong, and having a backup would allow me to roll back to prior versions.&lt;/p&gt;
&lt;h3 id="203-my-backup-plan"&gt;20.3 My Backup Plan&lt;/h3&gt;
&lt;p&gt;Initially, I planned to use &lt;a href="https://www.proxmox.com/en/proxmox-backup-server/overview"&gt;Proxmox Backup Server&lt;/a&gt; on my Raspberry Pi 3B, as its server role was defunct after a homelab upgrade. Unfortunately, Proxmox Backup Server isn&amp;rsquo;t built for the ARM processor in the Raspberry Pi, but there’s an alternative version called &lt;a href="https://github.com/Proxmox-Backup-Server-for-ARM"&gt;PiBS&lt;/a&gt; available on GitHub, which works with ARM. Proxmox Backup Server is great because it integrates directly with Proxmox. I even found a nice &lt;a href="https://liersch.it/2023/09/proxmox-backup-server-auf-raspberry-pi-installieren/"&gt;guide&lt;/a&gt; for setting it up (it’s in German, though).&lt;/p&gt;
&lt;p&gt;Sadly, while flashing the SD card for the Raspberry Pi 3B, it broke (which is why you should use an SSD), and I didn’t have the funds to fix it.&lt;/p&gt;
&lt;h3 id="204-the-alternative-plan"&gt;20.4 The Alternative Plan&lt;/h3&gt;
&lt;p&gt;Instead, I decided to use two external 1TB hard drives I already had for backup storage. Since data loss from a single drive failure would be catastrophic, I set them up in a &lt;strong&gt;ZFS mirror&lt;/strong&gt;, which minimizes the risk of data loss.&lt;/p&gt;
&lt;p&gt;The plan was to connect these drives to my server and have it automatically back up the Proxmox configuration at a set time each day. While this setup isn’t ideal (as the backup drives aren’t offsite), it’s better than nothing.&lt;/p&gt;
&lt;h3 id="205-backup-retention-strategy"&gt;20.5 Backup Retention Strategy&lt;/h3&gt;
&lt;p&gt;Given the limited storage (only 1TB), I couldn’t back up everything daily, as it would quickly exceed the available space. This is where &lt;strong&gt;backup retention&lt;/strong&gt; comes in. Backup retention allows you to define how long backups are kept on a daily, weekly, monthly, and yearly basis. After some experimentation, I settled on the following parameters:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;keep-daily: 7&lt;/strong&gt; (daily backups for the past week),&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;keep-weekly: 3&lt;/strong&gt; (weekly backups for the past 3 weeks, resulting in 4 weekly backups with daily backups included),&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;keep-monthly: 6&lt;/strong&gt; (monthly backups for half a year),&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;keep-yearly: 5&lt;/strong&gt; (1 backup per year for the last 5 years).&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;You can explore the effects of this strategy using the &lt;a href="https://pbs.proxmox.com/docs/prune-simulator/"&gt;backup retention simulator&lt;/a&gt;, which I highly recommend.&lt;/p&gt;
&lt;p&gt;This setup has worked well so far. After a month of running, my server’s backup storage is about half full.&lt;/p&gt;












&lt;figure style="display: block; margin: 0 auto; width: 80%; "&gt;
 &lt;img
 src="https://monkemanx.github.io/attachments/backup_usage.jpg"
 loading="lazy"
 width=""
 height=""
 alt="Image"
 style="display: block; width: 100%; height: 100%; object-fit: contain; "
 &gt;
 
&lt;/figure&gt;

&lt;h3 id="206-implementing-my-backup-strategy"&gt;20.6 Implementing My Backup Strategy&lt;/h3&gt;
&lt;p&gt;To implement my backup strategy, follow these steps:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Prepare Your Disks:&lt;/strong&gt;
If the disks already contain important data, ensure you save it elsewhere before proceeding. Then, connect the disks to your server.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Wipe the Disks:&lt;/strong&gt;
In Proxmox, navigate to &lt;code&gt;pve -&amp;gt; Disks&lt;/code&gt;, select the two newly connected disks, and press the &lt;strong&gt;Wipe&lt;/strong&gt; button. This will erase any existing data on the disks.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Create ZFS Mirror:&lt;/strong&gt;
Go to &lt;code&gt;pve -&amp;gt; Disks -&amp;gt; ZFS -&amp;gt; Create ZFS&lt;/code&gt;. Select your two newly connected disks and set the RAID level to &lt;code&gt;mirror&lt;/code&gt;. For compression, I recommend using &lt;code&gt;zstd&lt;/code&gt;. If you&amp;rsquo;re curious about the trade-offs between different compression algorithms, &lt;a href="https://manishrjain.com/compression-algo-moving-data"&gt;this blog post&lt;/a&gt; offers a good overview. In summary, &lt;code&gt;lz4&lt;/code&gt; is faster but compresses less, while &lt;code&gt;zstd&lt;/code&gt; compresses more effectively but is slower and uses more CPU resources.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Add Backup Directory:&lt;/strong&gt;
Next, navigate to &lt;code&gt;Datacenter -&amp;gt; Storage -&amp;gt; Add -&amp;gt; Directory&lt;/code&gt;. For the content type, choose &lt;code&gt;VZdump&lt;/code&gt;. Select a name for the directory and add it.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Set Up Backup Schedule:&lt;/strong&gt;
Go to &lt;code&gt;Datacenter -&amp;gt; Backup -&amp;gt; Add&lt;/code&gt;, and add the newly created directory. Set the node to your host machine, and choose the schedule for when you want to back up your devices. I have mine set to back up every day at &lt;code&gt;00:00&lt;/code&gt;. For the backup mode, I use &lt;code&gt;Snapshot&lt;/code&gt;. You can read more about the different backup modes &lt;a href="https://pve.proxmox.com/wiki/Backup_and_Restore#_backup_modes"&gt;here&lt;/a&gt;. I also recommend enabling email notifications, so you’ll get alerts when a backup completes, helping you spot any errors early. For retention, choose the settings that suit your needs.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Exclude NAS Storage from Backup:&lt;/strong&gt;
To exclude your NAS storage from backups, navigate to your OpenMediaVault virtual machine, go to the &lt;strong&gt;Hardware&lt;/strong&gt; section, select the disks, and click &lt;strong&gt;Remove from Backup&lt;/strong&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Test the Backup:&lt;/strong&gt;
A backup is not a &lt;em&gt;real&lt;/em&gt; backup if you haven’t tested it. To do so, navigate to &lt;code&gt;Datacenter -&amp;gt; Backup&lt;/code&gt; and manually create a backup. While the job is running, check the job details to ensure the NAS disks are properly excluded.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Verify the Backup:&lt;/strong&gt;
Once the backup is finished, scroll down the left sidebar in Proxmox to your backup storage. You should now see the newly created backup.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Restore and Test:&lt;/strong&gt;
To verify that everything is working, pick a random container, shut it down, and go to the backup tab to restore it. Afterward, check that the restored container is functioning correctly.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Congratulations!&lt;/strong&gt;
You now have a working backup strategy!&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;












&lt;figure style="display: block; margin: 0 auto; width: 70%; "&gt;
 &lt;img
 src="https://monkemanx.github.io/attachments/30year_old_saver.png"
 loading="lazy"
 width=""
 height=""
 alt="Image"
 style="display: block; width: 100%; height: 100%; object-fit: contain; "
 &gt;
 
&lt;/figure&gt;

&lt;h2 id="21-server-power-optimization"&gt;21. Server Power Optimization&lt;/h2&gt;
&lt;p&gt;If you, like me, live in a European country, power consumption is probably a concern due to the high cost of electricity.&lt;/p&gt;












&lt;figure style="display: block; margin: 0 auto; width: 80%; "&gt;
 &lt;img
 src="https://monkemanx.github.io/attachments/electricity_2023_prices.jpg"
 loading="lazy"
 width=""
 height=""
 alt="Image"
 style="display: block; width: 100%; height: 100%; object-fit: contain; "
 &gt;
 
&lt;/figure&gt;

&lt;p&gt;As such, it’s essential to optimize the power consumption of your server. I used the &lt;a href="https://www.shelly.com/de/products/shop/shelly-plus-plug-s-1"&gt;Shelly Plug S&lt;/a&gt; to measure my power usage. This power monitor plugs into your wall socket and measures the consumption of any connected device. It’s quite affordable at around 20 bucks and accurate enough for my use case.&lt;/p&gt;
&lt;h3 id="211-power-saving-optimizations"&gt;21.1 Power-Saving Optimizations&lt;/h3&gt;
&lt;p&gt;A helpful thread on the &lt;a href="https://community.home-assistant.io/t/psa-how-to-configure-proxmox-for-lower-power-usage/323731"&gt;Home Assistant Forum&lt;/a&gt; discusses optimizing server power usage. One of the most impactful changes, aside from removing unused electronics, is using the power-saving scaling governor for the CPU. You can activate this by running the following command:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;1&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;&amp;#34;powersave&amp;#34;&lt;/span&gt; &lt;span class="p"&gt;|&lt;/span&gt; tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id="212-measuring-power-consumption"&gt;21.2 Measuring Power Consumption&lt;/h3&gt;
&lt;p&gt;When the server is idle and not performing any tasks, it consumes approximately 20 watts of power (with the powersave scaling governor). With minor workloads like torrenting, the consumption goes up to 30 watts. Under full load, the power usage increases even more.&lt;/p&gt;
&lt;p&gt;We can use any of the many &lt;a href="https://www.rapidtables.com/calc/electric/energy-cost-calculator.html"&gt;electricity calculators online&lt;/a&gt; to estimate the cost of running the server. For example, using the following parameters:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Power consumption&lt;/strong&gt;: 30 watts&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Operating time&lt;/strong&gt;: 24 hours per day&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Electricity price&lt;/strong&gt;: €0.40 per kWh (as of April 29th, Germany)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This results in an annual energy cost of approximately &lt;strong&gt;€105&lt;/strong&gt;. By reducing the server&amp;rsquo;s operating time from 24 hours to 18 hours a day, the total cost drops to around &lt;strong&gt;€80&lt;/strong&gt; per year.&lt;/p&gt;
&lt;h3 id="213-scheduled-server-shutdowns"&gt;21.3 Scheduled Server Shutdowns&lt;/h3&gt;
&lt;p&gt;Another simple way to save power is by not leaving your server on all the time. I, for example, turn off my server at 01:00 and then turn it on again when needed.&lt;/p&gt;
&lt;h4 id="214-automating-server-shutdown"&gt;21.4 Automating Server Shutdown&lt;/h4&gt;
&lt;p&gt;To automatically turn off your server at a specific time, you can schedule a cron job. First, open crontab for editing by running &lt;code&gt;crontab -e&lt;/code&gt;, and add the following line to schedule a shutdown at 01:00:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;1&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="m"&gt;0&lt;/span&gt; &lt;span class="m"&gt;1&lt;/span&gt; * * * /usr/sbin/shutdown -h now
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;If you&amp;rsquo;re unfamiliar with cron syntax, you can use &lt;a href="https://crontab.guru/"&gt;Crontab Guru&lt;/a&gt; for explanations and testing.&lt;/p&gt;
&lt;h3 id="215-automatically-turning-your-server-back-on"&gt;21.5 Automatically Turning Your Server Back On&lt;/h3&gt;
&lt;p&gt;Now that your server can shut down automatically, you’ll want a convenient way to turn it back on without physically pressing the power button. For this, you can use &lt;a href="https://en.wikipedia.org/wiki/Wake-on-LAN"&gt;Wake-on-LAN&lt;/a&gt;, which sends a special network packet to turn on your server remotely.&lt;/p&gt;
&lt;h4 id="2151-setting-up-wake-on-lan"&gt;21.5.1 Setting Up Wake-on-LAN&lt;/h4&gt;
&lt;p&gt;To enable Wake-on-LAN, follow these steps:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Go to &lt;code&gt;pve -&amp;gt; Network&lt;/code&gt; and find the name of your network device.&lt;/li&gt;
&lt;li&gt;Run the command &lt;code&gt;ethtool &amp;lt;device_name&amp;gt;&lt;/code&gt; (e.g., &lt;code&gt;ethtool enp6s0&lt;/code&gt;) to check the device’s status. If you see &lt;code&gt;wake on: d&lt;/code&gt;, it means Wake-on-LAN is disabled.&lt;/li&gt;
&lt;li&gt;You may need to enable it in your BIOS settings.&lt;/li&gt;
&lt;/ol&gt;
&lt;h4 id="2152-sending-the-wake-on-lan-packet"&gt;21.5.2 Sending the Wake-on-LAN Packet&lt;/h4&gt;
&lt;p&gt;To send the wake-up packet, I use my smartphone with the &lt;a href="https://github.com/Florianisme/WakeOnLan"&gt;WakeOnLan app&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The configuration of &lt;em&gt;WakeOnLan&lt;/em&gt; app should look similar to this:












&lt;figure style="display: block; margin: 0 auto; width: 30%; "&gt;
 &lt;img
 src="https://monkemanx.github.io/attachments/wake_on_lan.png"
 loading="lazy"
 width=""
 height=""
 alt="Image"
 style="display: block; width: 100%; height: 100%; object-fit: contain; "
 &gt;
 
&lt;/figure&gt;
&lt;/p&gt;
&lt;p&gt;You can get your server&amp;rsquo;s MAC address, by running the following command after installing &lt;code&gt;net-tools&lt;/code&gt; (with &lt;code&gt;apt-get install net-tools&lt;/code&gt;):&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;1&lt;/span&gt;&lt;span class="cl"&gt;ifconfig -a
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Alternatively, you can use the command &lt;code&gt;ip link&lt;/code&gt; and look for the device labeled as &lt;code&gt;ether&lt;/code&gt;. The MAC address will be listed next to it.&lt;/p&gt;












&lt;figure style="display: block; margin: 0 auto; width: 80%; "&gt;
 &lt;img
 src="https://monkemanx.github.io/attachments/ifcofig.jpg"
 loading="lazy"
 width=""
 height=""
 alt="Image"
 style="display: block; width: 100%; height: 100%; object-fit: contain; "
 &gt;
 
&lt;/figure&gt;

&lt;h2 id="22-notification-with-gotify"&gt;22. Notification with Gotify&lt;/h2&gt;
&lt;p&gt;One important consideration for maintaining a secure and well-monitored Proxmox environment is setting up a notification system. This becomes especially crucial in scenarios where immediate attention is required—such as a disk failure or a backup job that didn’t complete successfully. Early alerts can help you act quickly, minimizing downtime and reducing the risk of data loss.&lt;/p&gt;
&lt;p&gt;Proxmox supports several notification methods out of the box, including email. However, I opted to use Gotify, an open-source push notification server that enables real-time alerts directly to your smartphone or other devices. It’s lightweight, easy to set up, and perfect for receiving instant updates from your Proxmox server. For example, if a scheduled backup fails in the middle of the night, Gotify can send a push notification straight to your phone, ensuring you’re aware of the issue without delay.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Deploy Gotify in an LXC Container:&lt;/strong&gt; Use the community script available at &lt;a href="https://community-scripts.github.io/ProxmoxVE/scripts?id=gotify"&gt;Proxmox VE Community Scripts&lt;/a&gt; to install Gotify easily in an LXC container. The default settings usually work well, but you can customize them if needed.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Access the Gotify Web UI:&lt;/strong&gt; Once the container is created, the Proxmox console will display its IP address. Open a browser and go to that IP—Gotify runs on port &lt;strong&gt;80&lt;/strong&gt; by default. You can log in using the default credentials:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Username:&lt;/strong&gt; &lt;code&gt;admin&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Password:&lt;/strong&gt; &lt;code&gt;admin&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Make sure to &lt;strong&gt;change your password&lt;/strong&gt; immediately after logging in for security reasons.&lt;/p&gt;

 
 
 
 
 
 
 
 
 
 
 
 &lt;figure style="display: block; margin: 0 auto; width: 80%; "&gt;
 &lt;img
 src="https://monkemanx.github.io/attachments/gotify_login.jpg"
 loading="lazy"
 width=""
 height=""
 alt="Image"
 style="display: block; width: 100%; height: 100%; object-fit: contain; "
 &gt;
 
 &lt;/figure&gt;

&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Configure NGINX Reverse Proxy (Optional but Recommended):&lt;/strong&gt; For better accessibility and security, especially if you plan to access Gotify remotely, it&amp;rsquo;s advisable to set up an NGINX reverse proxy. Be sure to &lt;strong&gt;enable WebSocket support&lt;/strong&gt;, as Gotify uses WebSockets to push notifications in real-time.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Enable Autostart for the LXC Container:&lt;/strong&gt; In the Proxmox web UI, navigate to the options of the Gotify container and enable &lt;strong&gt;Autostart&lt;/strong&gt;, so Gotify launches automatically after a host reboot.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Add Gotify as a Notification Target in Proxmox:&lt;/strong&gt; Go to:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-fallback" data-lang="fallback"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;1&lt;/span&gt;&lt;span class="cl"&gt;Datacenter -&amp;gt; Notifications -&amp;gt; Add -&amp;gt; Gotify
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Here, you’ll need to enter the Gotify server URL and an access token. To generate a token:&lt;/p&gt;

 
 
 
 
 
 
 
 
 
 
 
 &lt;figure style="display: block; margin: 0 auto; width: 80%; "&gt;
 &lt;img
 src="https://monkemanx.github.io/attachments/gotify-proxmox.jpg"
 loading="lazy"
 width=""
 height=""
 alt="Image"
 style="display: block; width: 100%; height: 100%; object-fit: contain; "
 &gt;
 
 &lt;/figure&gt;

&lt;ol&gt;
&lt;li&gt;In the Gotify web UI, create a new &lt;strong&gt;application&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Copy the &lt;strong&gt;access token&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Paste it into the corresponding field in Proxmox.&lt;/li&gt;
&lt;/ol&gt;

 
 
 
 
 
 
 
 
 
 
 
 &lt;figure style="display: block; margin: 0 auto; width: 80%; "&gt;
 &lt;img
 src="https://monkemanx.github.io/attachments/gotify_apps.jpg"
 loading="lazy"
 width=""
 height=""
 alt="Image"
 style="display: block; width: 100%; height: 100%; object-fit: contain; "
 &gt;
 
 &lt;/figure&gt;

&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;With this Proxmox can now send system notifications to Gotify, but we are not finished yet, we now need to tell Gotify that it should send the message that it received to your phone.&lt;/p&gt;
&lt;ol start="6"&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Connect Your Mobile Device:&lt;/strong&gt; To receive push notifications on your phone:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Download the &lt;strong&gt;Gotify app&lt;/strong&gt; from the Google Play Store (or F-Droid).&lt;/li&gt;
&lt;li&gt;Open the app and enter your Gotify server URL along with your login credentials.&lt;/li&gt;
&lt;li&gt;After logging in, your phone should appear as a connected client in the Gotify web interface.&lt;/li&gt;
&lt;/ol&gt;

 
 
 
 
 
 
 
 
 
 
 
 &lt;figure style="display: block; margin: 0 auto; width: 80%; "&gt;
 &lt;img
 src="https://monkemanx.github.io/attachments/gotify_clients.jpg"
 loading="lazy"
 width=""
 height=""
 alt="Image"
 style="display: block; width: 100%; height: 100%; object-fit: contain; "
 &gt;
 
 &lt;/figure&gt;

&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Send a Test Notification:&lt;/strong&gt; To verify everything is working:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;In Proxmox, go to &lt;code&gt;Datacenter -&amp;gt; Notifications&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Select your Gotify endpoint and click the &lt;strong&gt;Test&lt;/strong&gt; button.&lt;/li&gt;
&lt;li&gt;You should receive the notification both in the Gotify web UI and on your phone.&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Set Up Notification Filters (Optional)_&lt;/strong&gt; To control what types of messages you receive:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;In Proxmox, go to &lt;code&gt;Datacenter -&amp;gt; Notifications&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Scroll to the bottom and click &lt;strong&gt;Add&lt;/strong&gt; under &lt;strong&gt;Notification Matchers&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Give your matcher a name.&lt;/li&gt;
&lt;li&gt;Under the &lt;strong&gt;Targets to Notify&lt;/strong&gt; tab, select your Gotify endpoint.&lt;/li&gt;
&lt;li&gt;In the &lt;strong&gt;Match Rules&lt;/strong&gt; tab, choose which types of notifications (e.g., backup failures, hardware issues) you want to be alerted about.&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;/ol&gt;












&lt;figure style="display: block; margin: 0 auto; width: 80%; "&gt;
 &lt;img
 src="https://monkemanx.github.io/attachments/notfication_matcher_proxmox.jpg"
 loading="lazy"
 width=""
 height=""
 alt="Image"
 style="display: block; width: 100%; height: 100%; object-fit: contain; "
 &gt;
 
&lt;/figure&gt;

&lt;p&gt;&lt;strong&gt;Bonus Tip:&lt;/strong&gt; Disable the &amp;ldquo;Connected&amp;rdquo; Notification on Android. The Gotify Android app may display a persistent &amp;ldquo;Connected&amp;rdquo; notification. To remove it:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Go to your &lt;strong&gt;Android system settings&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Navigate to &lt;strong&gt;Apps -&amp;gt; Gotify -&amp;gt; Notifications&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Disable the &lt;strong&gt;Foreground Service Notification&lt;/strong&gt;.&lt;/li&gt;
&lt;/ol&gt;












&lt;figure style="display: block; margin: 0 auto; width: 30%; "&gt;
 &lt;img
 src="https://monkemanx.github.io/attachments/gotify_app_notifcation_disable.jpg"
 loading="lazy"
 width=""
 height=""
 alt="Image"
 style="display: block; width: 100%; height: 100%; object-fit: contain; "
 &gt;
 
&lt;/figure&gt;

&lt;p&gt;&lt;strong&gt;Bonus Bonus Tipp:&lt;/strong&gt; There is also a cross platform &lt;a href="https://github.com/seird/gotify-tray"&gt;tray application&lt;/a&gt; out there that you can install for your laptop or desktop PC, to receive notification from your gotfiy service.&lt;/p&gt;
&lt;h2 id="23-the-end"&gt;23. The End&lt;/h2&gt;
&lt;p&gt;That&amp;rsquo;s it, we&amp;rsquo;re done. No more services to install, no more configurations left to configure, no more users and permissions to set, and especially no more documentation to write.&lt;/p&gt;
&lt;p&gt;Not really, there&amp;rsquo;s always something that can be done. But for now, I am free!&lt;/p&gt;
&lt;p&gt;This was the longest piece of continuous text I&amp;rsquo;ve ever written, and it took me way too long to finish it. But I’m happy I did. I think I learned a lot and hopefully, you dear reader, learned something too.&lt;/p&gt;
&lt;p&gt;At last, enjoy these last server-themed movie posters.&lt;/p&gt;


&lt;figure style="display: flex; justify-content: center; gap: 10px;" height="387px"&gt;
 &lt;img loading="lazy" style="width: 33%;" src="https://monkemanx.github.io/attachments/back_up.jpg"&gt;
 &lt;img loading="lazy" style="width: 33%;" src="https://monkemanx.github.io/attachments/the_ecc_buster.jpg"&gt;
 &lt;img loading="lazy" style="width: 33%;" src="https://monkemanx.github.io/attachments/Alien3.png"&gt;
&lt;/figure&gt;

</description></item><item><title>Towards LLM-based Software Engineering Agents</title><link>https://monkemanx.github.io/articles/llm_based_software_engineering_agents/</link><pubDate>Thu, 26 Sep 2024 00:00:00 +0000</pubDate><author>monkeman@cock.li (MonkeMan)</author><guid>https://monkemanx.github.io/articles/llm_based_software_engineering_agents/</guid><description>&lt;style&gt;
 .info {
 background-color: #e6f7ff; 
 padding: 15px; 
 border-radius: 5px; 
 margin-bottom: 15px; 
 }

 .info-title {
 font-size: 20px; 
 margin-bottom: 10px; 
 color: #000080; 
 font-weight: bold; 
 }
&lt;/style&gt;

&lt;div class="info"&gt;
 &lt;div class="info-title"&gt;Background&lt;/div&gt;
 &lt;p&gt;I wrote this article back in uni as part of the seminar, &amp;ldquo;Interactive-Learning&amp;rdquo;. This seminar was done as a group of two, so not all parts in here are written by me.&lt;/p&gt;
&lt;/div&gt;

&lt;h1 id="1-from-llms-to-llm-agents"&gt;1. From LLMs to LLM Agents&lt;/h1&gt;
&lt;p&gt;The advent of ChatGPT in late 2022 kindled an unprecedented hype in Artificial Intelligence, and specifically Large Language Models (LLMs). Ever since the first version of ChatGPT, which was powered by GPT-3, came out, LLMs have evolved a lot. By 2024, research on LLM agents&amp;mdash;LLMs that are enabled to autonomously interact with their environment and perform complex tasks&amp;mdash;has emerged as a critical area of investigation. In this report, we want to introduce a special flavor of LLM agents, namely &lt;em&gt;coding agents&lt;/em&gt;. Coding agents are, as the name suggests, LLM agents for code generation and software engineering more generally. Analyzing this type of LLM agents is particularly advantageous because the correctness of code can be formally verified. This verifiability simplifies creating high-quality benchmarks.&lt;/p&gt;
&lt;p&gt;In this section, we first provide a comprehensive overview of the key developments in LLM research that have led to the current state-of-the-art in coding agents. Next, we will introduce the gold standard benchmark used to evaluate these agents. Finally, we will introduce a few different coding agents and compare and contrast them.&lt;/p&gt;
&lt;h2 id="11-large-language-models"&gt;1.1 Large Language Models&lt;/h2&gt;
&lt;p&gt;Large Language Models are auto-regressive models based on the &lt;em&gt;transformer&lt;/em&gt; architecture trained on vast corpora of text data to predict the next token in a sequence. LLMs have demonstrated remarkable zero-shot and few-shot learning capabilities across a wide range of natural language tasks. At their core, LLMs are probabilistic models that estimate \(P(x_t \mid x_1, \dots, x_{t-1})\), where \(x_t\) represents the \(t\)-th token in a sequence. Despite this seemingly simple objective, larger LLMs are said to exhibit emergent behavior, though this remains heavily contested.&lt;/p&gt;
&lt;p&gt;The two primary methods for enhancing LLM performance on specific tasks without (fully) retraining are:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Few-shot prompting / in-context learning&lt;/strong&gt;: Providing task-specific examples within the context window. This technique leverages the empirically demonstrated ability of LLMs to adapt to new tasks on-the-fly. In the case of few-shot prompting, there is no training necessary at all. This is especially useful when there are not enough computational resources for training of any kind.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Fine-tuning&lt;/strong&gt;: Further training the pre-trained model on domain-specific data or particular tasks, often using techniques like PEFT (Parameter-Efficient Fine-Tuning) to mitigate catastrophic forgetting and reduce computational requirements. This is especially useful as few-shot prompting increases the number of tokens that the attention heads need to attend to, leading to slower inference speed. Thus, fine-tuning is reasonable for minimizing the costs over the long-term.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="12-chain-of-thought"&gt;1.2 Chain-of-Thought&lt;/h2&gt;
&lt;p&gt;Chain-of-Thought (CoT) prompting, is a technique that dramatically improves LLMs&amp;rsquo; performance on complex reasoning tasks. By prompting the model to articulate intermediate steps, CoT allows the model to reason step-by-step instead of having to directly answer, leading to more accurate final outputs. The underlying reason behind the success of CoT is still unclear.&lt;/p&gt;


&lt;figure&gt;
 &lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width:70%" src="https://monkemanx.github.io/attachments/llm_software_engineering/cot.png"&gt;
 &lt;figcaption style="text-align:center; margin-top: 10px;"&gt;
 An example of Chain-of-Thought prompting.
 &lt;/figcaption&gt;
&lt;/figure&gt;


&lt;h2 id="13-tool-use"&gt;1.3 Tool Use&lt;/h2&gt;


&lt;figure&gt;
 &lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width:40%" src="https://monkemanx.github.io/attachments/llm_software_engineering/toolformer.png"&gt;
 &lt;figcaption style="text-align:center; margin-top: 10px;"&gt;Exemplary predictions of Toolformer. The
model autonomously decides to call different APIs
(from top to bottom: a question answering system,
a calculator, a machine translation system, and a
Wikipedia search engine) to obtain information that is
useful for completing a piece of text&lt;/figcaption&gt;
&lt;/figure&gt;


&lt;p&gt;While prompting techniques enhance the inherent capabilities of LLMs, integrating external tools expands their functional scope. LLMs famously struggle to do basic arithmetic consistently well, as their training data is natural language, which doesn&amp;rsquo;t lend itself well to solve mathematical equations. The Toolformer framework, introduced in, demonstrates a straightforward way how LLMs can be trained to use external tools through self-supervised learning.
Toolformer employs a two-stage process:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;API-aware data generation&lt;/strong&gt;: The model is prompted to generate plausible API calls within the text.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Fine-tuning&lt;/strong&gt;: The model is trained on this augmented dataset, learning to predict when and how to use tools.
This approach allows LLMs to interface with calculators, search engines, file systems, the Python REPL, and other external tools, significantly increasing their problem-solving capabilities and usefulness. An example is depicted in \ref{fig:toolformer}.&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id="14-the-react-framework"&gt;1.4 The ReAct Framework&lt;/h2&gt;
&lt;p&gt;The ReAct (Reason+Act) framework, introduced in, combines reasoning in natural language with decision-making for interactive tasks. ReAct interleaves thought and action steps, where each action returns an observation. This observation is then pasted into the prompt and the process repeats until the LLM believes that it has found an answer. This prompting technique combines tool use and Chain-of-Thought style reasoning in a structured manner.&lt;/p&gt;
&lt;p&gt;The ReAct process can be formalized as follows:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Observation (\(O_t\))&lt;/strong&gt;: Input from the environment at step \(t\). At \(t=0\), this can be seen as the original Question that the LLM has to answer.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Thought (\(T_t\))&lt;/strong&gt;: LLM-generated reasoning based on the observation.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Action (\(A_t\))&lt;/strong&gt;: Decision made based on the thought.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Observation (\(O_{t+1}\))&lt;/strong&gt;: New input resulting from the action.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;ReAct has shown particular promise in tasks requiring both language understanding and interaction with external environments, such as multi-hop question-answering.&lt;/p&gt;
&lt;h2 id="15-llm-agents"&gt;1.5 LLM Agents&lt;/h2&gt;
&lt;p&gt;We have previously referred to the concept of an &lt;em&gt;LLM agent&lt;/em&gt; without providing a formal definition. Given the novelty of this research area, there is not yet a universally accepted definition of what precisely constitutes an LLM agent. However, in general terms, an LLM agent can be described as an LLM that is enabled in some way to interact with its environment and that continually prompts itself in a loop until a goal is reached or some other stopping criterion is met, like length of the loop. Usually, the interaction with the environment is implemented via tool-use. In an LLM agent setup, the LLM usually decides itself when the goal is reached and the loop can be exited, such that a final answer can be provided.&lt;/p&gt;
&lt;p&gt;LLM agents are often used for tasks that require complex reasoning or planning. Strategies that provide some structure to the prompts of the LLM agent, such as ReAct or Reflexion, are often called &lt;em&gt;agent frameworks&lt;/em&gt;.&lt;/p&gt;


&lt;figure&gt;
 &lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width:70%" src="https://monkemanx.github.io/attachments/llm_software_engineering/teaser.png"&gt;
 &lt;figcaption style="text-align:center; margin-top: 10px;"&gt;
 An example of a real-life GitHub issue, along with its corresponding codebase, is provided to the LLM. The LLM then modifies files on disk to create a patch, which is applied to the codebase. The patch is tested to ensure that all tests pass.
 &lt;/figcaption&gt;
&lt;/figure&gt;


&lt;h1 id="2-swe-bench"&gt;2. SWE-Bench&lt;/h1&gt;
&lt;p&gt;With the ever-increasing development of LLMs, it is crucial to have a diverse set of benchmarks to accurately assess their real-world performance. Most high-end models that are released nowadays achieve high scores on the commonly used NLP benchmarks. The &lt;em&gt;HumanEval&lt;/em&gt; benchmark is of particular interest, as it focuses on simple, mostly self-contained programming tasks, which can usually be solved writing only a few lines of code with little context required. These tasks are also usually well specified.&lt;/p&gt;
&lt;table&gt;
	&lt;thead&gt;
			&lt;tr&gt;
					&lt;th&gt;Model&lt;/th&gt;
					&lt;th&gt;MMLU&lt;/th&gt;
					&lt;th&gt;HumanEval&lt;/th&gt;
					&lt;th&gt;DROP&lt;/th&gt;
			&lt;/tr&gt;
	&lt;/thead&gt;
	&lt;tbody&gt;
			&lt;tr&gt;
					&lt;td&gt;GPT-4o&lt;/td&gt;
					&lt;td&gt;88.7&lt;/td&gt;
					&lt;td&gt;90.2&lt;/td&gt;
					&lt;td&gt;83.4&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;Claude 3.5&lt;/td&gt;
					&lt;td&gt;88.7&lt;/td&gt;
					&lt;td&gt;92.0&lt;/td&gt;
					&lt;td&gt;87.1&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;Lamma3 400b&lt;/td&gt;
					&lt;td&gt;86.1&lt;/td&gt;
					&lt;td&gt;84.1&lt;/td&gt;
					&lt;td&gt;83.5&lt;/td&gt;
			&lt;/tr&gt;
	&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;Percentage of solved task for popular LLM&amp;rsquo;s on common NLP-Benchmarks.&lt;/p&gt;
&lt;p&gt;However, the everyday work of a software developer involves more complex tasks. For example, fixing a bug typically requires navigating through the codebase, opening and inspecting various files to locate the problematic section of code. To more accurately reflect this reality, there is a need for more challenging programming benchmarks. &lt;em&gt;SWE-Bench&lt;/em&gt; was created to address this need. In SWE-Bench, instead of solving simple programming tasks, LLMs are required to perform more complex software engineering. Specifically, the LLM’s role in SWE-Bench is to write code for Git pull requests that resolve real-life GitHub issues.&lt;/p&gt;
&lt;h2 id="21-construction-of-swe-bench-and-swe-bench-verified"&gt;2.1 Construction of SWE-Bench and SWE-Bench-Verified&lt;/h2&gt;
&lt;p&gt;SWE-Bench was created by collecting pull requests from popular GitHub Python projects. These pull requests were filtered to meet two criteria: (1) they resolve a GitHub issue and (2) they include changes to a test file in the repository, indicating that the user likely added a test to verify that the issue was resolved. After filtering, the collected instances were executed to ensure that at least one test changed from failing to passing as a result of applying the pull request.
The result is a benchmark with 2,294 problem instances.&lt;/p&gt;
&lt;p&gt;OpenAI then further investigated SWE-Bench and identified several problems:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Unit tests were overly specific or not relevant to the issue.&lt;/li&gt;
&lt;li&gt;Some issue descriptions were poor and underspecified.&lt;/li&gt;
&lt;li&gt;Some instances were difficult to set up reliably.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;To address these issues, OpenAI collaborated with human annotators to rate the severity of these problems and selected the 500 instances with the fewest problems. This resulted in the creation of SWE-Bench-Verified, which is supposed to give more meaningful results.&lt;/p&gt;
&lt;h2 id="22-functionality-of-swe-bench"&gt;2.2 Functionality of SWE-Bench&lt;/h2&gt;
&lt;p&gt;The LLM is provided with a description of a GitHub issue and the entire codebase of the associated repository. The model&amp;rsquo;s task is to modify the codebase to resolve the given GitHub issue. To accomplish this, the LLM must be equipped with tools to read from and write to the codebase.&lt;/p&gt;
&lt;p&gt;Once the LLM has made its changes, a git diff is calculated to create a patch. During evaluation, this patch is applied to the codebase, and if all tests pass, the issue is considered resolved. The final metric for evaluation is the percentage of correctly solved tasks.&lt;/p&gt;


&lt;figure&gt;
 &lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width:70%" src="https://monkemanx.github.io/attachments/llm_software_engineering/pipeline-evaluation.png"&gt;
 &lt;figcaption style="text-align:center; margin-top: 10px;"&gt;
 Evaluation Pipeline of SWE-Bench visualized using a single task instance.
 &lt;/figcaption&gt;
&lt;/figure&gt;


&lt;h1 id="3-retrieval-based-methods"&gt;3. Retrieval-based Methods&lt;/h1&gt;
&lt;p&gt;One problem instance of SWE-Bench consists of an issue description and the corresponding codebase in which the issue occurs. Given that the length of these codebases far exceeds the context window size of current LLMs, the first challenge is to select the most relevant context to present to the model. Hence, information retrieval in some form is necessary. In the context of LLMs and LLM agents, the addition of information retrieval in the workflow is referred to as &lt;em&gt;Retrieval Augmented Generation&lt;/em&gt; (RAG). In SWE-Bench, the authors compare sparse retrieval methods of the BM family with oracle retrieval, where the LLM is given the files that were edited to solve the issue. While these approaches do not seem to be successful, they provide insights into the strengths and weaknesses of current LLMs.&lt;/p&gt;
&lt;h2 id="31-sparse-retrieval"&gt;3.1 Sparse Retrieval&lt;/h2&gt;
&lt;p&gt;Sparse retrieval, as opposed to the more commonly used dense retrieval methods, does not utilize semantic similarity, approximated through cosine similarity in the embedding space. Instead, it uses a statistical approach, where similarity is inherently linked to co-appearance. The Best Matching (BM) family of retrieval algorithms constitute one of the most widely used sparse retrieval methods and are, coincidentally, what was used as a baseline in SWE-Bench.&lt;/p&gt;
&lt;p&gt;BM25, the most widely used variant of the BM family, works by estimating the relevance of a document to a query by combining the term frequency (TF) of each term in the query and the inverse document frequency (IDF) of each term across the entire collection of documents. It adjusts for the length of the document, assuming that longer documents may naturally contain more instances of any term. This method allows for efficient and effective retrieval in situations where the context size is large, and a dense, semantic similarity-based approach might be computationally prohibitive or less effective due to domain-specific language, such as programming code.&lt;/p&gt;
&lt;h2 id="32-oracle-retrieval"&gt;3.2 Oracle Retrieval&lt;/h2&gt;
&lt;p&gt;As the ability of an LLM to patch an issue is dependent on the information retrieval to provide the right files that need to be edited, any system that tries to solve SWE-Bench tasks is bottlenecked by the power of the retrieval algorithm. This is problematic as it does not allow for an independent probing of coding ability. To mitigate this, the authors of SWE-Bench also tried an oracle retrieval approach. As the name suggests, the oracle retrieval acts as a perfect retrieval algorithm, providing the code of exactly those files that were edited to solve the issue in the real world. The authors of SWE-Bench note that LLMs with a 27k context window retrieve none of the files from the oracle context almost half the time. This suggests that the localization of the bug is a great source of errors for coding agents.&lt;/p&gt;
&lt;p&gt;Naturally, the oracle scenario is much less realistic, as a software engineer does not know a priori which files need to be changed to fix a bug. Hence, one could be lead to believe that the results of the oracle retrieval show the extent to which information retrieval is the bottleneck, or equivalently, how good the LLM is at fixing bugs, when given the code that contains the bug. Instead, in real world scenarios, software engineers have to build up a bigger context. They look at a superset of the oracle retrieved code to be able to reason about how to change the code to not only fix the bug, but also maintain the other functionality that the codebase provides. It is thus unclear whether oracle retrieval is really the upper limit for the information retrieval part of fixing bugs.&lt;/p&gt;


&lt;figure&gt;
 &lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width:60%" src="https://monkemanx.github.io/attachments/llm_software_engineering/swe_agent_overview.png"&gt;
 &lt;figcaption style="text-align:center; margin-top: 10px;"&gt;
 Overview of SWE-Agent.
 &lt;/figcaption&gt;
&lt;/figure&gt;


&lt;h2 id="33-swe-agent"&gt;3.3 SWE-Agent&lt;/h2&gt;
&lt;p&gt;&lt;em&gt;SWE-Agent&lt;/em&gt; was the first attempt at solving the SWE-Bench benchmark using an agent. Essentially, it operates within the ReAct framework, interleaving Thought and Action. A key innovation introduced by SWE-Agent is the &lt;em&gt;Agent-Computer Interface&lt;/em&gt; (ACI), a dedicated layer that manages all interactions between the agent and the computer. Rather than directly accessing the file system or code, SWE-Agent communicates its actions and intentions using a domain-specific language. This communication is processed by the ACI, which decides whether to execute or deny the agent&amp;rsquo;s requests based on permission constraints or the correct interpretation of the command.&lt;/p&gt;
&lt;h3 id="331-aci"&gt;3.3.1 ACI&lt;/h3&gt;
&lt;p&gt;The ACI consists of multiple components. These are:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Search and Navigation Tools&lt;/strong&gt;: The agent uses specialized commands like &lt;code&gt;find_file&lt;/code&gt;, &lt;code&gt;search_file&lt;/code&gt;, and &lt;code&gt;search_dir&lt;/code&gt; to navigate and search within codebases. These commands are designed to return concise summaries and suppress verbose output to avoid overwhelming the agent with unnecessary details.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;File Viewer&lt;/strong&gt;: Once a file of interest is identified, the agent can utilize the file viewer, which displays up to 100 lines of the file at a time. The agent can scroll through the file using commands such as &lt;code&gt;scroll_down&lt;/code&gt; and &lt;code&gt;scroll_up&lt;/code&gt; or directly access a specific line with the &lt;code&gt;goto&lt;/code&gt; command. This functionality helps the agent efficiently locate and analyze specific sections of code.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;File Editor&lt;/strong&gt;: The file editor allows the agent to make modifications to the code by replacing specified lines. The agent needs to specify the line numbers where a change should be made. The authors of &lt;em&gt;SWE-Agent&lt;/em&gt; note that this is one of the most common points of failure, as LLMs really struggle with counting. After editing, the updated content is immediately displayed to the agent, ensuring that changes can be reviewed in real-time. As LLMs struggle with editing files in such a way that the resulting file contains syntactically valid python code, a code linter is utilized to provide feedback on any mistakes detected during the editing process.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Context Management&lt;/strong&gt;: To maintain a concise and relevant context, &lt;em&gt;SWE-Agent&lt;/em&gt; employs various strategies, such as informative prompts, error messages, and context trimming. The agent is guided to generate both a thought and an action at each step, and any malformed commands trigger error responses that prompt the agent to retry until a valid action is generated.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The design of the ACI is informed by principles derived from human-computer interaction (HCI) studies, emphasizing simplicity, efficiency, and informative feedback to enhance the agent&amp;rsquo;s performance. For example, commands are kept simple and concise to prevent pollution of the context window, operations are consolidated to minimize the number of actions needed, and feedback is concise yet sufficiently informative to guide the agent effectively. Additionally, guardrails such as syntax checkers are implemented to prevent error propagation and assist the agent in quickly recovering from mistakes.
Analysis and ablation studies of &lt;em&gt;SWE-Agent&lt;/em&gt; demonstrate that these principles significantly improve performance across various tasks, highlighting the importance of designing ACIs tailored to the unique strengths and limitations of LLM agents.&lt;/p&gt;
&lt;h3 id="332-results"&gt;3.3.2 Results&lt;/h3&gt;
&lt;p&gt;Clearly, it can be seen that SWE-Agent greatly outperforms the retrieval-based methods. The improved results come at a cost, quite literally, as the average cost of one run on one problem instance of the dataset are tenfold compared to the retrieval-based approach. The reason for this is that the retrieval does not occur through some heuristic. Instead, the agent browses different files and makes decisions based on the contexts of the files and the agent&amp;rsquo;s internal monologue. Thus, there are great inefficiencies whenever a file or even a part of a file is loaded into the context window that the LLM has to look through to judge whether it is needed to solve the issue.&lt;/p&gt;


&lt;figure&gt;
 &lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width:50%" src="https://monkemanx.github.io/attachments/llm_software_engineering/res-swe.png"&gt;
 &lt;figcaption style="text-align:center; margin-top: 10px;"&gt;
 Main results for *SWE-Agent* performance on the full and Lite splits of the SWE-bench test set, taken from SWE-Agent*. The models that they benchmark are the retrieval-based method, which they call RAG, an agent with a basic CLI, i.e. without an ACI, and *SWE-Agent*.
 &lt;/figcaption&gt;
&lt;/figure&gt;




&lt;figure&gt;
 &lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width:100%" src="https://monkemanx.github.io/attachments/llm_software_engineering/acr.png"&gt;
 &lt;figcaption style="text-align:center; margin-top: 10px;"&gt;
 Overall workflow of AutoCodeRover.
 &lt;/figcaption&gt;
&lt;/figure&gt;


&lt;h2 id="34-autocoderover"&gt;3.4 AutoCodeRover&lt;/h2&gt;
&lt;p&gt;&lt;em&gt;AutoCodeRover&lt;/em&gt; is another automated approach designed to autonomously solve GitHub issues. Unlike other methods, such as SWE-Agent, which treats the codebase as a collection of files, AutoCodeRover represents the codebase using an abstract syntax tree. This structural representation allows for more efficient code search during the iterative process, thereby enhancing the LLM&amp;rsquo;s understanding of the codebase.&lt;/p&gt;
&lt;p&gt;Additionally, AutoCodeRover employs &lt;em&gt;spectrum-based fault localization&lt;/em&gt; to improve the LLM&amp;rsquo;s contextual understanding when tests are available. The authors&amp;rsquo; experiments demonstrate that this method successfully solves 19% of the issues in SWE-Bench-Lite, marking an improvement compared to SWE-Agent.&lt;/p&gt;
&lt;p&gt;Spectrum-based fault localization aims to identify faulty code segments by analyzing control-flow differences between successful and unsuccessful test cases and assigning a suspiciousness score to the likely problematic areas.&lt;/p&gt;
&lt;h3 id="341-method"&gt;3.4.1 Method&lt;/h3&gt;
&lt;p&gt;AutoCodeRover takes as input a problem and a codebase. The problem consists of a title and a description in natural language. The codebase must be available offline on the disk. AutoCodeRover operates in two phases: the &lt;em&gt;context-retrieval stage&lt;/em&gt; and the &lt;em&gt;patch generation stage&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;In the context-retrieval stage, the agent uses various code search tools, to navigate through the codebase and identify sections relevant to the problem. This phase is iterative; at the end of each iteration, the model evaluates whether it has gathered sufficient context or if additional information is needed. If the model determines that it has enough context, it proceeds to the patch generation stage. Otherwise, it remains in the context-retrieval stage and performs another iteration.&lt;/p&gt;
&lt;p&gt;A single iteration of the context-retrieval stage operates as follows: First, the model selects a set of tools it wishes to use. These tools are then executed, and their output is returned to the agent. For the evaluation, the agent receives not only the context collected during the context-retrieval stage but also code snippets identified by Spectrum-based Fault Localization, which are likely to contain faulty code. In the patch generation stage, the agent uses the previously retrieved context to generate a software patch in a specific format intended to resolve the issue. If the agent is unable to generate a patch in the correct format, it enters a retry loop, where it attempts a predefined number of times to create a software patch. If after the predefined number of times no patch was created, AutoCodeRover fails the instance.&lt;/p&gt;
&lt;h3 id="342-evaluation"&gt;3.4.2 Evaluation&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;Experiment Setup&lt;/strong&gt;
The authors evaluate AutoCodeRover on SWE-Bench and SWE-Bench-Lite, which contain 2,294 and 300 GitHub issues, respectively. Additionally, they use Devin and SWE-Agent as baselines to compare their performance with AutoCodeRover. Each experiment is repeated three times to mitigate the randomness inherent to LLMs. The LLM model used is GPT-4, which is responsible both for searching the codebase and generating the final software patch. AutoCodeRover concludes either when a patch is successfully generated or after ten attempts if no patch can be produced.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Results&lt;/strong&gt;
AutoCodeRover achieves an accuracy of 17.60% on the full SWE-Bench with a single pass and 17.96% when running three passes per instance. In comparison, SWE-Agent resolves 12.47% of all GitHub issues in the full SWE-Bench. On SWE-Bench-Lite, the accuracy of AutoCodeRover increases to 19.00% for a single pass per instance, which is expected since SWE-Bench-Lite includes many of the easier instances. This is compared to SWE-Agent, which resolves 18.00% of all instances.&lt;/p&gt;
&lt;h2 id="35-agentless"&gt;3.5 Agentless&lt;/h2&gt;
&lt;p&gt;Most methods used to solve SWE-Bench rely on an agent-based approach, including systems like AutoCodeRover and SWE-Agent.
These agents perform tasks such as reading and editing files, navigating the codebase and observing feedback. The agent makes multiple attempts, with each attempt consisting of several actions, such as using tools, with each action depending on the previous one.&lt;/p&gt;
&lt;p&gt;This approach introduces several challenges:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Complex and difficult-to-use tools&lt;/strong&gt;: Tool usage often requires the LLM-generated response to follow a precise format, which can be challenging for an LLM to achieve consistently, especially if the LLM is not fine-tuned on the tool-use.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Lack of control in planning&lt;/strong&gt;: In an agent-based approach, the agent autonomously decides the next action based on feedback from the previous one. However, due to the large action space, the LLM can easily become confused.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Limited ability to self-reflect&lt;/strong&gt;: LLMs often struggle to differentiate between useful feedback and misleading information, which can lead them down the wrong path.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;em&gt;Agentless&lt;/em&gt; addresses these issues by removing the agent-based approach altogether. Instead, it operates in two straightforward phases: identifying the buggy code and repairing it. Specifically, it follows these steps:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The process begins by taking the existing project codebase and issue description as input.&lt;/li&gt;
&lt;li&gt;The codebase is then transformed into a tree-like structure.&lt;/li&gt;
&lt;li&gt;The LLM ranks the top $N$ most suspicious files that likely require editing to resolve the issue.&lt;/li&gt;
&lt;li&gt;For each of these selected files, the LLM receives a list of class and function declarations and selects those that appear suspicious.&lt;/li&gt;
&lt;li&gt;The full code for the identified suspicious classes and functions is provided to the LLM.&lt;/li&gt;
&lt;li&gt;Using these full code snippets, the LLM makes edits to address the issue. This step is repeated to generate multiple software patches.&lt;/li&gt;
&lt;li&gt;The generated patches are filtered to eliminate syntax errors and test failures.&lt;/li&gt;
&lt;li&gt;Finally, the patches are ranked by the LLM, and the top-ranked patch is chosen as the solution.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;None of the techniques used by Agentless in isolation are unique or new. Instead, it cleverly combines them into a simple pipeline for autonomous software engineering, avoiding many of the pitfalls encountered by agent-based approaches through this simplicity.&lt;/p&gt;
&lt;p&gt;This methodology allows Agentless to outperform other agent-based techniques, achieving a solve rate of 27.33% on SWE-Bench, compared to 18.00% for SWE-Agent, and 19.00% for AutoCodeRover.&lt;/p&gt;


&lt;figure&gt;
 &lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width:70%" src="https://monkemanx.github.io/attachments/llm_software_engineering/overview.png"&gt;
 &lt;figcaption style="text-align:center; margin-top: 10px;"&gt;
 This graphic depicts the overall workflow of Agentless.
 &lt;/figcaption&gt;
&lt;/figure&gt;


&lt;h1 id="4-outlook"&gt;4. Outlook&lt;/h1&gt;
&lt;p&gt;In this report, we introduced the concept of LLM Agents and specifically talk about their application in a Software Engineering setup. As benchmarks for coding are rather oversaturated and do not depict the depth of software engineering, we introduced SWE-Bench, a benchmark that aims to mitigate the issues that other coding benchmarks are plagued with. We then systematically introduced different LLM Agents that were conceived to solve SWE-Bench specifically and software engineering more broadly. We started with retrieval based methods that are not LLM Agents as they are commonly understood. We saw that they are almost completely incapable of solving SWE Bench. Then, we introduced SWE-Agent and AutoCodeRover, which are truly agentic approaches, that set a new standard for SWE-Bench respectively. Lastly, we took a look at Agentless, a non-agentic approach that provides more structure and is reminiscent of the retrieval-based methods, which currently ranks among the best systems to solve SWE-Bench and is, more specifically, much cheaper than the other approaches.&lt;/p&gt;
&lt;p&gt;It remains to be seen whether the future of LLM-based Coding agents will be dominated by more agentic approaches that give the LLM more freedom in decision making or in less agentic approaches that greatly limit the flexibility of the LLM and provide a structure that the LLM is forced to follow. As the capabilities of LLM agents is largely a function of the capabilities of the underlying LLMs, it is expected that LLM agents will get better on their own, without having to change the agent framework. It indicates that, without improved agent frameworks, good results on SWE-Bench will be limited to huge, closed-source LLMs. Research into LLM capability enhancement for software engineering will, thus, be of great importance for companies and users that value data ownership and model sovereignty.&lt;/p&gt;</description></item><item><title>A Basic Linux Rice</title><link>https://monkemanx.github.io/articles/linux_rice/</link><pubDate>Wed, 21 Aug 2024 00:00:00 +0000</pubDate><author>monkeman@cock.li (MonkeMan)</author><guid>https://monkemanx.github.io/articles/linux_rice/</guid><description>&lt;h1 id="introduction"&gt;Introduction&lt;/h1&gt;
&lt;p&gt;A few months ago, I switched from &lt;a href="https://www.debian.org/"&gt;Debian&lt;/a&gt; to the &lt;a href="https://archlinux.org/"&gt;Arch&lt;/a&gt; operating system. There were three major reasons for my switch:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Debian is often hailed as the most &lt;em&gt;stable&lt;/em&gt; operating system out there. This stability comes from the extensive testing that new software or updates undergo before being released. However, this also has a disadvantage: the software on Debian is often outdated. For example, at the time of writing this post, the latest version of Neovim available on the current Debian release (Bookworm) is &lt;code&gt;0.7.2&lt;/code&gt;, while Neovim has already released version &lt;code&gt;0.10.1&lt;/code&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Debian comes with a lot of default software that you might not need. I wanted to try a minimal installation with the dynamic tiling window manager &lt;a href="https://hyprland.org/"&gt;Hyprland&lt;/a&gt;, which, at that time, wasn&amp;rsquo;t supported by Debian.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Arch, being very minimal and bare-bones, is great for learning the ins and outs of Linux.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;In the process of switching, I built my &amp;lsquo;own&amp;rsquo; operating system step by step by installing and customizing various pieces of software. I gradually &lt;em&gt;riced&lt;/em&gt; my setup to what you can see below:&lt;/p&gt;








 
 &lt;link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet"&gt;



 
 &lt;script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" crossorigin="anonymous"&gt;&lt;/script&gt;



&lt;style&gt;
#slide-window {
 position: relative;
 width: 100%;
 height: 510px;
 overflow: hidden;
 top: 0px;
 display: block; 
 margin-left: auto; 
 margin-right: auto;
}

#slides-list {
 width: 100%;
 height: 510px;
 position: absolute;
 margin: 0px;
 padding: 0px;
 -webkit-transform: translate3d(0px, 0px, 0px);
 transform: translate3d(0px, 0px, 0px);
 transition: all 0.66s ease;
 -webkit-transition: all 0.66s ease;
}

.slide {
 list-style: none;
 position: relative;
 float: left;
 margin: 0;
 padding: 0;
 width: 100%;
 height: 510px;
 background: #ccc;
 text-align: center;
 line-height: 100%;
 background-size: cover;
 background-position: 50% 50%;
 color: #fff;
 -webkit-transform: translate3d(0px, 0px, 0px);
 -webkit-transform-style: preserve-3d;
}

.nav {
 position: relative;
 z-index: 9;
 top: 45%;
 cursor: pointer;
 color: #fff;
 opacity: 0.8;
 transition: all 0.66s ease;
 -webkit-transition: all 0.66s ease;

 
 text-shadow: 
 -1px -1px 0 #000, 
 1px -1px 0 #000,
 -1px 1px 0 #000,
 1px 1px 0 #000;
}

.nav:hover {
 opacity: 1.0;
}

#left {
 left: 3%;
 float: left;
}

#right {
 right: 3%;
 float: right;
}
&lt;/style&gt;


&lt;div id="slide-window"&gt;
 &lt;ol id="slides-list"&gt;
 &lt;li class="slide" style="background-image:url(https://monkemanx.github.io/attachments/desktop/desktop1.jpg);"&gt;&lt;/li&gt;
 &lt;li class="slide" style="background-image:url(https://monkemanx.github.io/attachments/desktop/desktop2.jpg);"&gt;&lt;/li&gt;
 &lt;li class="slide" style="background-image:url(https://monkemanx.github.io/attachments/desktop/desktop3.jpg);"&gt;&lt;/li&gt;
 &lt;/ol&gt;
 &lt;span class="nav fa fa-chevron-left fa-3x" id="left"&gt;&lt;/span&gt;
 &lt;span class="nav fa fa-chevron-right fa-3x" id="right"&gt;&lt;/span&gt;
&lt;/div&gt;

&lt;script&gt;
sliderJQuery = jQuery.noConflict();
sliderJQuery(function( $ ) {
 $.global = new Object();
 $.global.total = 0;

 $(document).ready(function () {
 var slideWindowWidth = $('#slide-window').width();
 var slideCount = $('#slides-list li').length;
 var totalSlidesWidth = slideCount * slideWindowWidth;

 $.global.item = 0;
 $.global.total = slideCount;

 $('.slide').css('width', slideWindowWidth + 'px');
 $('#slides-list').css('width', totalSlidesWidth + 'px');

 $('#left').click(function () {
 resetAutoSlide();
 performSlide('back');
 });

 $('#right').click(function () {
 resetAutoSlide();
 performSlide('forward');
 });

 });

 function performSlide(direction) {
 if (direction == 'back') {
 var nextSlideId = $.global.item - 1;
 }
 if (direction == 'forward') {
 var nextSlideId = $.global.item + 1;
 }

 if (nextSlideId == -1) {
 
 moveCss($.global.total - 1);
 } else if (nextSlideId == $.global.total) {
 
 moveCss(0);
 } else {
 
 moveCss(nextSlideId);
 }
 }

 function moveCss(nextSlideId) {
 var slideWindowWidth = $('#slide-window').width();
 var margin = slideWindowWidth * nextSlideId;

 $('#slides-list').css('transform', 'translate3d(-' + margin + 'px,0px,0px)');

 $.global.item = nextSlideId;
 }

 
 var autoSlide = parseInt("0", 10);
 var autoSlideInterval;
 function resetAutoSlide(){
 if(autoSlide) {
 if(autoSlideInterval) {
 clearInterval(autoSlideInterval);
 }
 autoSlideInterval = setInterval(function(){
 performSlide('forward');
 }, autoSlide)
 }
 }
 resetAutoSlide();
});
&lt;/script&gt;

&lt;h1 id="what-is-ricing"&gt;What is Ricing?&lt;/h1&gt;
&lt;p&gt;Linux ricing describes the process of customizing one&amp;rsquo;s desktop environment to their liking. It involves modifying icons, color schemes, the taskbar, startup apps, screensaver, lock screens, and much more. The saying &amp;ldquo;your creativity is the only limit&amp;rdquo; is especially true when it comes to ricing your Linux environment.
You can find many Linux rices online, with one popular gathering place being the &lt;em&gt;unixporn&lt;/em&gt; subreddit.&lt;/p&gt;
&lt;h1 id="my-rice"&gt;My Rice&lt;/h1&gt;
&lt;p&gt;In this section, I want to go through how I customized linux to look like in the slideshow above. This is not meant as an elaborate complete guide on how to customize linux, but more as a form of documentation for myself and as a starting point of what you can do for others.&lt;/p&gt;
&lt;p&gt;My entire rice is based on the &lt;a href="https://github.com/morhetz/gruvbox"&gt;gruvbox dark&lt;/a&gt; color palette, if at any point In the guide I use colors I got them from this repository.&lt;/p&gt;
&lt;h2 id="tiling-manager-i3"&gt;Tiling Manager: i3&lt;/h2&gt;
&lt;p&gt;&lt;a href="https://i3wm.org/"&gt;I3&lt;/a&gt; is a dynamic &lt;a href="https://en.wikipedia.org/wiki/Tiling_window_manager"&gt;tiling window manager&lt;/a&gt; for your Linux desktop environment.&lt;/p&gt;


&lt;video style="display: block; margin-left: auto; margin-right: auto; width:80%" controls muted&gt;
 &lt;source src="https://monkemanx.github.io/attachments/i3.mp4" type="video/mp4"&gt;
 Your browser does not support this embedded video.
&lt;/video&gt;


&lt;p&gt;I started with the i3 &lt;a href="https://github.com/i3/i3/blob/next/etc/config.keycodes"&gt;default config&lt;/a&gt; and modified it to suit my needs. Here, I’ll highlight some parts of my configuration that differ from the default. You should find the default config file under &lt;code&gt;~/.config/i3/config&lt;/code&gt;. If it’s not there, create the file and copy the default i3 configuration into it.&lt;/p&gt;
&lt;p&gt;I set the font in the i3 config to one of the &lt;a href="https://www.nerdfonts.com/"&gt;Nerd Fonts&lt;/a&gt;:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-sh" data-lang="sh"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;1&lt;/span&gt;&lt;span class="cl"&gt;font pango:Hack Nerd Font &lt;span class="m"&gt;10&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;For this to work, you first need to install the font. On Arch, you can do this with &lt;code&gt;pacman -S &amp;lt;name_nerd_font&amp;gt;&lt;/code&gt;. You can find the names of the Nerd Fonts &lt;a href="https://archlinux.org/groups/x86_64/nerd-fonts/"&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;I created some custom keybindings to launch apps that I often use:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-sh" data-lang="sh"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 1&lt;/span&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 2&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;# start a terminal&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 3&lt;/span&gt;&lt;span class="cl"&gt;bindsym &lt;span class="nv"&gt;$mod&lt;/span&gt;+t &lt;span class="nb"&gt;exec&lt;/span&gt; kitty
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 4&lt;/span&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 5&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;# start internet browser&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 6&lt;/span&gt;&lt;span class="cl"&gt;bindsym &lt;span class="nv"&gt;$mod&lt;/span&gt;+i &lt;span class="nb"&gt;exec&lt;/span&gt; firefox
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 7&lt;/span&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 8&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;# open file manager&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 9&lt;/span&gt;&lt;span class="cl"&gt;bindsym &lt;span class="nv"&gt;$mod&lt;/span&gt;+f &lt;span class="nb"&gt;exec&lt;/span&gt; thunar
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;10&lt;/span&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;11&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;# kill focused window&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;12&lt;/span&gt;&lt;span class="cl"&gt;bindsym &lt;span class="nv"&gt;$mod&lt;/span&gt;+Shift+q &lt;span class="nb"&gt;kill&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;13&lt;/span&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;14&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;# take screenshots&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;15&lt;/span&gt;&lt;span class="cl"&gt;bindsym Print &lt;span class="nb"&gt;exec&lt;/span&gt; &lt;span class="s2"&gt;&amp;#34;flameshot gui&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;16&lt;/span&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;17&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;# start dmenu (a program launcher)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;18&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;# bindsym $mod+m exec --no-startup-id dmenu_run # old&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;19&lt;/span&gt;&lt;span class="cl"&gt;bindsym &lt;span class="nv"&gt;$mod&lt;/span&gt;+m &lt;span class="nb"&gt;exec&lt;/span&gt; --no-startup-id rofi -show run
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Since I use a dual-monitor setup, I define my two monitors:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-sh" data-lang="sh"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 1&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="nb"&gt;set&lt;/span&gt; &lt;span class="nv"&gt;$monitor1&lt;/span&gt; &lt;span class="s2"&gt;&amp;#34;HDMI-0&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 2&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="nb"&gt;set&lt;/span&gt; &lt;span class="nv"&gt;$monitor2&lt;/span&gt; &lt;span class="s2"&gt;&amp;#34;DVI-D-2&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 3&lt;/span&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 4&lt;/span&gt;&lt;span class="cl"&gt;workspace &lt;span class="nv"&gt;$ws1&lt;/span&gt; output &lt;span class="nv"&gt;$monitor1&lt;/span&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 5&lt;/span&gt;&lt;span class="cl"&gt;...
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 6&lt;/span&gt;&lt;span class="cl"&gt;workspace &lt;span class="nv"&gt;$ws10&lt;/span&gt; output &lt;span class="nv"&gt;$monitor2&lt;/span&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 7&lt;/span&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 8&lt;/span&gt;&lt;span class="cl"&gt;bindsym &lt;span class="nv"&gt;$mod&lt;/span&gt;+1 workspace number &lt;span class="nv"&gt;$ws1&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 9&lt;/span&gt;&lt;span class="cl"&gt;...
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;10&lt;/span&gt;&lt;span class="cl"&gt;bindsym &lt;span class="nv"&gt;$mod&lt;/span&gt;+0 workspace number &lt;span class="nv"&gt;$ws10&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;If you&amp;rsquo;re unsure which exact port your monitor is using, you can use &lt;code&gt;xrandr&lt;/code&gt; to find out.&lt;/p&gt;
&lt;p&gt;Setting my Gruvbox color scheme:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-sh" data-lang="sh"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;1&lt;/span&gt;&lt;span class="cl"&gt;class border backgr. text indicator child_border
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;2&lt;/span&gt;&lt;span class="cl"&gt;client.focused &lt;span class="c1"&gt;#d65d0e #d65d0e #fbf1c7 #d65d0e #d65d0e &lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;3&lt;/span&gt;&lt;span class="cl"&gt;client.focused_inactive &lt;span class="c1"&gt;#282828 #282828 #fbf1c7 #282828 #282828&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;4&lt;/span&gt;&lt;span class="cl"&gt;client.unfocused &lt;span class="c1"&gt;#282828 #282828 #fbf1c7 #282828 #282828 &lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;5&lt;/span&gt;&lt;span class="cl"&gt;client.urgent &lt;span class="c1"&gt;#2f343a #900000 #ffffff #900000 #900000&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;6&lt;/span&gt;&lt;span class="cl"&gt;client.placeholder &lt;span class="c1"&gt;#000000 #0c0c0c #ffffff #000000 #0c0c0c&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;7&lt;/span&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;8&lt;/span&gt;&lt;span class="cl"&gt;client.background &lt;span class="c1"&gt;#ffffff&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Finally, I use the image viewer &lt;a href="https://github.com/derf/feh"&gt;feh&lt;/a&gt; for my desktop background and Polybar for my taskbar:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-sh" data-lang="sh"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;1&lt;/span&gt;&lt;span class="cl"&gt;exec_always ~/.config/polybar/launch.sh &lt;span class="p"&gt;&amp;amp;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;2&lt;/span&gt;&lt;span class="cl"&gt;exec_always feh --bg-fill ~/Pictures/wallpaper/reverend_insanity.jpeg 
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;You can restart i3 and apply your changes using the key combination &lt;code&gt;SUPER + SHIFT + r&lt;/code&gt; (unless you’ve changed this keybinding in the i3 configuration file).&lt;/p&gt;
&lt;h2 id="taskbar-polybar"&gt;Taskbar: Polybar&lt;/h2&gt;
&lt;p&gt;&lt;a href="https://github.com/polybar/polybar"&gt;Polybar&lt;/a&gt; is an easy-to-use status bar.&lt;/p&gt;


&lt;figure&gt;
 &lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width:100%" src="https://monkemanx.github.io/attachments/polybar1.jpg"&gt;
 &lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width:100%" src="https://monkemanx.github.io/attachments/polybar2.jpg"&gt;
 &lt;figcaption style="text-align:center; margin-top: 10px;"&gt;&lt;/figcaption&gt;
&lt;/figure&gt;


&lt;p&gt;After installing Polybar, you should be able to find the configuration files under &lt;code&gt;~/.config/polybar/config.ini&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;I first changed the colors to the Gruvbox theme:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-sh" data-lang="sh"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 1&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="nv"&gt;background&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="c1"&gt;#282828&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 2&lt;/span&gt;&lt;span class="cl"&gt;background-alt &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="c1"&gt;#282828 &lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 3&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="nv"&gt;foreground&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="c1"&gt;#ebdb2&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 4&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="nv"&gt;alert&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="c1"&gt;#cc241d&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 5&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="nv"&gt;green&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="c1"&gt;#98971a &lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 6&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="nv"&gt;yellow&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="c1"&gt;#d79921 &lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 7&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="nv"&gt;blue&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="c1"&gt;#458588&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 8&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="nv"&gt;purple&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="c1"&gt;#b16286&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 9&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="nv"&gt;aqua&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="c1"&gt;#689d6a &lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;10&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="nv"&gt;red&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="c1"&gt;#fb4934&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Then, I set all the modules that I want to have in my status bar:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-sh" data-lang="sh"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;1&lt;/span&gt;&lt;span class="cl"&gt;modules-left &lt;span class="o"&gt;=&lt;/span&gt; xworkspaces xwindow
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;2&lt;/span&gt;&lt;span class="cl"&gt;modules-right &lt;span class="o"&gt;=&lt;/span&gt; pulseaudio memory cpu date
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;I also changed the fonts:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-sh" data-lang="sh"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;1&lt;/span&gt;&lt;span class="cl"&gt;font-0 &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;&amp;#34;Hack Nerd Font:size=10;2&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;2&lt;/span&gt;&lt;span class="cl"&gt;font-1 &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;&amp;#34;Hack Nerd Font:size=10;2&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Finally, I set the color for CPU, Memory, Volume, and Time to yellow:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-sh" data-lang="sh"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;1&lt;/span&gt;&lt;span class="cl"&gt;format-prefix-foreground &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;colors&lt;/span&gt;&lt;span class="p"&gt;.yellow&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id="terminal-kitty"&gt;Terminal: Kitty&lt;/h2&gt;
&lt;p&gt;&lt;a href="https://sw.kovidgoyal.net/kitty/"&gt;Kitty&lt;/a&gt; is a terminal emulator that uses the GPU to make it blazingly fast.&lt;/p&gt;


&lt;figure&gt;
 &lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width:80%" src="https://monkemanx.github.io/attachments/kitty.jpg"&gt;
 &lt;figcaption style="text-align:center; margin-top: 10px;"&gt;&lt;/figcaption&gt;
&lt;/figure&gt;


&lt;p&gt;As with the previous two applications, you will find its configuration file in &lt;code&gt;~/.config/kitty/kitty.conf&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;First, let&amp;rsquo;s set the font:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-sh" data-lang="sh"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;1&lt;/span&gt;&lt;span class="cl"&gt;font_family Hack Nerd Font
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;2&lt;/span&gt;&lt;span class="cl"&gt;font_size 	 13.0
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;3&lt;/span&gt;&lt;span class="cl"&gt;bold_font auto
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;4&lt;/span&gt;&lt;span class="cl"&gt;italic_font auto
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;5&lt;/span&gt;&lt;span class="cl"&gt;bold_italic_font auto
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Next, we’ll create keybindings that allow us to change the font size in the terminal using &lt;code&gt;CTRL + PLUS&lt;/code&gt; and &lt;code&gt;CTRL + MINUS&lt;/code&gt;:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-sh" data-lang="sh"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;1&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;# increase font size&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;2&lt;/span&gt;&lt;span class="cl"&gt;map ctrl+plus change_font_size all +1.0
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;3&lt;/span&gt;&lt;span class="cl"&gt;map ctrl+kp_add change_font_size all +1.0
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;4&lt;/span&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;5&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;# decrease font size&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;6&lt;/span&gt;&lt;span class="cl"&gt;map ctrl+minus change_font_size all -1.0
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;7&lt;/span&gt;&lt;span class="cl"&gt;map ctrl+kp_minus change_font_size all -1.0
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Finally, let&amp;rsquo;s set the Gruvbox theme:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-sh" data-lang="sh"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 1&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;# Gruvbox theme &lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 2&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;# Based on https://github.com/morhetz/gruvbox by morhetz &amp;lt;morhetz@gmail.com&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 3&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;# Adapted to Kitty by wdomitrz &amp;lt;witekdomitrz@gmail.com&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 4&lt;/span&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 5&lt;/span&gt;&lt;span class="cl"&gt;cursor &lt;span class="c1"&gt;#928374&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 6&lt;/span&gt;&lt;span class="cl"&gt;cursor_text_color background
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 7&lt;/span&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 8&lt;/span&gt;&lt;span class="cl"&gt;url_color &lt;span class="c1"&gt;#83a598&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 9&lt;/span&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;10&lt;/span&gt;&lt;span class="cl"&gt;visual_bell_color &lt;span class="c1"&gt;#8ec07c&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;11&lt;/span&gt;&lt;span class="cl"&gt;bell_border_color &lt;span class="c1"&gt;#8ec07c&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;12&lt;/span&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;13&lt;/span&gt;&lt;span class="cl"&gt;active_border_color &lt;span class="c1"&gt;#d3869b&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;14&lt;/span&gt;&lt;span class="cl"&gt;inactive_border_color &lt;span class="c1"&gt;#665c54&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;15&lt;/span&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;16&lt;/span&gt;&lt;span class="cl"&gt;foreground &lt;span class="c1"&gt;#ebdbb2&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;17&lt;/span&gt;&lt;span class="cl"&gt;background &lt;span class="c1"&gt;#282828&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;18&lt;/span&gt;&lt;span class="cl"&gt;selection_foreground &lt;span class="c1"&gt;#928374&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;19&lt;/span&gt;&lt;span class="cl"&gt;selection_background &lt;span class="c1"&gt;#ebdbb2&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;20&lt;/span&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;21&lt;/span&gt;&lt;span class="cl"&gt;active_tab_foreground &lt;span class="c1"&gt;#fbf1c7&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;22&lt;/span&gt;&lt;span class="cl"&gt;active_tab_background &lt;span class="c1"&gt;#665c54&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;23&lt;/span&gt;&lt;span class="cl"&gt;inactive_tab_foreground &lt;span class="c1"&gt;#a89984&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;24&lt;/span&gt;&lt;span class="cl"&gt;inactive_tab_background &lt;span class="c1"&gt;#3c3836&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;25&lt;/span&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;26&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;# black (bg3/bg4)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;27&lt;/span&gt;&lt;span class="cl"&gt;color0 &lt;span class="c1"&gt;#665c54&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;28&lt;/span&gt;&lt;span class="cl"&gt;color8 &lt;span class="c1"&gt;#7c6f64&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;29&lt;/span&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;30&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;# red&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;31&lt;/span&gt;&lt;span class="cl"&gt;color1 &lt;span class="c1"&gt;#cc241d&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;32&lt;/span&gt;&lt;span class="cl"&gt;color9 &lt;span class="c1"&gt;#fb4934&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;33&lt;/span&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;34&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;# green&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;35&lt;/span&gt;&lt;span class="cl"&gt;color2 &lt;span class="c1"&gt;#98971a&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;36&lt;/span&gt;&lt;span class="cl"&gt;color10 &lt;span class="c1"&gt;#b8bb26&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;37&lt;/span&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;38&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;# yellow&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;39&lt;/span&gt;&lt;span class="cl"&gt;color3 &lt;span class="c1"&gt;#d79921&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;40&lt;/span&gt;&lt;span class="cl"&gt;color11 &lt;span class="c1"&gt;#fabd2f&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;41&lt;/span&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;42&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;# blue&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;43&lt;/span&gt;&lt;span class="cl"&gt;color4 &lt;span class="c1"&gt;#458588&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;44&lt;/span&gt;&lt;span class="cl"&gt;color12 &lt;span class="c1"&gt;#83a598&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;45&lt;/span&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;46&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;# purple&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;47&lt;/span&gt;&lt;span class="cl"&gt;color5 &lt;span class="c1"&gt;#b16286&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;48&lt;/span&gt;&lt;span class="cl"&gt;color13 &lt;span class="c1"&gt;#d3869b&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;49&lt;/span&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;50&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;# aqua&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;51&lt;/span&gt;&lt;span class="cl"&gt;color6 &lt;span class="c1"&gt;#689d6a&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;52&lt;/span&gt;&lt;span class="cl"&gt;color14 &lt;span class="c1"&gt;#8ec07c&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;53&lt;/span&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;54&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;# white (fg4/fg3)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;55&lt;/span&gt;&lt;span class="cl"&gt;color7 &lt;span class="c1"&gt;#a89984&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;56&lt;/span&gt;&lt;span class="cl"&gt;color15 &lt;span class="c1"&gt;#bdae93&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id="file-explorer-thunar"&gt;File Explorer: Thunar&lt;/h3&gt;
&lt;p&gt;&lt;a href="https://docs.xfce.org/xfce/thunar/start"&gt;Thunar&lt;/a&gt; is a file manager for the XFCE desktop environment.&lt;/p&gt;


&lt;figure&gt;
 &lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width:80%" src="https://monkemanx.github.io/attachments/thunar_gruvbox.jpg"&gt;
 &lt;figcaption style="text-align:center; margin-top: 10px;"&gt;&lt;/figcaption&gt;
&lt;/figure&gt;


&lt;p&gt;The Gruvbox theme can be installed via pacman using &lt;code&gt;sudo pacman -S gruvbox-material-gtk-theme-git&lt;/code&gt; and &lt;code&gt;sudo pacman -S gruvbox-material-icon-theme-git&lt;/code&gt;. To switch to the Gruvbox theme, I use &lt;a href="https://github.com/lxde/lxappearance"&gt;LXAppearance&lt;/a&gt;, which can be installed with &lt;code&gt;sudo pacman -S lxappearance&lt;/code&gt;. Open LXAppearance and select &amp;ldquo;Gruvbox-material-Dark&amp;rdquo; under both the Widgets and Icon Theme sections.&lt;/p&gt;
&lt;p&gt;If Thunar doesn’t change its appearance after this, it might be running as a daemon. Run &lt;code&gt;thunar -q&lt;/code&gt; to quit the daemon and then reopen Thunar; the theme should now be applied.&lt;/p&gt;
&lt;h3 id="browser-firefox"&gt;Browser: Firefox&lt;/h3&gt;


&lt;figure&gt;
 &lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width:80%" src="https://monkemanx.github.io/attachments/firefox.jpg"&gt;
 &lt;figcaption style="text-align:center; margin-top: 10px;"&gt;&lt;/figcaption&gt;
&lt;/figure&gt;


&lt;p&gt;The Gruvbox theme can be installed on Firefox via an &lt;a href="https://addons.mozilla.org/en-US/firefox/addon/gruvbox-dark-theme/"&gt;addon&lt;/a&gt;.&lt;/p&gt;
&lt;h3 id="system-monitor-btop"&gt;System Monitor: Btop&lt;/h3&gt;
&lt;p&gt;&lt;a href="https://github.com/aristocratos/btop"&gt;Btop&lt;/a&gt; is a resource monitor, which is a more feature-rich version of &lt;code&gt;htop&lt;/code&gt;.&lt;/p&gt;


&lt;figure&gt;
 &lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width:80%" src="https://monkemanx.github.io/attachments/btop.jpg"&gt;
 &lt;figcaption style="text-align:center; margin-top: 10px;"&gt;&lt;/figcaption&gt;
&lt;/figure&gt;


&lt;p&gt;To change the theme in Btop, run &lt;code&gt;btop&lt;/code&gt;, press &lt;code&gt;ESC&lt;/code&gt;, choose &lt;code&gt;Options&lt;/code&gt;, and then select &lt;code&gt;gruvbox-ark-material&lt;/code&gt; as the color theme.&lt;/p&gt;
&lt;h3 id="pdf-reader-zathura"&gt;PDF Reader: Zathura&lt;/h3&gt;
&lt;p&gt;&lt;a href="https://wiki.archlinux.org/title/Zathura"&gt;Zathura&lt;/a&gt; is a customizable, minimalistic PDF reader that supports Vim keybindings.&lt;/p&gt;


&lt;figure&gt;
 &lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width:80%" src="https://monkemanx.github.io/attachments/zathura.jpg"&gt;
 &lt;figcaption style="text-align:center; margin-top: 10px;"&gt;&lt;/figcaption&gt;
&lt;/figure&gt;


&lt;p&gt;If you don’t have a config folder for Zathura, you&amp;rsquo;ll need to create one. Navigate to &lt;code&gt;~/.config/&lt;/code&gt; and run &lt;code&gt;mkdir Zathura&lt;/code&gt;. After this, you can install the Gruvbox theme by downloading it from &lt;a href="https://github.com/eastack/zathura-gruvbox"&gt;GitHub&lt;/a&gt;. Unpack it and run:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-sh" data-lang="sh"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;1&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="nb"&gt;cd&lt;/span&gt; zathura-gruvbox
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;2&lt;/span&gt;&lt;span class="cl"&gt;cp zathura-gruvbox-dark ~/.config/zathura/zathurarc
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id="fun-cbonsai-fortune-pipessh-cmatrix-and-fastfetch"&gt;Fun: CBonsai, Fortune, Pipes.Sh, CMatrix and Fastfetch&lt;/h3&gt;
&lt;p&gt;&lt;a href="https://gitlab.com/jallbrit/cbonsai"&gt;CBonsai&lt;/a&gt; is a program that grows a bonsai tree, and &lt;a href="https://wiki.archlinux.org/title/Fortune"&gt;Fortune&lt;/a&gt; is a program that displays random silly phrases from a database. &lt;a href="https://github.com/pipeseroni/pipes.sh"&gt;Pipes.sh&lt;/a&gt; animates pipes in your terminal. &lt;a href="https://github.com/abishekvashok/cmatrix"&gt;Cmatrix&lt;/a&gt; makes you look like a hacker. Last but not least, &lt;a href="https://github.com/fastfetch-cli/fastfetch"&gt;Fastfetch&lt;/a&gt; is the successor to Neofetch and displays information about your system.&lt;/p&gt;


&lt;video style="display: block; margin-left: auto; margin-right: auto; width:80%" controls muted&gt;
 &lt;source src="https://monkemanx.github.io/attachments/linux_fun.mp4" type="video/mp4"&gt;
 Your browser does not support this embedded video.
&lt;/video&gt;


&lt;p&gt;You can combine CBonsai and Fortune to grow a bonsai while displaying a random message:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-sh" data-lang="sh"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;1&lt;/span&gt;&lt;span class="cl"&gt;cbonsai -S -t 0.5 -m &lt;span class="s2"&gt;&amp;#34;&lt;/span&gt;&lt;span class="k"&gt;$(&lt;/span&gt;fortune&lt;span class="k"&gt;)&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The programs can be installed with the following command:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Fastfetch: &lt;code&gt;sudo pacman -S fastfetch&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Fortune: &lt;code&gt;sudo pacman -S fortune-mod&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;CBonsai: &lt;code&gt;yay -S cbonsai&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Pipes.Sh: &lt;code&gt;yay -S pipes.sh&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Cmatrix: &lt;code&gt;yay -S cmatrix-git&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If you’d like, you can autostart these programs to have a nice welcome screen. For example to autostart fastfetch and cbonsai, open your i3 config and add the following lines:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-sh" data-lang="sh"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;1&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="nb"&gt;exec&lt;/span&gt; --no-startup-id i3-msg &lt;span class="s1"&gt;&amp;#39;workspace 1; exec kitty --hold fastfetch&amp;#39;&lt;/span&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;2&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="nb"&gt;exec&lt;/span&gt; --no-startup-id i3-msg &lt;span class="s1"&gt;&amp;#39;workspace 1; exec kitty --hold cbonsai -S -t 0.5 -m &amp;#34;$(fortune)&amp;#34;&amp;#39;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id="backup-dotfiles-using-github"&gt;Backup Dotfiles Using GitHub&lt;/h3&gt;
&lt;p&gt;Now that you have a lot of configuration files that you might want to back up, one effective method is to use a Git repository.&lt;/p&gt;
&lt;p&gt;First, create a bare Git repository:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-sh" data-lang="sh"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;1&lt;/span&gt;&lt;span class="cl"&gt;git init --bare &lt;span class="nv"&gt;$HOME&lt;/span&gt;/dotfiles
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Next, add the following lines to your shell configuration file (in this example, I’m using &lt;code&gt;fish&lt;/code&gt;):&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-sh" data-lang="sh"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;1&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="nb"&gt;alias&lt;/span&gt; &lt;span class="nv"&gt;config&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;/usr/bin/git --git-dir=$HOME/dotfiles/ --work-tree=$HOME&amp;#39;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;In the future, you can update your Git repository with the following commands:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-sh" data-lang="sh"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;1&lt;/span&gt;&lt;span class="cl"&gt;config add ~/.config/nvim
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;2&lt;/span&gt;&lt;span class="cl"&gt;config commit -m &lt;span class="s2"&gt;&amp;#34;nvim changes&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;3&lt;/span&gt;&lt;span class="cl"&gt;config push
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;To hide files that you’re not tracking, run this command:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-sh" data-lang="sh"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;1&lt;/span&gt;&lt;span class="cl"&gt;config config --local status.showUntrackedFiles no
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;To push your dotfiles to GitHub, you’ll need to create a GitHub repository and define a remote:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-sh" data-lang="sh"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;1&lt;/span&gt;&lt;span class="cl"&gt;config remote add origin REMOTE-URL
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;hr&gt;
&lt;p&gt;References:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/tbiering/hugo-slider-shortcode"&gt;Image Slideshow Code&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.atlassian.com/git/tutorials/dotfiles"&gt;Dotfiles Backup&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>Neovim Markdown Preview: Command not working</title><link>https://monkemanx.github.io/articles/neovim_markdown_preview/</link><pubDate>Tue, 20 Aug 2024 00:00:00 +0000</pubDate><author>monkeman@cock.li (MonkeMan)</author><guid>https://monkemanx.github.io/articles/neovim_markdown_preview/</guid><description>&lt;style&gt;
 .info {
 background-color: #e6f7ff; 
 padding: 15px; 
 border-radius: 5px; 
 margin-bottom: 15px; 
 }

 .info-title {
 font-size: 20px; 
 margin-bottom: 10px; 
 color: #000080; 
 font-weight: bold; 
 }
&lt;/style&gt;

&lt;div class="info"&gt;
 &lt;div class="info-title"&gt;Info&lt;/div&gt;
 &lt;p&gt;This post isn&amp;rsquo;t meant as an introduction to any of the topics discussed below. Instead, it&amp;rsquo;s a brief guide on how to make the Markdown-Preview plugin work.&lt;/p&gt;
&lt;/div&gt;

&lt;h2 id="background"&gt;Background&lt;/h2&gt;
&lt;p&gt;(Neo)vim is, for the most part, the only editor I use for all my needs -— whether it&amp;rsquo;s programming, editing configuration files, or taking notes. I write all of my notes in Markdown for several reasons: it&amp;rsquo;s widely compatible, has easy-to-understand syntax, is very readable even without rendering, and, through various flavors, allows for additional functionality.&lt;/p&gt;
&lt;p&gt;Even though Markdown is quite readable in plain text, it&amp;rsquo;s helpful to render it for features like images and LaTeX. To do this, I use the Neovim plugin &lt;a href="https://github.com/iamcco/markdown-preview.nvim"&gt;Markdown Preview&lt;/a&gt;.&lt;/p&gt;


&lt;video style="display: block; margin-left: auto; margin-right: auto; width:70%" controls muted&gt;
 &lt;source src="https://monkemanx.github.io/attachments/Markown_preview.mp4" type="video/mp4"&gt;
 Your Browser does not support this embedded video.
&lt;/video&gt;


&lt;h2 id="installation"&gt;Installation&lt;/h2&gt;
&lt;p&gt;If you&amp;rsquo;re using the Lazy plugin manager, you can install the Markdown Preview plugin by opening your Neovim configuration (in Lunarvim with &lt;space&gt; + L + c) and adding the following to the list of plugins:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-lua" data-lang="lua"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 1&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 2&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="s2"&gt;&amp;#34;iamcco/markdown-preview.nvim&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 3&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;ft&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;&amp;#34;markdown&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 4&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;build&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kr"&gt;function&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 5&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;vim.fn&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;mkdp#util#install&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;]()&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 6&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="kr"&gt;end&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 7&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;config&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kr"&gt;function&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 8&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;vim.cmd&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;[[do FileType]]&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 9&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;vim.cmd&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;[[
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;10&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="s"&gt; function OpenMarkdownPreview (url)
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;11&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="s"&gt; let cmd = &amp;#34;firefox -P &amp;#39;Clean&amp;#39; --new-window &amp;#34; . shellescape(a:url) . &amp;#34; &amp;amp;&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;12&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="s"&gt; silent call system(cmd)
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;13&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="s"&gt; endfunction
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;14&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="s"&gt; ]]&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;15&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;vim.g&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;mkdp_browserfunc&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;&amp;#34;OpenMarkdownPreview&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;16&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;vim.g&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;mkdp_theme&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;&amp;#34;dark&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;17&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="kr"&gt;end&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;18&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="p"&gt;},&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;In the &lt;code&gt;OpenMarkdownPreview&lt;/code&gt; function, make sure to replace &lt;code&gt;firefox&lt;/code&gt; with the name of the browser you use. If you don&amp;rsquo;t have a browser profile named clean, you should also remove the &lt;code&gt;-P 'Clean'&lt;/code&gt; option.&lt;/p&gt;
&lt;p&gt;After restarting Neovim, the plugin should install automatically. If not, type &lt;code&gt;:Lazy&lt;/code&gt;, press &lt;code&gt;S&lt;/code&gt; to sync, and then &lt;code&gt;I&lt;/code&gt; to install the plugin. You can now use the command &lt;code&gt;:MarkdownPreview&lt;/code&gt; when inside a Markdown file, and your browser should open with the rendered Markdown file. If you&amp;rsquo;re interested in further configuring the plugin, check out its &lt;a href="https://github.com/iamcco/markdown-preview.nvim"&gt;GitHub repository&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id="command-not-working"&gt;Command not Working&lt;/h2&gt;
&lt;p&gt;If you run the command and nothing happens &amp;ndash; no error message and your browser doesn’t open—try typing &lt;code&gt;:messages&lt;/code&gt; to see if there’s an error. If you see something like &lt;code&gt;Error: Cannot find module 'tslib'&lt;/code&gt;, follow these steps to fix it:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Check your message log for a file path similar to &lt;code&gt;/lvim/lazy/markdown-preview.nvim/app/lib/app/&lt;/code&gt; (your path might differ).&lt;/li&gt;
&lt;li&gt;Go to where the plugin is installed:&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-fallback" data-lang="fallback"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;1&lt;/span&gt;&lt;span class="cl"&gt;cd ~/lvim/lazy/markdown-preview.nvim/app/lib/app/
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;ol start="3"&gt;
&lt;li&gt;Install the necessary dependencies:&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-fallback" data-lang="fallback"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;1&lt;/span&gt;&lt;span class="cl"&gt;npm install
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;ol start="4"&gt;
&lt;li&gt;Restart neovim, it should work now.&lt;/li&gt;
&lt;/ol&gt;
&lt;hr&gt;
&lt;p&gt;References:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/iamcco/markdown-preview.nvim/issues/148"&gt;https://github.com/iamcco/markdown-preview.nvim/issues/148&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.reddit.com/r/neovim/comments/1b1kw8d/help_configuring_markdownpreviewnvim_with_custom/"&gt;https://www.reddit.com/r/neovim/comments/1b1kw8d/help_configuring_markdownpreviewnvim_with_custom/&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>A Simple Card Game from my Childhood</title><link>https://monkemanx.github.io/articles/card_game_childhood/</link><pubDate>Thu, 11 Jul 2024 00:00:00 +0000</pubDate><author>monkeman@cock.li (MonkeMan)</author><guid>https://monkemanx.github.io/articles/card_game_childhood/</guid><description>&lt;h2 id="preliminary"&gt;Preliminary&lt;/h2&gt;
&lt;p&gt;When I was in elementary school, I attended a school that ran all day. After each lesson, we had short breaks, along with three longer breaks: one in the morning, one at lunchtime, and another in the afternoon. The morning breaks are the most memorable for me. During these breaks, the entire school was sent out to the schoolyard, and no one was allowed inside, unlike the other breaks.&lt;/p&gt;
&lt;p&gt;Because of this rule, the schoolyard was always packed with kids in the morning, each group in their own clique -— some playing catch, others playing football, and another group playing cards. It&amp;rsquo;s the latter group that I want to focus on. On the schoolyard, there was a specific spot slightly off to the side and slightly elevated (no more than a foot), with the ground made of solid stone slabs and covered by a roof.&lt;/p&gt;
&lt;p&gt;This spot was where the card players gathered for two reasons: first, it was covered, so our cards wouldn&amp;rsquo;t get wet, and second, and more importantly, the floor was completely flat and smooth, made of those solid stone slabs. You&amp;rsquo;ll see later why this was of particular importance.&lt;/p&gt;
&lt;p&gt;Several different games were played, but the most common ones were &lt;a href="https://en.wikipedia.org/wiki/Beyblade"&gt;Beyblade duels&lt;/a&gt;, &lt;a href="https://en.wikipedia.org/wiki/Yu-Gi-Oh!_Trading_Card_Game"&gt;Yu-Gi-Oh! duels&lt;/a&gt;, and a newer game I&amp;rsquo;ll refer to as &amp;lsquo;Betting Cards Duels.&amp;rsquo; The rules for the first two games are widely known and easily found online. However, the purpose of this blog post is to outline the rules for the latter game, as the game seems to be relatively unknown (my searches couldn&amp;rsquo;t find any matches for it).&lt;/p&gt;
&lt;h2 id="betting-card-duels-rules"&gt;&amp;lsquo;Betting Card Duels&amp;rsquo; Rules&lt;/h2&gt;
&lt;h3 id="object-of-the-game"&gt;Object of the Game&lt;/h3&gt;
&lt;p&gt;The goal for players is to flip as many cards as possible face-up. The winner is the player who flips the most cards.&lt;/p&gt;
&lt;h3 id="requirements"&gt;Requirements&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Normally played with 2 players, but can accommodate more.&lt;/li&gt;
&lt;li&gt;(OPTIONAL) A sturdy table is recommended; wood is preferable to stone.
&lt;ul&gt;
&lt;li&gt;When slamming your hand on the table (see &amp;lsquo;Let&amp;rsquo;s Play&amp;rsquo;), wood causes less discomfort than stone, and solid stone is less painful than asphalt (damn you, schoolyard with your tiny, biting stones).&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;A set of cards to play with; the content doesn&amp;rsquo;t matter, but they should be standard playing card size.
&lt;ul&gt;
&lt;li&gt;Although the content of the cards doesn&amp;rsquo;t matter, if you decide to play with card ownership (see &amp;lsquo;Additional Rules&amp;rsquo;), your opponent may not agree to play you if your cards don&amp;rsquo;t have the same &amp;lsquo;value&amp;rsquo;.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="setup"&gt;Setup&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;Players begin by deciding how many cards to play with; the game can be played with as few as 1 or as many as can fit on the table, though single digits are recommended, with four being standard.&lt;/li&gt;
&lt;li&gt;Bend each card slightly vertically so that when placed on the table, they are not completely flat.&lt;/li&gt;
&lt;/ol&gt;


&lt;figure&gt;
 &lt;img style="display: block; margin-left: auto; margin-right: auto; width:60%" src="https://monkemanx.github.io/attachments/card_normal_bend.jpg"&gt;
 &lt;figcaption style="text-align:center; margin-top: 10px;"&gt;Comparison of a normal card (left) and a bend card (right).&lt;/figcaption&gt;
&lt;/figure&gt;


&lt;ol start="3"&gt;
&lt;li&gt;Each player places their cards in a single row in the middle of the table, face down, creating two adjacent rows.


&lt;figure&gt;
 &lt;img style="display: block; margin-left: auto; margin-right: auto; width:68%" src="https://monkemanx.github.io/attachments/card_setup.jpg"&gt;
 &lt;figcaption style="text-align:center; margin-top: 10px;"&gt;Exemplary card setup with 4 playing cards.&lt;/figcaption&gt;
&lt;/figure&gt;

&lt;/li&gt;
&lt;/ol&gt;
&lt;h3 id="lets-play"&gt;Let&amp;rsquo;s Play&lt;/h3&gt;
&lt;p&gt;The game is played in rounds. To determine who starts, players can flip a coin or use another random method. The starting player begins by slapping the table with their hand to produce a gust of wind; any card that flips face-up due to this wind is removed from the game.&lt;/p&gt;
&lt;p&gt;There are few rules on how to generate the wind; the following must be observed:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Cards cannot be directly touched.&lt;/li&gt;
&lt;li&gt;Only hands may be used to produce wind, and they must touch the table surface.&lt;/li&gt;
&lt;li&gt;Each turn, players can only slap the table once.&lt;/li&gt;
&lt;li&gt;External items such as sticks or paper are not allowed; only hands can be used.&lt;/li&gt;
&lt;/ul&gt;


&lt;video style="display: block; margin-left: auto; margin-right: auto; width:70%" controls muted&gt;
 &lt;source src="https://monkemanx.github.io/attachments/card_topple.mp4" type="video/mp4"&gt;
 Your Browser does not support this embedded video.
&lt;/video&gt;


&lt;h3 id="additional-rules"&gt;Additional Rules&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Instead of the player who flips most cards being the winner, the player who flips the last card is the winner.&lt;/li&gt;
&lt;li&gt;If on one turn you flip two cards you get an additional turn.&lt;/li&gt;
&lt;li&gt;The game can be played as a betting game where the winning player gains ownership of all the card.&lt;/li&gt;
&lt;li&gt;Different types of cards can be used instead of identical ones; for example, lighter cards like football stickers or heavier ones like Yu-Gi-Oh cards.&lt;/li&gt;
&lt;li&gt;Instead of setting up the cards in rows, players may choose their card formation.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="closing-thoughts"&gt;Closing Thoughts&lt;/h2&gt;
&lt;p&gt;Since I only played this game when I was quite young, I don&amp;rsquo;t remember all the rules very clearly. What I&amp;rsquo;ve written here is just what I recall; there could certainly have been more rules.&lt;br&gt;
In practice, when playing this card game, players would first bet and play with cards that had the least value, such as football sticker cards or vehicle trading cards. Only when these lower-value cards were exhausted would they bet desirable cards like Pokémon or Yu-Gi-Oh! cards. Often, one needed to win multiple times until the opponent ran out of low-value cards to get any desirable cards, or at the start of the game, it was decided to bet only certain types of cards (e.g., Pokémon cards).&lt;/p&gt;</description></item><item><title>What is a person? Or when is a person?</title><link>https://monkemanx.github.io/articles/when_does_a_something_deserve_moral_considerations/</link><pubDate>Wed, 05 Jun 2024 00:00:00 +0000</pubDate><author>monkeman@cock.li (MonkeMan)</author><guid>https://monkemanx.github.io/articles/when_does_a_something_deserve_moral_considerations/</guid><description>&lt;style&gt;
 .info {
 background-color: #e6f7ff; 
 padding: 15px; 
 border-radius: 5px; 
 margin-bottom: 15px; 
 }

 .info-title {
 font-size: 20px; 
 margin-bottom: 10px; 
 color: #000080; 
 font-weight: bold; 
 }
&lt;/style&gt;

&lt;div class="info"&gt;
 &lt;div class="info-title"&gt;Info&lt;/div&gt;
 &lt;p&gt;This post is incomplete, it doesn&amp;rsquo;t hold every argument or consideration for every position, just some.&lt;/p&gt;
&lt;/div&gt;

&lt;style&gt;
 .info {
 background-color: #e6f7ff; 
 padding: 15px; 
 border-radius: 5px; 
 margin-bottom: 15px; 
 }

 .info-title {
 font-size: 20px; 
 margin-bottom: 10px; 
 color: #000080; 
 font-weight: bold; 
 }
&lt;/style&gt;

&lt;div class="info"&gt;
 &lt;div class="info-title"&gt;Info&lt;/div&gt;
 &lt;p&gt;Addendum: &lt;a href="https://monkemanx.github.io/tangled_thoughts/philosophy_philosophical_ramblings_pain_conciousness_animals/"&gt;Philosophical Ramblings #07: Pain, Consciousnessand the Value of Animals&lt;/a&gt;&lt;/p&gt;
&lt;/div&gt;

&lt;p&gt;It would not be a controversial statement to say, that a person deserves moral consideration i.e. when doing an action involving another person one must consider the morality of the action. For example most people would agree that murdering a person is wrong, because in general we think that each person has a right to live, which gets infringed through the action of murder.&lt;/p&gt;
&lt;p&gt;But we don&amp;rsquo;t give everything moral considerations. If I walk through the forest and find a random branch of wood and decide to destroy it, most people would consider this not immoral, with the caveat that the branch is truly a random branch that doesn&amp;rsquo;t have any ownership nor other special considerations.&lt;/p&gt;
&lt;p&gt;Both of these cases are rather clear-cut, but complexity arises when looking at the border between person and something (her I use something as a stand in for &amp;ldquo;not a person&amp;rdquo;). Some examples would be: animals, fetuses or humans in comatose. For all of these, the questions arises do they deserve moral consideration? If yes, to what extent? Do they get the same moral consideration as &amp;ldquo;normal&amp;rdquo; people?
All of these questions are highly relevant, not only living in academic discussion, but in real life: should abortion be legal? If yes, to what extent? When should it be allowed to unplug the plug of a comatose patient? Is it morally okay to eat animals? Is mass-factory animal farming okay?&lt;/p&gt;
&lt;p&gt;Central to all of these questions is, what is a person? What makes something a person? When in the rest of this article I use the word &amp;ldquo;person&amp;rdquo;, I use it without any descriptive content, purely morally. To be more precise, when I say &amp;ldquo;X is a person&amp;rdquo; I equate this to &amp;ldquo;X has a serious moral right to life&amp;rdquo;.&lt;/p&gt;
&lt;p&gt;There are many different definitions on what a person is/when something deserves moral considerations, I want to explore some of them:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;personhood is the potential to life and that begins at:
&lt;ul&gt;
&lt;li&gt;conception&lt;/li&gt;
&lt;li&gt;even when the egg and sperm is separated&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;personhood is being fully conscious&lt;/li&gt;
&lt;li&gt;personhood is the ability/capability of being conscious&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Some people have argued that being a person starts at conception i.e. the moment the sperm penetrates the egg and fertilizes it.
This is a position often held by people being anti-abortion or pro-life.
Besides the religious argument, I do not want to deal with here, one argument in favor of this position is the argument of a &amp;ldquo;sliding-scale&amp;rdquo;. The argument goes something like this: the development of a human from conception to birth is continuous - the problem is now to draw a line in this continues development where from left from the line there is something and on the right of the line there is person, every possible line drawn would be arbitrary. If it is wrong to kill an infant but not a fetus, one should be able to point to a relevant moral fact, that differentiates these two.&lt;/p&gt;
&lt;p&gt;I want to offer some rebuttals to this idea. If every line drawn on continuous spectrum is arbitrary, why stop at conception? With the same reasoning one could argue that the potential of life is enough to consider something a person i.e. the egg and the sperm are already a person.
To expand a bit on this, I want to use the same reasoning of the &amp;ldquo;sliding-scale&amp;rdquo; argument from before, If we should treat a fertilized egg different from an unfertilized egg, one should be able to point to a relevant moral fact, that differentiates them.
The first thing that comes to mind is that in the first case, the genetic material of the future person is already combined into one while in the latter case, the genetic material of the sperm and egg is still separated. But is this really meaningful moral differentiation?
Let&amp;rsquo;s look as the following hypothetical, if one has a duty to open a door that need two separate keys, and we have following two scenarios (1) both keys are already put in the lock (2) One key is already put in the lock and the other one is in one&amp;rsquo;s pocket. Intuitively we would say just because the key in (2) is not already put in the lock, the duty still persists, so the differentiation wouldn&amp;rsquo;t be morally relevant enough. Just the same we could argue the duty of protecting the life of a person should also extend to unfertilized egg and sperm.&lt;/p&gt;
&lt;p&gt;I want to focus on the definition, of a fertilized egg being a person, since its more the restrictive then the second definition and still already has enough problems.
I want to draw attention to the fact that often times fertilized eggs in a woman do not result in birth, there are many reasons for fertilized eggs to die which I do not want to explain here, but this leads to the fact that a woman can have in this definition a &amp;ldquo;miscarriage of a person&amp;rdquo; without even knowing.
If we take the premises of (1) Harming innocent person is wrong (2) Something is a person at conception (3) There are many cases, where the fertilized eggs die, resulting in &amp;ldquo;miscarriages&amp;rdquo; (4) We should, prevent the harm of innocent person. From these premises it would follow that after a woman had sex, they should immediately be rushed to a hospital and stay there until birth and constantly be monitored to track the development off the fertilized egg, to make sure there is no chance of an accidental &amp;ldquo;miscarriages&amp;rdquo;, since a accidental &amp;ldquo;miscarriage&amp;rdquo; of a 1 day fertilized egg would be treated the same as the accidental death of an adult.&lt;/p&gt;
&lt;p&gt;In most systems of law around the world, there exist a law that penalized action or non-action which lead to accidental death of a person.
Thus, if we would define a person as beginning as a fertilized egg, and we consider that under law every person should be treated equal.
Wouldn&amp;rsquo;t this lead to the following: A woman that has a 1 day fertilized egg inside her and exercises too hard which lead to a &amp;ldquo;miscarriages&amp;rdquo; (which she might not even know happened) should be punished under said law? No sane person, would consider imprisoning a woman because she exercised too much, which lead to the death of a 1 day fertilized egg, as just.&lt;/p&gt;
&lt;p&gt;Some might say this is a unfair comparison to make, but is it? Let&amp;rsquo;s say a parent feed their infant the wrong food and the infant died because of an allergy. Or let&amp;rsquo;s say a parent made sport with the infant on the back and during the excesses, the parent landed on their back by accident killing the infant.
In both of these scenarios, the parent would definitively be accused of at least accidental cause of death if not murder and most likely convicted.
So if a fertilized egg is a person, shouldn&amp;rsquo;t be the same be true for the egg? If this shouldn&amp;rsquo;t hold for the egg (which most people would agree should be the case) the only other possibility is that an fertilized egg is less than a person.&lt;/p&gt;
&lt;p&gt;The Arguments stated here, have more to do with practical considerations and moral intuition then with rigorous ethical theory, thus they should be taken with a grain of salt, nonetheless both factors are important when considering ethical rules. Because a very impractical or counter-intuitive rule most likely won&amp;rsquo;t be followed.&lt;/p&gt;
&lt;p&gt;I want to further address the &amp;ldquo;sliding-argument&amp;rdquo;, which argues that if one wants to define a fertilized egg as not a person, but a fetus as a person, there should be a morally relevant fact that differentiates them. Which I want to do in the following section.&lt;/p&gt;
&lt;p&gt;Another definition we could take, for what is person is, is about consciousness. The argument goes something like this: When asking what person is, the real question we ask is: What of human nature does deserve protection? We could for example look at following hypothetical scenario, let&amp;rsquo;s assume we are some years into the future, and you were in a terrible accident, upon arriving in the hospital the doctor asks you a question: &amp;ldquo;We can either save your brain and put you in an artificial body, or we can save your whole body besides the brain?&amp;rdquo; It would not be controversial to say that most people would pick the first options. This tells us something, when it really matters, what we want to protect is the brain of a person. Some further things to consider are, when we decide if a person in coma should be unplugged and die the decision is made, based on the brain activity patterns.
We have a kind of symmetry between the state of being not born yet (not existing) and being dead (not existing). Thus, one way we could define at the beginning of a person is, by looking when we declare a person to be dead or in other word what it means to be dead.&lt;/p&gt;
&lt;p&gt;For that we can look at different scenarios and ask us if we would say in the given scenario, if we think the person is dead?&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;If someone has liver failures and gets a new one, we would still call the person alive.&lt;/li&gt;
&lt;li&gt;If someone has a heart failure and gets a new one, we would still call the person alive.
We could now start replacing part for part of the human like a ship of Theseus, when would we call it not anymore the same person i.e. the previous person died? I think most people would say, when we start tinkering with the brain would be where we could potentially kill a person by replacing parts of it, echoing a similar sentiment then hypothetical brain transplant scenario.
With that we can establish that what most people would call a &amp;ldquo;person&amp;rdquo; is inside the brain, but where exactly? Or what part of the brain?
I would argue its consciousness or to be more precise the &amp;ldquo;knowing what it is to be and the ability to experience phonemes&amp;rdquo;.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;But defining purely a person as someone conscious, doesn&amp;rsquo;t work. For example, people who are asleep are not conscious, but we wouldn&amp;rsquo;t want them to be killed. Thus the definition needs to be augmented to, something is a person and thus should have moral consideration if and only if the something has the capacity to deploy consciousness.
For example, a person sleeping has the ability to be conscious, they just aren&amp;rsquo;t at this same moment, thus they are a person. A person which doesn&amp;rsquo;t have any brain signal, is not anymore a person i.e. dead. A comatose person, which only has basic brain activity and not the brain activity necessary for a consciousness experience is also not anymore a person. A comatose patient, that has still the necessary brain activity for a conscious experience, is still a person, since they could heal again and regain consciousness.
There is certain medical condition where a baby can be born without pre-frontal cortex, most of the time it won&amp;rsquo;t live for long, but it wouldn&amp;rsquo;t be a person after this definition, since it doesn&amp;rsquo;t have the ability to deploy consciousness. This echos the same sentiment of a philosophical zombie i.e. a human that would react like a person, but isn&amp;rsquo;t conscious.&lt;/p&gt;
&lt;p&gt;Last, let&amp;rsquo;s look at the application of this definition on fetuses. For this I want to strictly differentiates between (1) capability to deploy consciousness and (2) &lt;em&gt;potential&lt;/em&gt; of having the capability to deploy consciousness. An unfertilized or fertilized egg fit the definition of (2) but not (1), as such they are not people. On the other hand an infant, has all necessary brains development to be able to deploy consciousness.
With this we don&amp;rsquo;t need to ask any more &amp;ldquo;What is a person?&amp;rdquo;, instead we now need to ask &amp;ldquo;When does a human have enough brain development to deploy consciousness?&amp;rdquo;. Scientific consensus is that this happens between ~20-24 Weeks, so if one would make a rule on abortion based on this definition of person, one should be allowed to abort prior to 20 weeks (to be safe) and after that only in cases to protect the mother&amp;rsquo;s life.&lt;/p&gt;
&lt;p&gt;This post didn&amp;rsquo;t address all arguments in full rigor such as:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Do potential person deserve protection?&lt;/li&gt;
&lt;li&gt;Is killing a fetus justified to save the mother&amp;rsquo;s life?&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;p&gt;Source:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Judith Jarvis Thomson: A Defense of Abortion&lt;/li&gt;
&lt;li&gt;Michael Tooley: Abortion and Infanticide&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>Neovim Tricks</title><link>https://monkemanx.github.io/articles/neovim_cheatsheet/</link><pubDate>Thu, 04 Apr 2024 00:00:00 +0000</pubDate><author>monkeman@cock.li (MonkeMan)</author><guid>https://monkemanx.github.io/articles/neovim_cheatsheet/</guid><description>&lt;p&gt;This is a short cheat sheet for important keybindings in vim more specific for neovim. I am using &lt;a href="https://nvchad.com/"&gt;NVChad&lt;/a&gt; as such not all keybindings are applicable to standard vim/nvim.
Capitalization is important!&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Modes:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;ESC&lt;/code&gt;, switch to normal mode.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;v&lt;/code&gt;, switch to visual mode.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;i&lt;/code&gt; or &lt;code&gt;a&lt;/code&gt;, switch to insert mode.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;R&lt;/code&gt;, replace mode.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Navigation:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;arrow keys&lt;/code&gt;, shame on you!&lt;/li&gt;
&lt;li&gt;Movement keys, can be combined with arbitrary number
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;h&lt;/code&gt;, to the left.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;l&lt;/code&gt;, to the right.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;j&lt;/code&gt;, downwards.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;k&lt;/code&gt;, upwards.&lt;/li&gt;
&lt;li&gt;Example: &lt;code&gt;10j&lt;/code&gt; jumps 10 lines downwards, &lt;code&gt;5k&lt;/code&gt; jumps 4 lines upwards.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;code&gt;_&lt;/code&gt; or &lt;code&gt;0&lt;/code&gt;, beginning of the line.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;$&lt;/code&gt;, to the end of the line.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;e&lt;/code&gt;, one word forward.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;b&lt;/code&gt;, one word backward.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;:NUMBER&lt;/code&gt;, jumps to the line number.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;f&lt;/code&gt; + &lt;code&gt;CHAR&lt;/code&gt;, jumps to the &lt;em&gt;next&lt;/em&gt; character matching the input char.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;F&lt;/code&gt; + &lt;code&gt;CHAR&lt;/code&gt;, jumps to the &lt;em&gt;previous&lt;/em&gt; character matching the input char.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;gg&lt;/code&gt;, moves to the &lt;em&gt;top&lt;/em&gt; of the files.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;G&lt;/code&gt;, moves to the &lt;em&gt;bottom&lt;/em&gt; of the file.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;20G&lt;/code&gt;, moves cursor to line 20.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;O&lt;/code&gt;, insert a line above the cursor.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;o&lt;/code&gt;, insert a line below the cursor.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Navigating Code:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;%&lt;/code&gt;, to the matching bracket.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;[&lt;/code&gt; + &lt;code&gt;{&lt;/code&gt;, jumps to &lt;em&gt;previous&lt;/em&gt; curly bracket.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;]&lt;/code&gt; + &lt;code&gt;}&lt;/code&gt;, jumps to &lt;em&gt;next&lt;/em&gt; curly bracket.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;]&lt;/code&gt; + &lt;code&gt;m&lt;/code&gt;, next method beginning.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;[&lt;/code&gt; + &lt;code&gt;m&lt;/code&gt;, previous method beginning.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Files:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;:w&lt;/code&gt;, save current file to disk.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;:wall&lt;/code&gt;, saves all open files to disk.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;:q&lt;/code&gt;, closes current window.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;:qall&lt;/code&gt;, closes all windows.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;:qall!&lt;/code&gt;, forcefully closes all windows.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;:wq&lt;/code&gt;, saves and closes window.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Selecting:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;v&lt;/code&gt; + &lt;code&gt;i&lt;/code&gt; + &lt;code&gt;p&lt;/code&gt;, select the current paragraph.
&lt;ul&gt;
&lt;li&gt;can be repeated &lt;code&gt;vipipipip&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;code&gt;y&lt;/code&gt; + &lt;code&gt;a&lt;/code&gt; + &lt;code&gt;p&lt;/code&gt;, yanks paragraph.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Editing&lt;/strong&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;d&lt;/code&gt; + &lt;code&gt;POSTFIX&lt;/code&gt;, stands for delete depends on postfix.
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;d&lt;/code&gt;, deletes whole line&lt;/li&gt;
&lt;li&gt;&lt;code&gt;$&lt;/code&gt;, deletes from current postion up to &lt;em&gt;last&lt;/em&gt; character in the line.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;_&lt;/code&gt;, deletes from current postion up to &lt;em&gt;first&lt;/em&gt; character in the line.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;e&lt;/code&gt;, deletes next word.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;b&lt;/code&gt;, deletes previous word.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;code&gt;D&lt;/code&gt;, same as &lt;code&gt;d$&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;u&lt;/code&gt;, undo last change.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;STRG&lt;/code&gt; + &lt;code&gt;r&lt;/code&gt;, redoes the last change.&lt;/li&gt;
&lt;li&gt;In visual mode: &lt;code&gt;y&lt;/code&gt;, copy(yank) the selected text.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;y&lt;/code&gt; + &lt;code&gt;y&lt;/code&gt;, yank current line.
&lt;ul&gt;
&lt;li&gt;can be paired with a number, example &lt;code&gt;5&lt;/code&gt; + &lt;code&gt;y&lt;/code&gt; + &lt;code&gt;y&lt;/code&gt;, yanks the next 5 lines.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;code&gt;p&lt;/code&gt;, paste the yanked text &lt;em&gt;after&lt;/em&gt; the cursor.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;P&lt;/code&gt;, paste the yanked text &lt;em&gt;before&lt;/em&gt; the cursor.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;x&lt;/code&gt;, deletes current character.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;c&lt;/code&gt; + &lt;code&gt;c&lt;/code&gt;, remove current line and edit it.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;\&amp;quot;&lt;/code&gt; + &lt;code&gt;BUFFER&lt;/code&gt; + &lt;code&gt;p&lt;/code&gt;, chooses a clipboard buffer and then pastes it.&lt;/li&gt;
&lt;li&gt;If you have multiple lines and want to add in the beginning of each line something
&lt;ol&gt;
&lt;li&gt;Move to the first character of the first line you want to change.&lt;/li&gt;
&lt;li&gt;Press Ctrl + V to enter Visual Block Mode.&lt;/li&gt;
&lt;li&gt;Use j or arrow keys to select the lines downward.&lt;/li&gt;
&lt;li&gt;Press I (uppercase i).&lt;/li&gt;
&lt;li&gt;Type -.&lt;/li&gt;
&lt;li&gt;Press Esc.&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;&lt;code&gt;STRG&lt;/code&gt; + &lt;code&gt;a&lt;/code&gt;, increases a number of a string by 1.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;STRG&lt;/code&gt; + &lt;code&gt;x&lt;/code&gt;, decreases a number of a string by 1.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Search:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;/&lt;/code&gt;, searches for patterns forward.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;?&lt;/code&gt;, searches for pattern backward.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;n&lt;/code&gt;, jumps to next found pattern.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Misc:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;vsp&lt;/code&gt;, vertically splits screen.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;hsplit&lt;/code&gt;, horizontal splits screen.&lt;/li&gt;
&lt;li&gt;In visual mode &lt;code&gt;&amp;gt;&lt;/code&gt;, intends marked lines in the &lt;em&gt;right&lt;/em&gt; direction.&lt;/li&gt;
&lt;li&gt;In visual mode &lt;code&gt;&amp;lt;&lt;/code&gt;, intends marked lines in the &lt;em&gt;left&lt;/em&gt; direction.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;z&lt;/code&gt; + &lt;code&gt;=&lt;/code&gt;, correct spelling mistake.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;.&lt;/code&gt;, repeast the last command.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Telescope File Browser&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;&amp;lt;leader&amp;gt;&lt;/code&gt; + &lt;code&gt;fb&lt;/code&gt;, opens the telescope file browser.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;ctrl&lt;/code&gt; + &lt;code&gt;f&lt;/code&gt;, switches between file and folder mode.&lt;/li&gt;
&lt;li&gt;In &lt;code&gt;normal&lt;/code&gt; mode:
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;c&lt;/code&gt;, create a file.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;r&lt;/code&gt;, rename a file.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;y&lt;/code&gt;, copy a file.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;d&lt;/code&gt;, delete a file.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;g&lt;/code&gt;, goes to parent folder.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Search and Replace&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;:%s/foo/bar/gc&lt;/code&gt;, changes all occurence of &lt;code&gt;foo&lt;/code&gt; in the current file to &lt;code&gt;bar&lt;/code&gt;, asks for confirmation&lt;/li&gt;
&lt;li&gt;&lt;code&gt;:%s/foo/bar/g&lt;/code&gt;, changes all occurence of &lt;code&gt;foo&lt;/code&gt; in the current file to &lt;code&gt;bar&lt;/code&gt;, doesn&amp;rsquo;t asks for confirmation&lt;/li&gt;
&lt;li&gt;&lt;code&gt;:%s/&amp;lt;foo&amp;gt;/bar/gc&lt;/code&gt;, Changes only whole wors exactly matching &lt;code&gt;foo&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Example: &lt;code&gt;:%s/\$\([^$]*\)\$/\\(\1\\)/g``, match text enclosed in dollar signs (e.g., $some random text$) and replace it with LaTeX-style \(some random text\)&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;h1 id="debugging-neovim"&gt;Debugging Neovim&lt;/h1&gt;
&lt;ol start="0"&gt;
&lt;li&gt;Start Neovim&lt;/li&gt;
&lt;li&gt;Find the PID of neovim &lt;code&gt;:lua print(vim.fn.getpid())&lt;/code&gt; or use something like &lt;code&gt;htop&lt;/code&gt; or &lt;code&gt;btop&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Attach the debugger to neovim &lt;code&gt;gdb -tui -p PID nvim&lt;/code&gt;, the gdb interactive prompt will appear, useful commands:
-&lt;code&gt;n&lt;/code&gt; step over the next statement
-&lt;code&gt;s&lt;/code&gt; step into the next statement
-&lt;code&gt;c&lt;/code&gt; continue
-&lt;code&gt;finish&lt;/code&gt; step out of the current function
-&lt;code&gt;bt&lt;/code&gt; to see the backtrace from current location&lt;/li&gt;
&lt;li&gt;Reproduce the bug and check the backtrace&lt;/li&gt;
&lt;/ol&gt;
&lt;hr&gt;
&lt;p&gt;References:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://neovim.io/doc/user/dev_tools.html"&gt;Neovim Dev Tools&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://nvchad.com/"&gt;NvChad Doc&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>My Homelab Part 12: Outlook</title><link>https://monkemanx.github.io/articles/my_homelab_part_12_outlook/</link><pubDate>Mon, 29 Jan 2024 08:02:58 +0000</pubDate><author>monkeman@cock.li (MonkeMan)</author><guid>https://monkemanx.github.io/articles/my_homelab_part_12_outlook/</guid><description>&lt;p&gt;The software I have showcased in this Homelab series is just a fraction of the applications that you can host yourself on your server.&lt;/p&gt;
&lt;p&gt;In this post, I would like to share some additional intriguing software that I plan to explore in the future, or that are generally cool projects:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://jellyfin.org/"&gt;Jellyfin&lt;/a&gt;: A media software system that allows you to manage movies, TV shows, and music, and stream them to various devices.&lt;/li&gt;
&lt;li&gt;Radarr/Sonarr/Readarr/Lidarr/Bazaar: These are movie, TV show, book, music, and subtitle torrent finder that enable you to search for torrents of your favorite media. When combined with BitTorrent, they can download the media and place it in your Jellyfin media library.&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/Fallenbagel/jellyseerr"&gt;Jellyseer&lt;/a&gt;: This tool can be used with Jellyfin and the &amp;ldquo;arr&amp;rdquo; services to request and download media&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/paperless-ngx/paperless-ngx"&gt;Paperless-Ngx&lt;/a&gt;: A document management software that transforms all your physical documents into a searchable online archive, eliminating the need for physical paperwork.&lt;/li&gt;
&lt;li&gt;&lt;a href="https://immich.app/"&gt;Immich&lt;/a&gt;A self-hosted photo and video manager and backup solution for your photos, offering an impressive set of features rivaling apps like Google Photos.&lt;/li&gt;
&lt;li&gt;&lt;a href="https://pi-hole.net/"&gt;Pi-Hole&lt;/a&gt;: A network wide ad-blocker. It eliminates the need to install an ad-blocker on each device, allowing you to block ads for all your devices with just one software. It can also serve as your own DNS server.&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.gitlab.com/ee/topics/offline/quick_start_guide.html"&gt;GitLab&lt;/a&gt;: : Similar to GitHub, GitLab allows you to host your own Git projects online and share them with others.&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/EmulatorJS/EmulatorJS"&gt;EmulatorJS&lt;/a&gt;: Enables playing retro games over a web browser from anywhere, as long as you have an internet connection.&lt;/li&gt;
&lt;li&gt;&lt;a href="https://invidious.io/"&gt;Invidious&lt;/a&gt;: An open-source alternative frontend for YouTube that allows you to download videos and manage them.&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/mealie-recipes/mealie"&gt;mealie&lt;/a&gt;: A self-hosted recipe manager and meal planner.&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/advplyr/audiobookshelf"&gt;audiobookshelf&lt;/a&gt;: A self-hosted audiobook and podcast server.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;I hope you discover one or two interesting software applications from this list!&lt;/p&gt;</description></item><item><title>My Homelab Part 11: Backup</title><link>https://monkemanx.github.io/articles/my_homelab_part_11_backup/</link><pubDate>Sat, 27 Jan 2024 11:33:02 +0000</pubDate><author>monkeman@cock.li (MonkeMan)</author><guid>https://monkemanx.github.io/articles/my_homelab_part_11_backup/</guid><description>&lt;p&gt;It goes without saying that backups are crucial. If you aim to preserve your data for the future, proper backup practices are a necessity. The golden rule of backing up is the 3-2-1 rule, which advises having three copies of your data, on two different media, with one copy off-site.&lt;/p&gt;
&lt;p&gt;In my case, I needed a backup solution for various types of data:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Photos&lt;/strong&gt;: Currently stored on my phone.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Text files&lt;/strong&gt;: Including university notes, general notes, and articles, currently saved on my computers.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Configuration files&lt;/strong&gt;: From my server, currently saved on the SD card of the server.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;For my backup needs, I opted for two solutions: &lt;strong&gt;Syncthing&lt;/strong&gt; and &lt;strong&gt;rsync&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Syncthing&lt;/strong&gt;:
You may already be familiar with Syncthing from my previous post in the Homelab Series, where I introduced it for data synchronization. However, it can also serve as a backup tool. By synchronizing every Syncthing folder I use with my server, I automatically create a copy on my server. Specifically, I configured Syncthing so that all synchronized data (such as photos and writings) is stored on the first external disk of the server.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Rsync&lt;/strong&gt;:
Given that my Raspberry Pi server uses an SD card for main storage, where the operating system and home folder are stored, I use rsync to back up my home folder to the first external disk. Rsync allows for folder-level backups, crucial in server environments where SD cards are prone to breaking under constant stress.&lt;/p&gt;
&lt;p&gt;Using only one disk introduces the risk of disk failure. To mitigate this, I employ an additional disk to back up my first disk, again utilizing rsync for this task.&lt;/p&gt;
&lt;p&gt;Although I considered using a RAID system, I decided against it for two reasons:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Lack of RAID Controller&lt;/strong&gt;: I don&amp;rsquo;t have a RAID controller and didn&amp;rsquo;t want to invest in one. Using a RAID controller on the software level tends to be slower.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Scale and Need:&lt;/strong&gt; RAID isn&amp;rsquo;t very effective at the scale of two disks, and I didn&amp;rsquo;t require additional backup storage at the moment.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;For information on installing Syncthing, refer to my earlier post in this series, &amp;ldquo;My Homelab Part 6: Syncthing.&amp;rdquo;&lt;/p&gt;
&lt;h2 id="rsync"&gt;Rsync&lt;/h2&gt;
&lt;p&gt;&lt;a href="https://linux.die.net/man/1/rsync"&gt;Rsync&lt;/a&gt; is a command-line tool that should already be pre-installed on most Linux operating systems. To initiate a folder clone, use the command:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-sh" data-lang="sh"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;1&lt;/span&gt;&lt;span class="cl"&gt;rsync -r /origin/ /target
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Keep in mind that rsync is slower than a simple move or clone command because it checks every file. For the initial backup, it&amp;rsquo;s recommended to use the cloning command.&lt;/p&gt;
&lt;p&gt;To regularly back up my home folder, I use cron(see &amp;ldquo;My Homelab Part 0: Prologue&amp;rdquo;), which allows me to schedule commands. To do that, start crontab with:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-sh" data-lang="sh"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;1&lt;/span&gt;&lt;span class="cl"&gt;crontab -e
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Here&amp;rsquo;s an example of scheduling:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-sh" data-lang="sh"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;1&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="m"&gt;0&lt;/span&gt; &lt;span class="m"&gt;4&lt;/span&gt; * * * rsync -aAXvh /mnt/externalDisk/ /mnt/externalBackupDisk/BackupDisk/
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;2&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="m"&gt;0&lt;/span&gt; &lt;span class="m"&gt;2&lt;/span&gt; * * * rsync -aAXvh /root /mnt/externalBackupDisk/BackupHome/
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;You can customize the scheduling as needed. In my case, I back up my home folder at 02:00 every day and my disk at 04:00. The meaning of the arguments can be &lt;a href="https://linux.die.net/man/1/rsync"&gt;read here&lt;/a&gt;, but to summarize briefly:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;a&lt;/code&gt;: Archive option, indicating recursion and keeping everything.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;A&lt;/code&gt;: Updates the permission of the files.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;X&lt;/code&gt;: Removes extended attributes of files.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;v&lt;/code&gt;: Increases the amount of information given during transfer.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;h&lt;/code&gt;: Outputs numbers in a human-readable format.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;That&amp;rsquo;s it, and always remember, backups are crucial.&lt;/p&gt;


&lt;figure style="display: block; margin-left: auto; margin-right: auto; width:80%; text-align:center"&gt;
 &lt;img loading="lazy" src="https://monkemanx.github.io/attachments/backups.png"&gt;
 &lt;figcaption style="text-align:center"&gt;&lt;a href="https://xkcd.com/1718/"&gt;Source&lt;/a&gt;&lt;/figcaption&gt;
&lt;/figure&gt;


&lt;h2 id="off-site-backups"&gt;Off-Site Backups&lt;/h2&gt;
&lt;p&gt;In the beginning I talked about the 3-2-1 backup rule, one part of this is to have a backup offsite. Which I didn&amp;rsquo;t quite address in this post, one way to achieve that is by placing your server not inside the house you live, this could be in the home of your parents or a friend. Another way could be to rent a server, and use synthing again there to sync your data between your rented server and your home server.&lt;/p&gt;</description></item><item><title>My Homelab Part 10: Vaultwarden</title><link>https://monkemanx.github.io/articles/my_homelab_part_10_vaultwarden/</link><pubDate>Thu, 25 Jan 2024 11:30:36 +0000</pubDate><author>monkeman@cock.li (MonkeMan)</author><guid>https://monkemanx.github.io/articles/my_homelab_part_10_vaultwarden/</guid><description>&lt;p&gt;Vaultwarden is an unofficial implementation of the Bitwarden password manager. One of its primary advantages is its lower resource intensity for hosting compared to the official implementation, along with the support of a robust community.&lt;/p&gt;


&lt;figure&gt;
 &lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width:100%" src="https://monkemanx.github.io/attachments/8ddd4488bb9c1a355dc41d6b6db4898f.png"&gt;
 &lt;figcaption&gt;Vaultwarden Website.&lt;/figcaption&gt;
&lt;/figure&gt;


&lt;p&gt;Before adopting Vaultwarden, I relied on the offline password manager KeePassXC. However, it posed challenges with synchronization across multiple devices. For instance, if I altered a password on my phone, I had to transfer the entire password database to my computer to ensure synchronization. In contrast, Vaultwarden streamlines this process by automatically synchronizing password changes across all devices.&lt;/p&gt;
&lt;p&gt;Here&amp;rsquo;s how Vaultwarden operates: the Vaultwarden software is hosted on your server, managing and storing your passwords. Clients can access these passwords by connecting directly to your hosted Vaultwarden website, through the official Bitwarden browser extension, or via the Bitwarden app on a mobile device.&lt;/p&gt;


&lt;figure&gt;
 &lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width:80%" src="https://monkemanx.github.io/attachments/Untitled%20Diagram.drawio.png"&gt;
 &lt;figcaption&gt;Explanation of Vaultwarden.&lt;/figcaption&gt;
&lt;/figure&gt;


&lt;h2 id="installation"&gt;Installation&lt;/h2&gt;
&lt;p&gt;As with my previous blog posts, I&amp;rsquo;ll use Docker Compose to install Vaultwarden, employing the following Docker Compose file(vaultwarden-compose.yml):&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-yml" data-lang="yml"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 1&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="nt"&gt;version&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;3&amp;#39;&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 2&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="nt"&gt;services&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 3&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;vaultwarden&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 4&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;container_name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;vaultwarden&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 5&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;image&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;vaultwarden/server:latest&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 6&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;restart&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;unless-stopped&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 7&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;volumes&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 8&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="l"&gt;/mnt/externalDisk/vaultwarden/:/data/&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 9&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;ports&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;10&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="m"&gt;150&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="m"&gt;80&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;11&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;environment&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;12&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="l"&gt;DOMAIN=&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;13&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="l"&gt;WEB_VAULT_ENABLED=true&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;14&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="l"&gt;ADMIN_TOKEN=XXXXX&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;15&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="l"&gt;SIGNUPS_ALLOWED=false&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;16&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="l"&gt;EMERGENCY_ACCESS_ALLOWED=true&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;It&amp;rsquo;s crucial to note that Vaultwarden deals with sensitive information, requiring a secure connection (HTTPS). In a non-secure connection (HTTP), accessing your password vault won&amp;rsquo;t be possible. Therefore, I highly recommend following my previous blog post, where I demonstrated how to assign a domain to your internal services for secure internet access. If you&amp;rsquo;ve followed that guide, remember to update your Caddyfile for this new service:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-fallback" data-lang="fallback"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;1&lt;/span&gt;&lt;span class="cl"&gt;vaultwarden.{$DOMAIN} {
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;2&lt;/span&gt;&lt;span class="cl"&gt; import tls
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;3&lt;/span&gt;&lt;span class="cl"&gt; import header
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;4&lt;/span&gt;&lt;span class="cl"&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;5&lt;/span&gt;&lt;span class="cl"&gt; reverse_proxy localhost:{$VAULTWARDEN_PORT}
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;6&lt;/span&gt;&lt;span class="cl"&gt;}
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Additionally, starting from version &lt;code&gt;1.28&lt;/code&gt; of Vaultwarden, the admin token must be &lt;a href="https://github.com/dani-garcia/vaultwarden/wiki/Enabling-admin-page"&gt;hashed&lt;/a&gt;. To do that, follow these steps:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Execute the command &lt;code&gt;docker run --rm -it vaultwarden/server /vaultwarden hash&lt;/code&gt; to initiate a temporary Vaultwarden instance for hashing your password.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Enter your desired password when prompted.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;After receiving the password hash, escape the dollar sign using the command:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-fallback" data-lang="fallback"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;1&lt;/span&gt;&lt;span class="cl"&gt;echo &amp;#34;your_password&amp;#34; | sed &amp;#39;s#\$#\$\$#g&amp;#39;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Copy the password hash and insert it into your Docker Compose file.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;To install Vaultwarden, proceed with these steps:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;For the initial run, set &lt;code&gt;SIGNUPS_ALLOWED&lt;/code&gt; to &lt;code&gt;true&lt;/code&gt; to create an account. After registration, stop the Vaultwarden container and set this variable to &lt;code&gt;false&lt;/code&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Don&amp;rsquo;t forget to set the &lt;code&gt;DOMAIN&lt;/code&gt; in the Docker Compose file to your domain.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;After configuring these variables, start your container using:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-sh" data-lang="sh"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;1&lt;/span&gt;&lt;span class="cl"&gt;docker compose -f vaultwarden-compose.yml up -d
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;After a while, access your Vaultwarden service at &lt;code&gt;https://vaultwarden.Your_Domain&lt;/code&gt;, displaying a page similar to this:&lt;br&gt;


 &lt;figure&gt;
 &lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width:80%" src="https://monkemanx.github.io/attachments/Screenshot%20from%202024-01-20%2012-42-41.png"&gt;
 &lt;/figure&gt;
 
&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Click &amp;ldquo;Create account,&amp;rdquo; leading to the registration page:&lt;br&gt;


 &lt;figure&gt;
 &lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width:80%" src="https://monkemanx.github.io/attachments/Screenshot%20from%202024-01-20%2012-43-28.png"&gt;
 &lt;/figure&gt;
 
&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;After registration, stop the Vaultwarden container, disable sign ups, and restart the container using the following commands:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-sh" data-lang="sh"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;1&lt;/span&gt;&lt;span class="cl"&gt;docker ps -a
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;2&lt;/span&gt;&lt;span class="cl"&gt;docker stop vaultwarden_id
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Upon restarting the container, you can log in with your registered account. To manage settings, including user accounts, access the admin page at &lt;code&gt;https://vaultwarden.Your_Domain/admin&lt;/code&gt;, requiring your admin token as password.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;hr&gt;
&lt;p&gt;References:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/dani-garcia/vaultwarden"&gt;https://github.com/dani-garcia/vaultwarden&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>My Homelab Part 9: Caddy, FileServer and DuckDNS</title><link>https://monkemanx.github.io/articles/my_homelab_part_9_caddy_fileserver_and_duckdns/</link><pubDate>Tue, 23 Jan 2024 11:32:33 +0000</pubDate><author>monkeman@cock.li (MonkeMan)</author><guid>https://monkemanx.github.io/articles/my_homelab_part_9_caddy_fileserver_and_duckdns/</guid><description>&lt;p&gt;If you have been following this Homelab series, you probably have several services up and running, and maybe even a homepage linking to all your services.&lt;/p&gt;
&lt;p&gt;Up to this point, however, accessing these services outside your home network was not possible, and the services lacked user-friendly, readable domain names. Instead, you had to enter the IP address of your server followed by the port of the service you wanted to access. Wouldn&amp;rsquo;t it be nice if you could access your services like this:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;https://service1.my_cool_comain.com&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;https://service2.my_cool_comain.com&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;https://service3.my_cool_comain.com&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;All of this and more can be achieved with a service called a &lt;strong&gt;reverse proxy&lt;/strong&gt; combined with a &lt;strong&gt;Domain Name&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;A domain name is the text you type in your browser when you want to access a website. For instance, the domain name to access the Google website is &lt;code&gt;google.com&lt;/code&gt;. Normally, you would need the IP address of the server hosting the website to access it. It&amp;rsquo;s evident why one would opt for a domain name – it&amp;rsquo;s easier to remember than an IP address and more readable.&lt;/p&gt;
&lt;p&gt;There are numerous providers in the market where you can purchase a domain name that you can then use. Additionally, some providers offer domain names for free, with &lt;a href="https://www.duckdns.org/"&gt;DuckDNS&lt;/a&gt; being one such provider that I chose to use. It&amp;rsquo;s important to note that when purchasing a domain name, you have more options for customizing how your domain looks. Conversely, when using a free domain provider, you may encounter more limitations.&lt;/p&gt;
&lt;p&gt;A reverse proxy is a service that sits in front of your internet connection, and internet traffic passes through it. The reverse proxy can then decide which services to forward the internet traffic to. There are several reasons why one might choose to use a reverse proxy:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Security:&lt;/strong&gt; Because all internet traffic must pass through the reverse proxy before being forwarded to the services, there is a reduction in the potential attack surface. Rather than focusing on securing all individual services, one only needs to enhance the security of the reverse proxy.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Elimination of Port Numbers:&lt;/strong&gt; Even with a domain name for our service, when multiple services run on one server, specifying the port of the service is still necessary for access. If you only access through the domain name, the server won&amp;rsquo;t know which service to forward the traffic to. This issue can be resolved with a reverse proxy.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Performance:&lt;/strong&gt; A reverse proxy can maintain a cache of static content to reduce the load on internal services, improving overall performance.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Load Balancing:&lt;/strong&gt; In scenarios where a service is in high demand, and a single server is insufficient to handle all users, multiple servers are needed. A reverse proxy can determine which server to send users to, effectively distributing the load and ensuring optimal performance.&lt;/li&gt;
&lt;/ul&gt;


&lt;figure&gt;
 &lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width:80%" src="https://monkemanx.github.io/attachments/Untitled%20Diagram.drawio%281%29.png"&gt;
 &lt;figcaption style="text-align:center"&gt;Exemplary Diagramm of a Reverse Proxy.&lt;/figcaption&gt;
&lt;/figure&gt;


&lt;p&gt;There are various reverse proxy options available, such a &lt;a href="https://www.nginx.com/"&gt;nginx&lt;/a&gt;, &lt;a href="https://traefik.io/traefik/"&gt;traefik&lt;/a&gt; and &lt;a href="https://caddyserver.com/"&gt;caddy&lt;/a&gt; to name a few. In my setup, I opted for Caddy for three key reasons:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Default HTTPS Support:&lt;/strong&gt; Caddy supports HTTPS by default, eliminating the need to adjust complex settings or deal with certifications to enable HTTPS functionality.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Simplified Configuration:&lt;/strong&gt; Caddy employs a single configuration file with a straightforward syntax to configure the entire service. This simplifies the setup process and makes it more user-friendly.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Integrated File and Web Server:&lt;/strong&gt; Caddy&amp;rsquo;s versatility allows it to function as both a file and web server. This means you can host files from your computer and access them without requiring additional software installation for this specific purpose.&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id="using-duckdns"&gt;Using DuckDNS&lt;/h2&gt;
&lt;p&gt;To set up DuckDNS, I followed their &lt;a href="https://www.duckdns.org/install.jsp"&gt;official guide&lt;/a&gt;, which provides instructions on installing DuckDNS on your device.&lt;/p&gt;
&lt;p&gt;Utilizing DuckDNS involves two main stages. In the first stage, you create your domain and link it to your server using its external IP. In the second stage, you create a script on your server that will automatically notify DuckDNS when the server&amp;rsquo;s IP changes and update it accordingly.&lt;/p&gt;
&lt;p&gt;Here&amp;rsquo;s a brief explanation of how I did it for my Raspberry Pi server:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Begin by logging into the &lt;a href="https://www.duckdns.org"&gt;DuckDNS&lt;/a&gt; website. Upon logging in, you should see a page resembling this:&lt;/p&gt;


 &lt;figure&gt;
 &lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width:100%" src="https://monkemanx.github.io/attachments/5035ba5578f1fafeb04ce7fdcc8d4634.png"&gt;
 &lt;/figure&gt;
 

&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Enter the desired text for your domain name in the empty field and press the &lt;code&gt;add domain&lt;/code&gt; button.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Ensure that the &lt;code&gt;current IP&lt;/code&gt; field contains the external IP (not internal IP) of your server.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Next, log into your Raspberry Pi using &lt;code&gt;ssh&lt;/code&gt; (refer to &amp;ldquo;My Homelab Part 2: DietPi&amp;rdquo;).&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Create a folder to store all the files:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-sh" data-lang="sh"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;1&lt;/span&gt;&lt;span class="cl"&gt;mkdir duckdns
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;2&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="nb"&gt;cd&lt;/span&gt; duckdns
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;3&lt;/span&gt;&lt;span class="cl"&gt;nano duckdns.sh
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Enter the following line into the &lt;code&gt;duckdns.sh&lt;/code&gt; script (refer to &amp;ldquo;My Homelab Part 2: DietPi&amp;rdquo; for how to use nano) and save the file:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-sh" data-lang="sh"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;1&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="nv"&gt;url&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;https://www.duckdns.org/update?domains=exampledomain&amp;amp;token=a7c4d0ad-114e-40ef-ba1d-d217904a50f2&amp;amp;ip=&amp;#34;&lt;/span&gt; &lt;span class="p"&gt;|&lt;/span&gt; curl -k -o ~/duckdns/duck.log -K -
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Make the script executable:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-sh" data-lang="sh"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;1&lt;/span&gt;&lt;span class="cl"&gt;chmod &lt;span class="m"&gt;700&lt;/span&gt; duck.sh
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Automate script execution with cron (see &amp;ldquo;My Homelab Part 0: Prologue&amp;rdquo; for how cron works):&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-sh" data-lang="sh"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;1&lt;/span&gt;&lt;span class="cl"&gt;crontab -e
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Copy and paste the following text, save the file, and close it:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-sh" data-lang="sh"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;1&lt;/span&gt;&lt;span class="cl"&gt;*/5 * * * * ~/duckdns/duck.sh &amp;gt;/dev/null 2&amp;gt;&lt;span class="p"&gt;&amp;amp;&lt;/span&gt;&lt;span class="m"&gt;1&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Test if the script is working by running it once and checking the log file for an &amp;ldquo;OK&amp;rdquo; message:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-sh" data-lang="sh"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;1&lt;/span&gt;&lt;span class="cl"&gt;./duck.sh
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;2&lt;/span&gt;&lt;span class="cl"&gt;cat duck.log
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Ensure that cron is started as a service:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-sh" data-lang="sh"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;1&lt;/span&gt;&lt;span class="cl"&gt;sudo service cron start
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;With these steps, your domain name should now point to your server. However, you won&amp;rsquo;t be able to access a service through your domain yet. To achieve that, you&amp;rsquo;ll need to install Caddy and configure the correct port forwarding.&lt;/p&gt;
&lt;h2 id="installation-caddy"&gt;Installation Caddy&lt;/h2&gt;
&lt;p&gt;To install Caddy, I followed their &lt;a href="https://caddyserver.com/docs/install"&gt;officical installation guide&lt;/a&gt; and &lt;a href="https://caddyserver.com/docs/running#manual-installation"&gt;make caddy a service guide&lt;/a&gt;:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Begin by downloading the Caddy binary. Head over to their &lt;a href="https://caddyserver.com/docs/install#static-binaries"&gt;download page&lt;/a&gt;, choose the appropriate platform (for Raspberry Pi, it should be &amp;ldquo;Linux arm64&amp;rdquo;), and select the DuckDNS and Security module. Press download.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Send the downloaded file to your server using &lt;code&gt;scp&lt;/code&gt;. Ensure you have OpenSSH selected as your SSH server (refer to &amp;ldquo;My Homelab Part 2: DietPi&amp;rdquo;). I recommend naming the file &lt;code&gt;caddy&lt;/code&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Make the file executable and assign yourself as the owner:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-sh" data-lang="sh"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;1&lt;/span&gt;&lt;span class="cl"&gt;chmod &lt;span class="m"&gt;700&lt;/span&gt; caddy
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;2&lt;/span&gt;&lt;span class="cl"&gt;chown User_Name caddy
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Move Caddy into your &lt;code&gt;$PATH$&lt;/code&gt;:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-sh" data-lang="sh"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;1&lt;/span&gt;&lt;span class="cl"&gt;sudo mv caddy /usr/bin/
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Verify the installation by running the Caddy version command:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-sh" data-lang="sh"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;1&lt;/span&gt;&lt;span class="cl"&gt;caddy version
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Create a folder for Caddy config files:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-sh" data-lang="sh"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;1&lt;/span&gt;&lt;span class="cl"&gt;mkdir Caddy
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;2&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="nb"&gt;cd&lt;/span&gt; Caddy
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;3&lt;/span&gt;&lt;span class="cl"&gt;touch Caddyfile
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;4&lt;/span&gt;&lt;span class="cl"&gt;touch caddy.env
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;5&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="nb"&gt;cd&lt;/span&gt; ..
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Create a systemd unit file::&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-sh" data-lang="sh"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;1&lt;/span&gt;&lt;span class="cl"&gt;nano /etc/systemd/system/caddy.service
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Enter the following into the file, ensure you choose the correct path for &lt;code&gt;ExecStart&lt;/code&gt; and &lt;code&gt;ExecReload&lt;/code&gt; if your configuration file is in a different location:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-sh" data-lang="sh"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 1&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;# caddy.service&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 2&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;#&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 3&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;# For using Caddy with a config file.&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 4&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;#&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 5&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;# Make sure the ExecStart and ExecReload commands are correct&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 6&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;# for your installation.&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 7&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;#&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 8&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;# See https://caddyserver.com/docs/install for instructions.&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 9&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;#&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;10&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;# WARNING: This service does not use the --resume flag, so if you&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;11&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;# use the API to make changes, they will be overwritten by the&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;12&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;# Caddyfile next time the service is restarted. If you intend to&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;13&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;# use Caddy&amp;#39;s API to configure it, add the --resume flag to the&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;14&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;# `caddy run` command or use the caddy-api.service file instead.&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;15&lt;/span&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;16&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="o"&gt;[&lt;/span&gt;Unit&lt;span class="o"&gt;]&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;17&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="nv"&gt;Description&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;Caddy
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;18&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="nv"&gt;Documentation&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;https://caddyserver.com/docs/
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;19&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="nv"&gt;After&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;network.target network-online.target
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;20&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="nv"&gt;Requires&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;network-online.target
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;21&lt;/span&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;22&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="o"&gt;[&lt;/span&gt;Service&lt;span class="o"&gt;]&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;23&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="nv"&gt;Type&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;notify
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;24&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="nv"&gt;User&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;caddy
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;25&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="nv"&gt;Group&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;caddy
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;26&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="nv"&gt;ExecStart&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;/usr/bin/caddy run --environ --config /root/caddy/Caddyfile --envfile /root/caddy/caddy.env
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;27&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="nv"&gt;ExecReload&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;/usr/bin/caddy reload --config /root/caddy/Caddyfile --envfile /root/caddy/caddy.env --force
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;28&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="nv"&gt;TimeoutStopSec&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;5s
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;29&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="nv"&gt;LimitNOFILE&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="m"&gt;1048576&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;30&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="nv"&gt;LimitNPROC&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="m"&gt;512&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;31&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="nv"&gt;PrivateTmp&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nb"&gt;true&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;32&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="nv"&gt;ProtectSystem&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;full
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;33&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="nv"&gt;AmbientCapabilities&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;CAP_NET_ADMIN CAP_NET_BIND_SERVICE
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;34&lt;/span&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;35&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="o"&gt;[&lt;/span&gt;Install&lt;span class="o"&gt;]&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;36&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="nv"&gt;WantedBy&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;multi-user.target
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Start Caddy as a service by typing:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-sh" data-lang="sh"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;1&lt;/span&gt;&lt;span class="cl"&gt;sudo systemctl daemon-reload
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;2&lt;/span&gt;&lt;span class="cl"&gt;sudo systemctl &lt;span class="nb"&gt;enable&lt;/span&gt; --now caddy
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;To verify that it&amp;rsquo;s running, use:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-sh" data-lang="sh"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;1&lt;/span&gt;&lt;span class="cl"&gt;systemctl status caddy
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Caddy won&amp;rsquo;t work yet as your configuration file is still empty. Check out the next section for configuration details, and then restart Caddy with the following commands:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-sh" data-lang="sh"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;1&lt;/span&gt;&lt;span class="cl"&gt;systemctl stop caddy
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;2&lt;/span&gt;&lt;span class="cl"&gt;systemctl start caddy
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;3&lt;/span&gt;&lt;span class="cl"&gt;systemctl status caddy
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id="configuration-caddy"&gt;Configuration Caddy&lt;/h2&gt;
&lt;p&gt;All your Caddy configurations will be done in the previously created Caddy folder, which includes two files: the Caddyfile for configurations and the caddy.env file to store environmental variables. If you are unsure about anything or need guidance, refer to the &lt;a href="https://caddyserver.com/docs/"&gt;caddy documentation&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Firstly, open the &lt;code&gt;caddy.env&lt;/code&gt; file and enter the ports for all your running services, along with a name, and the domain. The file should look like this:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-env" data-lang="env"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;1&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="nv"&gt;DOMAIN&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;name_of_your_domain.duckdns.org
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;2&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="nv"&gt;DUCKDNS_TOKEN&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;your_duck_dns_token
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;3&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="nv"&gt;VAULTWARDEN_PORT&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="m"&gt;150&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;4&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="nv"&gt;HOMEPAGE_PORT&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="m"&gt;3000&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;5&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="nv"&gt;SYNCTHING_PORT&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="m"&gt;8384&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;6&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="nv"&gt;CALIBRE_PORT&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="m"&gt;8083&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;7&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="nv"&gt;UPTIME_PORT&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="m"&gt;3001&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;8&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="nv"&gt;HOME_ASSISTANT_PORT&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="m"&gt;8123&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;9&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="nv"&gt;MQT_PORT&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="m"&gt;8888&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;These variables will be used in the &lt;code&gt;Caddyfile&lt;/code&gt;. Using variables allows easy modification of ports without changing every occurrence in the &lt;code&gt;Caddyfile&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;For a simple forwarding from your domain to your homepage, insert the following into the &lt;code&gt;Caddyfile&lt;/code&gt; :&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-fallback" data-lang="fallback"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;1&lt;/span&gt;&lt;span class="cl"&gt;{$DOMAIN} {
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;2&lt;/span&gt;&lt;span class="cl"&gt; reverse_proxy localhost:{$HOMEPAGE_PORT}
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;3&lt;/span&gt;&lt;span class="cl"&gt;}
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Save the file and restart Caddy. However, accessing your homepage through your domain won&amp;rsquo;t work yet because you need to port forward and instruct Caddy to use DuckDNS as the domain.&lt;/p&gt;
&lt;h3 id="duckdns"&gt;DuckDNS&lt;/h3&gt;
&lt;p&gt;Until now, Caddy is aware that it should listen to your domain and forward it to your homepage. However, it won&amp;rsquo;t function without Caddy knowing your DuckDNS token. Therefore, you need to set the token in your &lt;code&gt;caddy.env&lt;/code&gt; file. To inform Caddy about using the token, add the following to your &lt;code&gt;Caddyfile&lt;/code&gt;:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-fallback" data-lang="fallback"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;1&lt;/span&gt;&lt;span class="cl"&gt;(tls) {
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;2&lt;/span&gt;&lt;span class="cl"&gt; tls {
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;3&lt;/span&gt;&lt;span class="cl"&gt; dns duckdns {$DUCKDNS_TOKEN}
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;4&lt;/span&gt;&lt;span class="cl"&gt; }
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;5&lt;/span&gt;&lt;span class="cl"&gt;}
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;When you want to utilize the domain on one of your services, you can import it as follows:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-fallback" data-lang="fallback"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;1&lt;/span&gt;&lt;span class="cl"&gt;{$DOMAIN} {
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;2&lt;/span&gt;&lt;span class="cl"&gt;	import tls	
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;3&lt;/span&gt;&lt;span class="cl"&gt;	
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;4&lt;/span&gt;&lt;span class="cl"&gt;	reverse_proxy localhost:{$HOMEPAGE_PORT}
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;5&lt;/span&gt;&lt;span class="cl"&gt;}
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Caddy will now use your DuckDNS token to request HTTPS certificates from the &lt;a href="https://letsencrypt.org/"&gt;Let&amp;rsquo;s Encrypt&lt;/a&gt; server,
enabling you to access your site through HTTPS via your domain name.&lt;/p&gt;
&lt;p&gt;Keep in mind: It may take up to 24 hours for the &lt;a href="https://letsencrypt.org/"&gt;Let&amp;rsquo;s Encrypt&lt;/a&gt; server to issue your certificate. Therefore, it might take some time before you can access your website via HTTPS.&lt;/p&gt;
&lt;h3 id="port-forward"&gt;Port Forward&lt;/h3&gt;
&lt;p&gt;By default, your router is configured to reject all incoming internet traffic for security reasons, preventing unauthorized access to your network. However, this poses a challenge for accessing your hosted services from outside your network. The solution is port forwarding.&lt;/p&gt;
&lt;p&gt;Think of a port as a door – port forwarding allows you to open this door and allow internet traffic inside. However, it comes with risks, as malicious actors could also exploit this open door. It is crucial to only open ports that you are confident cannot be misused.&lt;/p&gt;
&lt;p&gt;To access services behind your Caddy reverse proxy, you need to port forward ports 80 and 443, responsible for HTTP and HTTPS, respectively. To find out how to port forward with your specific router, search the internet for your router model followed by &amp;ldquo;How to port forward.&amp;rdquo;&lt;/p&gt;
&lt;h3 id="file-server"&gt;File Server&lt;/h3&gt;
&lt;p&gt;Another useful thing that caddy can do is host a fileserver.
A fileserver host a bunch of files making them accessible through the internet.
Because it allows the hosting of static files, it also allows you to host your own website by hosting &lt;code&gt;.html&lt;/code&gt; files through the same principal.&lt;/p&gt;
&lt;figure&gt;
 &lt;img style="display: block; margin-left: auto; margin-right: auto; width:100%" src="https://monkemanx.github.io/attachments/c630caf59f1f3fd601872b7b2d7abe63.png"&gt;
&lt;/figure&gt;
&lt;p&gt;If you want to use a file server you need the following code in your webserver:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-fallback" data-lang="fallback"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;1&lt;/span&gt;&lt;span class="cl"&gt;files.{$DOMAIN} {
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;2&lt;/span&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;3&lt;/span&gt;&lt;span class="cl"&gt; root * /path/towards/files
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;4&lt;/span&gt;&lt;span class="cl"&gt; file_server browse
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;5&lt;/span&gt;&lt;span class="cl"&gt;}
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Using &amp;ldquo;files.{$DOMAIN}&amp;rdquo; ensures that I will later be able to access my files trhough the use of the following URL: &lt;code&gt;htpps:///files.your_domain_name&lt;/code&gt;.
The file server of caddy has a bunch of more settings that can be adjusted like compression, root of the files, files to hide and more, to see a full list click &lt;a href="https://caddyserver.com/docs/caddyfile/directives/file_server"&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;h3 id="http-header"&gt;HTTP header&lt;/h3&gt;
&lt;p&gt;HTTP headers enable the client and server to exchange additional information with an HTTP request or response, contributing to website security. The OWASP &lt;a href="(https://cheatsheetseries.owasp.org/cheatsheets/HTTP_Headers_Cheat_Sheet.html)"&gt;HTTP Headers Cheat Sheet&lt;/a&gt; offers a comprehensive overview of possible headers, and it is advisable to follow their recommendations when setting HTTP header. You can assess the security of your website using &lt;a href="https://securityheaders.com/"&gt;securityheaders.com&lt;/a&gt;, which evaluates your website&amp;rsquo;s headers and provides a ranking based on them.&lt;/p&gt;
&lt;p&gt;HTTP headers let the client and the server pass additional information with an HTTP request or response.&lt;/p&gt;
&lt;p&gt;To set your headers in Caddy, use the following code:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-fallback" data-lang="fallback"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 1&lt;/span&gt;&lt;span class="cl"&gt;(header) {
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 2&lt;/span&gt;&lt;span class="cl"&gt;	header {
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 3&lt;/span&gt;&lt;span class="cl"&gt;		Strict-Transport-Security &amp;#34;max-age=31536000; includeSubdomains&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 4&lt;/span&gt;&lt;span class="cl"&gt;		X-XSS-Protection &amp;#34;1; mode=block&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 5&lt;/span&gt;&lt;span class="cl"&gt;		X-Content-Type-Options &amp;#34;nosniff&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 6&lt;/span&gt;&lt;span class="cl"&gt;		Referrer-Policy &amp;#34;same-origin&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 7&lt;/span&gt;&lt;span class="cl"&gt;		X-Frame-Options &amp;#34;ALLOW-FROM *.{$DOMAIN}&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 8&lt;/span&gt;&lt;span class="cl"&gt;		-Server
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 9&lt;/span&gt;&lt;span class="cl"&gt;		Content-Security-Policy &amp;#34;frame-ancestors {$DOMAIN} *.{$DOMAIN}&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;10&lt;/span&gt;&lt;span class="cl"&gt;		Permissions-Policy &amp;#34;geolocation=(self {$DOMAIN} *.{$DOMAIN}), microphone=()&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;11&lt;/span&gt;&lt;span class="cl"&gt; }
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;12&lt;/span&gt;&lt;span class="cl"&gt;}
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;And later when you want to use it you can simply import it like this:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-fallback" data-lang="fallback"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;1&lt;/span&gt;&lt;span class="cl"&gt;{$DOMAIN} {
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;2&lt;/span&gt;&lt;span class="cl"&gt;	import tls
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;3&lt;/span&gt;&lt;span class="cl"&gt;	import header
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;4&lt;/span&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;5&lt;/span&gt;&lt;span class="cl"&gt;	reverse_proxy localhost:{$HOMEPAGE_PORT}
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;6&lt;/span&gt;&lt;span class="cl"&gt;}
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id="adding-an-authentication-portal"&gt;Adding an Authentication Portal&lt;/h3&gt;
&lt;p&gt;For this section to work, you need to download Caddy with the Security module selected.&lt;/p&gt;
&lt;p&gt;Even though most services have their own authentication methods, adding an extra layer of security with a portal before the user reaches your homepage might be desirable.&lt;/p&gt;
&lt;figure&gt;
 &lt;img style="display: block; margin-left: auto; margin-right: auto; width:60%" src="https://monkemanx.github.io/attachments/Screenshot%20from%202024-01-24%2006-44-08.png"&gt;
 &lt;figcaption&gt;Authentication Portal&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;p&gt;To add the authentication site to Caddy, use the following code:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-fallback" data-lang="fallback"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 1&lt;/span&gt;&lt;span class="cl"&gt;{
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 2&lt;/span&gt;&lt;span class="cl"&gt; order authenticate before respond
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 3&lt;/span&gt;&lt;span class="cl"&gt; order authorize before reverse_proxy
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 4&lt;/span&gt;&lt;span class="cl"&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 5&lt;/span&gt;&lt;span class="cl"&gt; security {
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 6&lt;/span&gt;&lt;span class="cl"&gt; 	local identity store localdb {
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 7&lt;/span&gt;&lt;span class="cl"&gt; realm local
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 8&lt;/span&gt;&lt;span class="cl"&gt; path /etc/caddy/auth/local/users.json
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 9&lt;/span&gt;&lt;span class="cl"&gt; }
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;10&lt;/span&gt;&lt;span class="cl"&gt; 	authentication portal myportal {
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;11&lt;/span&gt;&lt;span class="cl"&gt;	 enable identity store localdb
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;12&lt;/span&gt;&lt;span class="cl"&gt;	 cookie domain {$DOMAIN}
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;13&lt;/span&gt;&lt;span class="cl"&gt;	 cookie lifetime 172800 # 48 hours in seconds
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;14&lt;/span&gt;&lt;span class="cl"&gt;	 transform user {
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;15&lt;/span&gt;&lt;span class="cl"&gt;		match email schuppsimon5@gmail.com
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;16&lt;/span&gt;&lt;span class="cl"&gt;		action add role authp/user
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;17&lt;/span&gt;&lt;span class="cl"&gt;	 }
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;18&lt;/span&gt;&lt;span class="cl"&gt;	} 
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;19&lt;/span&gt;&lt;span class="cl"&gt; authorization policy admin_policy {
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;20&lt;/span&gt;&lt;span class="cl"&gt; set auth url https://auth.{$DOMAIN}
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;21&lt;/span&gt;&lt;span class="cl"&gt; allow roles authp/user
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;22&lt;/span&gt;&lt;span class="cl"&gt; }
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;23&lt;/span&gt;&lt;span class="cl"&gt; }
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;24&lt;/span&gt;&lt;span class="cl"&gt;}
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;(I got the cookie lifetime never correctly work for me, If someone knows why, shoot me an email)&lt;/p&gt;
&lt;p&gt;If you now want to add this security portal to a site of you, you can do the following:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-fallback" data-lang="fallback"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;1&lt;/span&gt;&lt;span class="cl"&gt;{$DOMAIN} {
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;2&lt;/span&gt;&lt;span class="cl"&gt;	import tls
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;3&lt;/span&gt;&lt;span class="cl"&gt;	import header
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;4&lt;/span&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;5&lt;/span&gt;&lt;span class="cl"&gt;	authorize with admin_policy
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;6&lt;/span&gt;&lt;span class="cl"&gt;	reverse_proxy localhost:{$HOMEPAGE_PORT}
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;7&lt;/span&gt;&lt;span class="cl"&gt;}
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id="services-and-reverse-proxies"&gt;Services and Reverse Proxies&lt;/h3&gt;
&lt;p&gt;Not every service works seamlessly with a reverse proxy. Some may require specific settings or the configuration of the domain name. In such cases, consult the documentation for information on using reverse proxies with the respective service.&lt;/p&gt;
&lt;p&gt;It&amp;rsquo;s worth noting that some services may not work at all. For instance, HomeAssistant may pose challenges, and accessing it might be limited to only the home network using an IP address.&lt;/p&gt;
&lt;h2 id="full-caddyfile"&gt;Full Caddyfile&lt;/h2&gt;
&lt;p&gt;Here&amp;rsquo;s my full Caddyfile for reference:
&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Click here to show it&lt;/summary&gt;
 
 &lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-fallback" data-lang="fallback"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 1&lt;/span&gt;&lt;span class="cl"&gt;{
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 2&lt;/span&gt;&lt;span class="cl"&gt; order authenticate before respond
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 3&lt;/span&gt;&lt;span class="cl"&gt; order authorize before reverse_proxy
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 4&lt;/span&gt;&lt;span class="cl"&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 5&lt;/span&gt;&lt;span class="cl"&gt; security {
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 6&lt;/span&gt;&lt;span class="cl"&gt; 	local identity store localdb {
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 7&lt;/span&gt;&lt;span class="cl"&gt; realm local
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 8&lt;/span&gt;&lt;span class="cl"&gt; path /etc/caddy/auth/local/users.json
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 9&lt;/span&gt;&lt;span class="cl"&gt; }
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 10&lt;/span&gt;&lt;span class="cl"&gt; 	authentication portal myportal {
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 11&lt;/span&gt;&lt;span class="cl"&gt;	 enable identity store localdb
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 12&lt;/span&gt;&lt;span class="cl"&gt;	 cookie domain {$DOMAIN}
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 13&lt;/span&gt;&lt;span class="cl"&gt; cookie lifetime 86400 # 24h	 
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 14&lt;/span&gt;&lt;span class="cl"&gt; cookie samesite lax
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 15&lt;/span&gt;&lt;span class="cl"&gt; cookie insecure off 
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 16&lt;/span&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 17&lt;/span&gt;&lt;span class="cl"&gt; ui {
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 18&lt;/span&gt;&lt;span class="cl"&gt; links {
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 19&lt;/span&gt;&lt;span class="cl"&gt; &amp;#34;My Identity&amp;#34; &amp;#34;/whoami&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 20&lt;/span&gt;&lt;span class="cl"&gt; }
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 21&lt;/span&gt;&lt;span class="cl"&gt; }
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 22&lt;/span&gt;&lt;span class="cl"&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 23&lt;/span&gt;&lt;span class="cl"&gt; transform user {
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 24&lt;/span&gt;&lt;span class="cl"&gt;		match email schuppsimon5@gmail.com
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 25&lt;/span&gt;&lt;span class="cl"&gt;		action add role authp/user
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 26&lt;/span&gt;&lt;span class="cl"&gt;	 }
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 27&lt;/span&gt;&lt;span class="cl"&gt;	} 
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 28&lt;/span&gt;&lt;span class="cl"&gt; authorization policy admin_policy {
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 29&lt;/span&gt;&lt;span class="cl"&gt; set auth url https://auth.{$DOMAIN}
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 30&lt;/span&gt;&lt;span class="cl"&gt; allow roles authp/user
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 31&lt;/span&gt;&lt;span class="cl"&gt; }
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 32&lt;/span&gt;&lt;span class="cl"&gt; }
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 33&lt;/span&gt;&lt;span class="cl"&gt;}
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 34&lt;/span&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 35&lt;/span&gt;&lt;span class="cl"&gt;(header) {
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 36&lt;/span&gt;&lt;span class="cl"&gt;	header {
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 37&lt;/span&gt;&lt;span class="cl"&gt;		Strict-Transport-Security &amp;#34;max-age=31536000; includeSubdomains&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 38&lt;/span&gt;&lt;span class="cl"&gt;		X-XSS-Protection &amp;#34;1; mode=block&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 39&lt;/span&gt;&lt;span class="cl"&gt;		X-Content-Type-Options &amp;#34;nosniff&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 40&lt;/span&gt;&lt;span class="cl"&gt;		Referrer-Policy &amp;#34;same-origin&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 41&lt;/span&gt;&lt;span class="cl"&gt;		X-Frame-Options &amp;#34;ALLOW-FROM *.{$DOMAIN}&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 42&lt;/span&gt;&lt;span class="cl"&gt;		-Server
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 43&lt;/span&gt;&lt;span class="cl"&gt;		Content-Security-Policy &amp;#34;frame-ancestors {$DOMAIN} *.{$DOMAIN}&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 44&lt;/span&gt;&lt;span class="cl"&gt;		Permissions-Policy &amp;#34;geolocation=(self {$DOMAIN} *.{$DOMAIN}), microphone=()&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 45&lt;/span&gt;&lt;span class="cl"&gt; }
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 46&lt;/span&gt;&lt;span class="cl"&gt;}
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 47&lt;/span&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 48&lt;/span&gt;&lt;span class="cl"&gt;(tls) {
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 49&lt;/span&gt;&lt;span class="cl"&gt; tls {
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 50&lt;/span&gt;&lt;span class="cl"&gt; dns duckdns {$DUCKDNS_TOKEN}
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 51&lt;/span&gt;&lt;span class="cl"&gt; }
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 52&lt;/span&gt;&lt;span class="cl"&gt;}
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 53&lt;/span&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 54&lt;/span&gt;&lt;span class="cl"&gt;auth.{$DOMAIN} {
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 55&lt;/span&gt;&lt;span class="cl"&gt; import header
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 56&lt;/span&gt;&lt;span class="cl"&gt;	
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 57&lt;/span&gt;&lt;span class="cl"&gt; authenticate with myportal
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 58&lt;/span&gt;&lt;span class="cl"&gt;}
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 59&lt;/span&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 60&lt;/span&gt;&lt;span class="cl"&gt;{$DOMAIN} {
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 61&lt;/span&gt;&lt;span class="cl"&gt; import tls
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 62&lt;/span&gt;&lt;span class="cl"&gt; import header
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 63&lt;/span&gt;&lt;span class="cl"&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 64&lt;/span&gt;&lt;span class="cl"&gt; authorize with admin_policy
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 65&lt;/span&gt;&lt;span class="cl"&gt; reverse_proxy localhost:{$HOMEPAGE_PORT}
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 66&lt;/span&gt;&lt;span class="cl"&gt;}
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 67&lt;/span&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 68&lt;/span&gt;&lt;span class="cl"&gt;vaultwarden.{$DOMAIN} {
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 69&lt;/span&gt;&lt;span class="cl"&gt; import tls
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 70&lt;/span&gt;&lt;span class="cl"&gt; # import header
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 71&lt;/span&gt;&lt;span class="cl"&gt; # i think with the header doesnt work
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 72&lt;/span&gt;&lt;span class="cl"&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 73&lt;/span&gt;&lt;span class="cl"&gt; reverse_proxy localhost:{$VAULTWARDEN_PORT}
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 74&lt;/span&gt;&lt;span class="cl"&gt;}
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 75&lt;/span&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 76&lt;/span&gt;&lt;span class="cl"&gt;rss.{$DOMAIN} {
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 77&lt;/span&gt;&lt;span class="cl"&gt; import tls
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 78&lt;/span&gt;&lt;span class="cl"&gt; # import header
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 79&lt;/span&gt;&lt;span class="cl"&gt; # i think with the header doesnt work 
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 80&lt;/span&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 81&lt;/span&gt;&lt;span class="cl"&gt; authorize with admin_policy
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 82&lt;/span&gt;&lt;span class="cl"&gt; reverse_proxy localhost:{$RSS_PORT}
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 83&lt;/span&gt;&lt;span class="cl"&gt;}
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 84&lt;/span&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 85&lt;/span&gt;&lt;span class="cl"&gt;calibre.{$DOMAIN} {
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 86&lt;/span&gt;&lt;span class="cl"&gt; import tls
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 87&lt;/span&gt;&lt;span class="cl"&gt; import header
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 88&lt;/span&gt;&lt;span class="cl"&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 89&lt;/span&gt;&lt;span class="cl"&gt; authorize with admin_policy
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 90&lt;/span&gt;&lt;span class="cl"&gt; reverse_proxy localhost:{$CALIBRE_PORT}
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 91&lt;/span&gt;&lt;span class="cl"&gt;}
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 92&lt;/span&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 93&lt;/span&gt;&lt;span class="cl"&gt;uptime.{$DOMAIN} {
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 94&lt;/span&gt;&lt;span class="cl"&gt; import tls
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 95&lt;/span&gt;&lt;span class="cl"&gt; import header
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 96&lt;/span&gt;&lt;span class="cl"&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 97&lt;/span&gt;&lt;span class="cl"&gt; authorize with admin_policy
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 98&lt;/span&gt;&lt;span class="cl"&gt; reverse_proxy localhost:{$UPTIME_PORT}
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 99&lt;/span&gt;&lt;span class="cl"&gt;}
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;100&lt;/span&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;101&lt;/span&gt;&lt;span class="cl"&gt;syncthing.{$DOMAIN} {
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;102&lt;/span&gt;&lt;span class="cl"&gt; import tls
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;103&lt;/span&gt;&lt;span class="cl"&gt; import header
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;104&lt;/span&gt;&lt;span class="cl"&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;105&lt;/span&gt;&lt;span class="cl"&gt; authorize with admin_policy
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;106&lt;/span&gt;&lt;span class="cl"&gt; reverse_proxy localhost:{$SYNCTHING_PORT}
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;107&lt;/span&gt;&lt;span class="cl"&gt;}
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;108&lt;/span&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;109&lt;/span&gt;&lt;span class="cl"&gt;netdata.{$DOMAIN} {
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;110&lt;/span&gt;&lt;span class="cl"&gt; import tls
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;111&lt;/span&gt;&lt;span class="cl"&gt; import header
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;112&lt;/span&gt;&lt;span class="cl"&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;113&lt;/span&gt;&lt;span class="cl"&gt; authorize with admin_policy
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;114&lt;/span&gt;&lt;span class="cl"&gt; reverse_proxy localhost:{$NETDATA} 
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;115&lt;/span&gt;&lt;span class="cl"&gt;}
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;116&lt;/span&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;117&lt;/span&gt;&lt;span class="cl"&gt;media.{$DOMAIN} {
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;118&lt;/span&gt;&lt;span class="cl"&gt; import tls
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;119&lt;/span&gt;&lt;span class="cl"&gt; import header
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;120&lt;/span&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;121&lt;/span&gt;&lt;span class="cl"&gt; authorize with admin_policy
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;122&lt;/span&gt;&lt;span class="cl"&gt; root * /mnt/externalDisk/media
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;123&lt;/span&gt;&lt;span class="cl"&gt; file_server browse
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;124&lt;/span&gt;&lt;span class="cl"&gt;}
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;125&lt;/span&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;126&lt;/span&gt;&lt;span class="cl"&gt;wg.{$DOMAIN} {
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;127&lt;/span&gt;&lt;span class="cl"&gt; import tls
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;128&lt;/span&gt;&lt;span class="cl"&gt; import header
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;129&lt;/span&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;130&lt;/span&gt;&lt;span class="cl"&gt; authorize with admin_policy
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;131&lt;/span&gt;&lt;span class="cl"&gt; reverse_proxy localhost:{$WG_PORT}
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;132&lt;/span&gt;&lt;span class="cl"&gt;}
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
 
&lt;/details&gt;

&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;References:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://blog.sjain.dev/caddy-sso/"&gt;Blog Post about Authentication Portal&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://caddyserver.com/"&gt;Caddy Documentation&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://cheatsheetseries.owasp.org/cheatsheets/HTTP_Headers_Cheat_Sheet.html"&gt;Security Headers&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>My Homelab Part 8: Homepage</title><link>https://monkemanx.github.io/articles/my_homelab_part_8_homepage/</link><pubDate>Sun, 21 Jan 2024 18:30:17 +0000</pubDate><author>monkeman@cock.li (MonkeMan)</author><guid>https://monkemanx.github.io/articles/my_homelab_part_8_homepage/</guid><description>&lt;p&gt;If you have been following my Homelab Series so far, you probably have quite a number of services running, and perhaps you&amp;rsquo;re losing track of all your services. In that case, you might want to consider having a central page that links to all your hosted services.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/gethomepage/homepage"&gt;Homepage&lt;/a&gt; is a highly customizable, fully static, fast, and modern dashboard with integration for many services. It allows users to see all running services at a glance and can be easily configured by editing a YAML file.&lt;/p&gt;


&lt;figure&gt;
 &lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width:100%" src="https://monkemanx.github.io/attachments/aa21552515d1f292852d17cbeda6d676.png"&gt;
 &lt;figcaption style="text-align:center"&gt;Example Dashboard with homepage&lt;/figcaption&gt;
&lt;/figure&gt;


&lt;h2 id="installation"&gt;Installation&lt;/h2&gt;
&lt;p&gt;Similar to the previous blog posts, I will use Docker Compose with the following compose file(homepage-compose.yml) to install Homepage:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-yml" data-lang="yml"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 1&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="nt"&gt;version&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;3.3&amp;#34;&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 2&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="nt"&gt;services&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 3&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;homepage&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 4&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;image&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;ghcr.io/gethomepage/homepage:latest&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 5&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;container_name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;homepage&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 6&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;environment&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 7&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;PUID&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="m"&gt;1000&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 8&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;PGID&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="m"&gt;1000&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 9&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;ports&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;10&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="m"&gt;3000&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="m"&gt;3000&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;11&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;volumes&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;12&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="l"&gt;/root/homepage/config:/app/config&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;13&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="l"&gt;/var/run/docker.sock:/var/run/docker.sock:ro&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="c"&gt;# optional, for docker integrations&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;14&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;restart&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;unless-stopped&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;As always, before installing Homepage, make sure to customize the compose file to your liking. You might want to change the port, PUID/PGID, restart behavior, and the volumes.&lt;/p&gt;
&lt;p&gt;If you want to display the status of the Docker container on your central page, you need to run the container in root mode, which means removing PUID and PGID.&lt;/p&gt;
&lt;p&gt;To install homepage, follow these steps:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Start the docker container:
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-sh" data-lang="sh"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;1&lt;/span&gt;&lt;span class="cl"&gt;docker compose -f homepage-compose.yml up -d
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;You should be able to reach the website under: &lt;code&gt;http://&amp;lt;IP_Of_Your_Server&amp;gt;:homepage_port&lt;/code&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id="configuration"&gt;Configuration&lt;/h2&gt;
&lt;p&gt;To learn more about configuring the dashboard, you can read the documentation in the references. I will only show my basic configuration.&lt;/p&gt;
&lt;p&gt;If you didn&amp;rsquo;t change the volumes, all the configuration files can be found in the &lt;code&gt;homepage/config&lt;/code&gt; folder. The &lt;code&gt;services.yaml&lt;/code&gt; is the most important file; in there, you can change what services should be visible on the dashboard. My configuration file looks like this:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-yml" data-lang="yml"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 1&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="nn"&gt;---&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 2&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="c"&gt;# For configuration options and examples, please see:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 3&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="c"&gt;# https://gethomepage.dev/latest/configs/services&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 4&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 5&lt;/span&gt;&lt;span class="cl"&gt;- &lt;span class="nt"&gt;Services&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 6&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="nt"&gt;Syncthing&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 7&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;href&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;http://syncthing.my_domain&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 8&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;description&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;Synchronizes your files.&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 9&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;server&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;my-docker&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;10&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;container&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;synthing&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;11&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;12&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="nt"&gt;CalibreWeb&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;13&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;href&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;http://calibre.my_domain&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;14&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;description&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;OnlineBooks&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;15&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;server&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;my-docker&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;16&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;container&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;claibre-web&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;17&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;18&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="nt"&gt;UptimeKuma&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;19&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;href&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;http://uptime.my_domain&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;20&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;description&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;Monitors Docker Container&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;21&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;server&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;my-docker&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;22&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;container&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;uptime-kuma&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;23&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;24&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="nt"&gt;Vaultwarden&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;25&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;href&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;http://vaultwarden.my_domain&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;26&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;description&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;Password manager&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;27&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;server&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;my-docker&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;28&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;container&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;vaultwarden&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;29&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;30&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="nt"&gt;Media&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;31&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;href&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;https://media.monkeman.duckdns.org&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;32&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;description&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;File browser for my Photos and Videos&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;33&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;34&lt;/span&gt;&lt;span class="cl"&gt;- &lt;span class="nt"&gt;Local Services&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;35&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="nt"&gt;Wireguard&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;36&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;href&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;http://server_ip:51821/&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;37&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;description&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;WireguardVPN&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;38&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;server&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;my-docker&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;39&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;container&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;wg-easy&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;40&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;41&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="nt"&gt;HomeAssistant&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;42&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;href&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;http://192.168.12.100:8123/&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;43&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;description&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;The Home Assistant&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;44&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;server&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;my-docker&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;45&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;container&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;homeassistant&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;46&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;47&lt;/span&gt;&lt;span class="cl"&gt;- &lt;span class="nt"&gt;External Links&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;48&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="nt"&gt;FritzBox&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;49&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;href&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;http://fritz.box/&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;50&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;description&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;My Router&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;51&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;52&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="nt"&gt;DuckDNS&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;53&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;href&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;https://www.duckdns.org/&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;54&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;description&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;My dynamic DNS &lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;I use the &lt;code&gt;container&lt;/code&gt; and &lt;code&gt;server&lt;/code&gt; variables to show the current status of the service, where &lt;code&gt;container&lt;/code&gt; is the name of the Docker container as defined in the respective compose file. To use this, your &lt;code&gt;docker.yaml&lt;/code&gt; file inside your config folder needs to look like this:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-yml" data-lang="yml"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 1&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="nn"&gt;---&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 2&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="c"&gt;# For configuration options and examples, please see:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 3&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="c"&gt;# https://gethomepage.dev/latest/configs/docker/&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 4&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 5&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="c"&gt;#my-docker:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 6&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="c"&gt;# host: 127.0.0.1&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 7&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="c"&gt;# port: 2375&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 8&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 9&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="nt"&gt;my-docker&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;10&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;socket&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;/var/run/docker.sock&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;There is a great number of services that have some kind of integration with Homepage; you can check this &lt;a href="https://gethomepage.dev/latest/widgets/"&gt;list&lt;/a&gt; out. Most code for the widget would be written in the &lt;code&gt;service.yaml&lt;/code&gt; into the respective category, but some widgets need to be written into the &lt;code&gt;widgets.yaml&lt;/code&gt; file.&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;References:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://gethomepage.dev/latest/"&gt;Homepage Docs&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>My Homelab Part 7: UptimeKuma</title><link>https://monkemanx.github.io/articles/my_homelab_part_7_uptimekuma/</link><pubDate>Sat, 20 Jan 2024 18:30:47 +0000</pubDate><author>monkeman@cock.li (MonkeMan)</author><guid>https://monkemanx.github.io/articles/my_homelab_part_7_uptimekuma/</guid><description>&lt;p&gt;Maybe at some point you have encountered a situation where, while running all your current containers, you tried accessing one of your services only to realize that the service is not available because the container exited without your knowledge?&lt;/p&gt;
&lt;p&gt;For such Issues, it&amp;rsquo;s beneficial to have a notification system that can automatically alert you whenever a container exits or is no longer available. To address this need, I use &lt;a href="https://uptime.kuma.pet/"&gt;UptimeKuma&lt;/a&gt;, an easy-to-use self-hosted monitoring tool. UptimeKuma can monitor uptime over means like HTTP(s)/TCP/Ping/Docker/DNS and notify you via various channels such as Telegram, Discord, Gotify, Slack, Email, and more. Additionally, it provides a user-friendly web interface for managing and adding new monitors.&lt;/p&gt;


&lt;figure&gt;
 &lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width:80%" src="https://monkemanx.github.io/attachments/5fb6d6ee5c143dedeeb77148ea1d2ff3.png"&gt;
 &lt;figcaption style="text-align:center"&gt;UptimeKuma Page&lt;/figcaption&gt;
&lt;/figure&gt;


&lt;h2 id="installation"&gt;Installation&lt;/h2&gt;
&lt;p&gt;To install UptimeKuma, I utilized Docker Compose with the following configuration in the compose file(uptimeKuma-compose.yml):&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-yml" data-lang="yml"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 1&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="nt"&gt;version&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;3.8&amp;#39;&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 2&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 3&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="nt"&gt;services&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 4&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;uptime-kuma&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 5&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;image&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;louislam/uptime-kuma:1&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 6&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;container_name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;uptime-kuma&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 7&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;volumes&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 8&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="l"&gt;/root/uptime-kuma/:/app/data&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 9&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;/var/run/docker.sock:/var/run/docker.sock&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;10&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;ports&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;11&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="s2"&gt;&amp;#34;3001:3001&amp;#34;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="c"&gt;# &amp;lt;Host Port&amp;gt;:&amp;lt;Container Port&amp;gt;&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;12&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;restart&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;unless-stopped&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;To install and execute the container, I used the following command:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-sh" data-lang="sh"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;1&lt;/span&gt;&lt;span class="cl"&gt;docker compose -f uptimeKuma-compose.yml up -d
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;After this, the web UI becomes accessible via the URL:
&lt;code&gt;http://&amp;lt;Server_IP&amp;gt;:UptimeKuma_Port&lt;/code&gt;&lt;/p&gt;
&lt;h2 id="configuration"&gt;Configuration&lt;/h2&gt;
&lt;p&gt;When configuring UptimeKuma, the first step is to change your login data. In order to do so, navigate to &lt;code&gt;Settings -&amp;gt; Security -&amp;gt; Change Password&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;To add a new monitor for one of your services, click the &lt;code&gt;add new monitor&lt;/code&gt; button in the top right corner.&lt;/p&gt;


&lt;figure&gt;
 &lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width:60%" src="https://monkemanx.github.io/attachments/401ce7a076ab17b1e057480dc491e524.png"&gt;
&lt;/figure&gt;


&lt;p&gt;Select the monitor type based on how UptimeKuma should monitor your service. For Instance, for monitoring a Docker container, choose &lt;code&gt;Docker Container&lt;/code&gt;. The &lt;code&gt;Friendly Name&lt;/code&gt; field is the display name for your monitor.&lt;/p&gt;
&lt;p&gt;Set the &lt;code&gt;Container Name/ID&lt;/code&gt; to the name or ID of the Docker container you want to monitor. Retrieve this information from your Docker Compose file or using the command &lt;code&gt;docker ps -a&lt;/code&gt;. Specify the &lt;code&gt;Docker Host&lt;/code&gt; to indicate where UptimeKuma should listen for the Docker container.&lt;/p&gt;


&lt;figure&gt;
 &lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width:60%" src="https://monkemanx.github.io/attachments/9d351bececedf9211fed1b35221f2dd2.png"&gt;
&lt;/figure&gt;


&lt;p&gt;The &lt;code&gt;Heartbeat Interval&lt;/code&gt; determines how often UptimeKuma checks your service. After configuring, click &lt;code&gt;save&lt;/code&gt;, and the monitor will appear on the UptimeKuma web UI, checking your service periodically.&lt;/p&gt;
&lt;p&gt;To receive notifications when the status of your service changes, set up notifications by editing a service monitor and clicking &lt;code&gt;Setup Notification&lt;/code&gt;.&lt;/p&gt;


&lt;figure&gt;
 &lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width:60%" src="https://monkemanx.github.io/attachments/350e598f2a7d1867bf9874c2c089fecd.png"&gt;
&lt;/figure&gt;


&lt;p&gt;For Telegram notifications, follow these steps:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Contact the Telegram Bot &lt;a href="https://telegram.me/BotFather"&gt;BotFather&lt;/a&gt; to create a new bot.
The &lt;code&gt;/start&lt;/code&gt; command, will show you a guide on how to setup a bot.
Alternatively, you can follow the steps below.&lt;/li&gt;
&lt;li&gt;Use the &lt;code&gt;/newbot&lt;/code&gt; command to create a new bot, following BotFather&amp;rsquo;s guidance.


&lt;figure&gt;
 &lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width:60%" src="https://monkemanx.github.io/attachments/10e8ce89857027e248f9face00d46aaa.png"&gt;
&lt;/figure&gt;

&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;

&lt;figure&gt;
 &lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width:60%" src="https://monkemanx.github.io/attachments/0ed96ca3a02e38d033c386b648c4cef4.png"&gt;
&lt;/figure&gt;


3. After creating the bot, copy the &lt;code&gt;HTTP API token&lt;/code&gt; and enter it in UptimeKuma.


&lt;figure&gt;
 &lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width:60%" src="https://monkemanx.github.io/attachments/e52b53a8a63e98281f9d9975b64c2579.png"&gt;
&lt;/figure&gt;


4. Test the configuration and save it. You can now enable Telegram notifications for all your site monitors.&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;References:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/louislam/uptime-kuma/wiki"&gt;UptimeKuma Docs&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>My Homelab Part 6: Syncthing</title><link>https://monkemanx.github.io/articles/my_homelab_part_6_syncthing/</link><pubDate>Sat, 20 Jan 2024 16:38:39 +0000</pubDate><author>monkeman@cock.li (MonkeMan)</author><guid>https://monkemanx.github.io/articles/my_homelab_part_6_syncthing/</guid><description>&lt;p&gt;In this installment, I explore another valuable use case for my server - file synchronization between my various devices. This includes regular backups of the pictures taken on my phone, archiving important documents, and seamless access to notes across all devices for tasks like blogging, to-dos, projects, and university-related work. To accomplish this, I rely on the powerful capabilities of &lt;a href="https://syncthing.net/"&gt;synthing&lt;/a&gt; a continuous file synchronization program.&lt;/p&gt;
&lt;p&gt;Syncthing operates by synchronizing files between two or more devices, akin to the functionality of OneDrive synchronization on Windows. However, instead of storing files on a cloud server, Syncthing saves them locally on my home server. The software comes equipped with a user-friendly WebUI that facilitates easy management of file synchronization and connected devices.&lt;/p&gt;


&lt;figure&gt;
 &lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width:60%" src="https://monkemanx.github.io/attachments/2eb72858a7d12a81c0c1280e559dac46.png"&gt;
 &lt;figcaption style="text-align:center"&gt;Example Syncthing Page.&lt;/figcaption&gt;
&lt;/figure&gt;


&lt;h2 id="installation"&gt;Installation&lt;/h2&gt;
&lt;p&gt;For the installation process, I utilize Docker Compose with the following configuration in the &lt;code&gt;synthing-compose.yml&lt;/code&gt; file:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-yml" data-lang="yml"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 1&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="nt"&gt;version&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;3&amp;#34;&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 2&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="nt"&gt;services&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 3&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;syncthing&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 4&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;image&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;syncthing/syncthing&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 5&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;container_name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;syncthing&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 6&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;hostname&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;my-syncthing&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 7&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;environment&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 8&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="l"&gt;PUID=1000&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 9&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="l"&gt;PGID=1000&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;10&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;volumes&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;11&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="l"&gt;/mnt/externalDisk/st-sync:/var/syncthing&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;12&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="l"&gt;/mnt/externalDisk/media:/media&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;13&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;ports&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;14&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="m"&gt;8384&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="m"&gt;8384&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="c"&gt;# Web UI&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;15&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="m"&gt;22000&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="m"&gt;22000&lt;/span&gt;&lt;span class="l"&gt;/tcp&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="c"&gt;# TCP file transfers&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;16&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="m"&gt;22000&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="m"&gt;22000&lt;/span&gt;&lt;span class="l"&gt;/udp&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="c"&gt;# QUIC file transfers&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;17&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="m"&gt;21027&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="m"&gt;21027&lt;/span&gt;&lt;span class="l"&gt;/udp&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="c"&gt;# Receive local discovery broadcasts&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;18&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;restart&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;unless-stopped&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Remember to customize the Docker Compose file according to your preferences, particularly adjusting the &lt;code&gt;PUID&lt;/code&gt; and &lt;code&gt;PGID&lt;/code&gt; to match the owner ID of your Syncthing volume. To install and run the container, use the following command:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-sh" data-lang="sh"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;1&lt;/span&gt;&lt;span class="cl"&gt;docker compose -f synthing-compose.yml up -d
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;After installation, you can access the Syncthing WebUI using the URL: &lt;code&gt;http://&amp;lt;IP_Of_Your_Server&amp;gt;:Synthing_Port&lt;/code&gt;.&lt;/p&gt;
&lt;h2 id="configuration-and-sychronization"&gt;Configuration and Sychronization&lt;/h2&gt;
&lt;p&gt;For security, it&amp;rsquo;s essential to set a password for the WebUI. Navigate to &lt;code&gt;Actions -&amp;gt; Settings -&amp;gt; GUI&lt;/code&gt; and configure the GUI Authentication User and GUI Authentication Password fields.&lt;/p&gt;
&lt;h3 id="synchronize-phone-with-server"&gt;Synchronize Phone with Server&lt;/h3&gt;
&lt;p&gt;To synchronize a folder between your server and phone, install the &lt;a href="https://play.google.com/store/apps/details?id=com.nutomic.syncthingandroid&amp;amp;hl=en&amp;amp;gl=US"&gt;official Syncthing app&lt;/a&gt;. Add your phone as a remote device on the server by clicking the &lt;code&gt;add remote Device&lt;/code&gt; button.&lt;/p&gt;


&lt;figure&gt;
 &lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width:70%" src="https://monkemanx.github.io/attachments/c1e52179d9d2652b71b31f7404ec3a38.png"&gt;
&lt;/figure&gt;


&lt;p&gt;Insert your phone&amp;rsquo;s device ID in the provided field (find it in the Syncthing app menu). Similarly, add your server as a device on your phone.&lt;/p&gt;


&lt;figure&gt;
 &lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width:50%" src="https://monkemanx.github.io/attachments/722eb6143ff5c4f1b86a8b0b92681d0f.png"&gt;
&lt;/figure&gt;


&lt;p&gt;You should also add your server as device to your phone, this works very similar to how you did it above.&lt;/p&gt;
&lt;p&gt;Create a synchronization target by pressing the &amp;ldquo;+&amp;rdquo; button, select the folder, and share it with your server.&lt;/p&gt;


&lt;figure&gt;
 &lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width:50%" src="https://monkemanx.github.io/attachments/38c70dd4cd4e4b8d37eaf3a806a9146b.png"&gt;
&lt;/figure&gt;


&lt;p&gt;A popup on the server&amp;rsquo;s Syncthing WebUI will appear, asking if you want to synchronize with the phone folder.&lt;/p&gt;


&lt;figure&gt;
 &lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width:80%" src="https://monkemanx.github.io/attachments/b5e2a589822c5893e97c286f000c501e.png"&gt;
 &lt;figcaption style="text-align:center"&gt;&lt;a href="https://futurehousestore.co.uk/what-is-home-assistant-and-what-it-can-do"&gt;Source&lt;/a&gt;&lt;/figcaption&gt;
&lt;/figure&gt;


&lt;p&gt;That&amp;rsquo;s it! Your phone pictures will now automatically upload to your server.&lt;/p&gt;
&lt;h3 id="synchronize-computer-with-server"&gt;Synchronize Computer with Server&lt;/h3&gt;
&lt;p&gt;If you want to synchronize your Computer with your Server, you first need to install the &lt;a href="https://syncthing.net/downloads/"&gt;synthing software&lt;/a&gt; on your computer.&lt;/p&gt;
&lt;p&gt;And after that, just like with the phone you need to add your computer as device to the server and vice versa.
Then you can again create a synchronization target.&lt;/p&gt;
&lt;h3 id="things-to-keep-in-mind"&gt;Things to keep in mind&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Synchronization Issues:&lt;/strong&gt; If you are sharing a folder among devices with different operating systems and disk formats, enable the &lt;code&gt;ignoring Permissions&lt;/code&gt; setting in the &lt;code&gt;Advanced&lt;/code&gt; settings section of your synchronization target.&lt;/li&gt;
&lt;/ul&gt;


&lt;figure&gt;
 &lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width:80%" src="https://monkemanx.github.io/attachments/8608b9ca84474054aad0baac8452da6a.png"&gt;
&lt;/figure&gt;


&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Battery Optimization on Phone:&lt;/strong&gt; Disable battery optimization for the Syncthing app on your phone to prevent interference and ensure continuous synchronization.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;For additional information, refer to the &lt;a href="https://docs.syncthing.net/"&gt;Syncthing documentation&lt;/a&gt;.&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;References:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://syncthing.net/"&gt;https://syncthing.net/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.syncthing"&gt;https://docs.syncthing&lt;/a&gt; .net/&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>My Homelab Part 5: HomeAssistant with Zigbee2MQTT</title><link>https://monkemanx.github.io/articles/my_homelab_part_5_homeassistant_with_zigbee2mqtt/</link><pubDate>Fri, 19 Jan 2024 11:34:15 +0000</pubDate><author>monkeman@cock.li (MonkeMan)</author><guid>https://monkemanx.github.io/articles/my_homelab_part_5_homeassistant_with_zigbee2mqtt/</guid><description>&lt;p&gt;As I hinted in my initial post of this series, &amp;ldquo;My Homelab Part 0: Prologue,&amp;rdquo; my motivation for incorporating Home Assistant into my server revolves around dynamically scheduling the lights in my room. This functionality enables me to wake up gradually with softly illuminated surroundings and help me fall asleep with lights that gradually fade away. However, Home Assistant&amp;rsquo;s capabilities extend beyond light control.&lt;/p&gt;
&lt;p&gt;Home Assistant is a free and open-source software designed for home automation. Functioning as the central control system for smart homes, it can be accessed either through an &lt;a href="https://github.com/home-assistant/android/releases"&gt;android app&lt;/a&gt; or a web-based interface.&lt;/p&gt;


&lt;figure&gt;
 &lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width:80%" src="https://monkemanx.github.io/attachments/9178large.webp"&gt;
 &lt;figcaption style="text-align:center"&gt;&lt;a href="https://futurehousestore.co.uk/what-is-home-assistant-and-what-it-can-do"&gt;Source&lt;/a&gt;&lt;/figcaption&gt;
&lt;/figure&gt;


&lt;p&gt;Smart homes integrate IoT devices, allowing them to connect to a central hub and exchange data. Examples of these devices include:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Smart bulbs&lt;/li&gt;
&lt;li&gt;Sensors (e.g., smoke detectors, power detectors, air quality measure&amp;rsquo;s)&lt;/li&gt;
&lt;li&gt;Smart buttons and switches&lt;/li&gt;
&lt;li&gt;Home appliances (e.g., fridge, freezer, microwave, washing machine)&lt;/li&gt;
&lt;li&gt;Home thermostat&lt;/li&gt;
&lt;li&gt;Home energy monitors&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;These devices can be seamlessly connected to Home Assistant using various protocols such as Bluetooth, &lt;a href="https://en.wikipedia.org/wiki/Zigbee"&gt;Zigbee&lt;/a&gt;, and Z-Wave.&lt;/p&gt;
&lt;p&gt;However, not all smart devices directly interface with Home Assistant. Many IoT devices require proprietary bridges for direct communication. A viable solution to this challenge is &lt;a href="https://www.zigbee2mqtt.io/"&gt;Zigbee2MQTT&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Zigbee2MQTT is a free and open-source software that enables the utilization of Zigbee devices without the need for the vendor&amp;rsquo;s bridge or gateway. It accomplishes this by bridging events and empowering you to control Zigbee devices via &lt;a href="https://en.wikipedia.org/wiki/MQTT"&gt;MQTT&lt;/a&gt;.&lt;/p&gt;


&lt;figure&gt;
 &lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width:40%" src="https://monkemanx.github.io/attachments/Screenshot%20from%202024-01-24%2011-54-22.png"&gt;
&lt;/figure&gt;


&lt;h2 id="hardware-requirements"&gt;Hardware Requirements&lt;/h2&gt;
&lt;p&gt;To connect my IoT devices to Home Assistant using the Zigbee protocol, I require an antenna capable of sending and receiving signals using this specific protocol. A comprehensive list of supported antennas can be found &lt;a href="https://www.zigbee2mqtt.io/guide/adapters/#recommended"&gt;here&lt;/a&gt;.
After some consideration, I opted for the &amp;ldquo;ITead Sonoff Zigbee 3.0 USB Dongle Plus V2 model ZBDongle-E&amp;rdquo; adapter due to its affordability and local availability.&lt;/p&gt;


&lt;figure&gt;
 &lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width:30%" src="https://monkemanx.github.io/attachments/4a2395f10d5e3745d06864cd0c0d3319.png"&gt;
 &lt;figcaption style="text-align:center"&gt;The Sonoff Zigbee 3.0 USB Dongle Plus.&lt;/figcaption&gt;
&lt;/figure&gt;


&lt;p&gt;Additionally, it is &lt;a href="https://www.zigbee2mqtt.io/advanced/zigbee/02_improve_network_range_and_stability.html"&gt;recommended&lt;/a&gt; to use an extension cable (approximately 50cm in length) between the Zigbee adapter and the server, rather than directly connecting the adapter to the server. This precaution is taken to mitigate &lt;a href="(https://www.unit3compliance.co.uk/2-4ghz-intra-system-or-self-platform-interference-demonstration/)"&gt;potential interference&lt;/a&gt; from the electronics on the server that could affect the radio signals transmitted by the antenna. It&amp;rsquo;s crucial to ensure that the USB extension cable is shielded to maintain optimal performance.&lt;/p&gt;
&lt;h2 id="installing-home-assistant-and-zigbee2mqtt"&gt;Installing Home Assistant and Zigbee2MQTT&lt;/h2&gt;
&lt;p&gt;For the installation of Home Assistant and Zigbee2MQTT, I employ Docker Compose for both services. Below are the respective compose files for Home Assistant and Zigbee2MQTT:&lt;/p&gt;
&lt;p&gt;Home Assistant Compose File (HomeAssistant-compose.yml):&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-yml" data-lang="yml"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 1&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="nt"&gt;version&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;3&amp;#39;&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 2&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="nt"&gt;services&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 3&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;homeassistant&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 4&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;container_name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;homeassistant&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 5&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;image&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;ghcr.io/home-assistant/home-assistant:stable&amp;#34;&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 6&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;volumes&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 7&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="l"&gt;/root/HomeAssistant/:/config&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 8&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="l"&gt;/etc/localtime:/etc/localtime:ro&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 9&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="l"&gt;/run/dbus:/run/dbus:ro&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;10&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;restart&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;unless-stopped&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;11&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;privileged&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;12&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;network_mode&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;host&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Zigbee2MQTT Compose File (Zigbee2MQTT-compose.yml):&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-yml" data-lang="yml"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 1&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="nt"&gt;version&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;3.8&amp;#39;&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 2&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="nt"&gt;services&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 3&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;mqtt&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 4&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;image&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;eclipse-mosquitto:2.0&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 5&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;restart&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;unless-stopped&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 6&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;volumes&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 7&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="s2"&gt;&amp;#34;/root/MQTT/mosquitto-data:/mosquitto&amp;#34;&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 8&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;ports&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 9&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="s2"&gt;&amp;#34;1883:1883&amp;#34;&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;10&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="s2"&gt;&amp;#34;9001:9001&amp;#34;&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;11&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;command&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;mosquitto -c /mosquitto-no-auth.conf&amp;#34;&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;12&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;13&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;zigbee2mqtt&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;14&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;container_name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;zigbee2mqtt&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;15&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;restart&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;unless-stopped&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;16&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;image&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;koenkk/zigbee2mqtt&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;17&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;volumes&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;18&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="l"&gt;/root/MQTT/zigbee2mqtt-data:/app/data&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;19&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="l"&gt;/root/MQTT/run/udev:/run/udev:ro&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;20&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;ports&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;21&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="m"&gt;8888&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="m"&gt;8080&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;22&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;environment&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;23&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="l"&gt;TZ=Europe/Berlin&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;24&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;devices&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;25&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="l"&gt;/dev/ttyACM0:/dev/ttyACM0&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Ensure that you customize the compose files according to your preferences, adjusting parameters such as timezone (&lt;code&gt;TZ&lt;/code&gt;), ports, or volumes.&lt;/p&gt;
&lt;p&gt;One critical aspect to check is the &lt;code&gt;device&lt;/code&gt; variable in the Zigbee2MQTT compose file. After connecting your adapter to the server, the device name might differ, and you need to identify it. You can achieve this by running the following command on your server:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-sh" data-lang="sh"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;1&lt;/span&gt;&lt;span class="cl"&gt;dmesg
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This will list all mounted devices on your server, scroll through the list to locate your USB adapter.&lt;/p&gt;
&lt;p&gt;Once customized, install and run Home Assistant with the following command:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-sh" data-lang="sh"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;1&lt;/span&gt;&lt;span class="cl"&gt;docker compose -f HomeAssistant-compose.yml up -d
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;You should find the service at the following URL: &lt;code&gt;http://Server_IP:Service_Port_Number&lt;/code&gt; after creating an account.&lt;/p&gt;
&lt;p&gt;After you have create an account your portal should look similar(without the lights and automation&amp;rsquo;s) to this:&lt;/p&gt;


&lt;figure&gt;
 &lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width:80%" src="https://monkemanx.github.io/attachments/Screenshot%20from%202024-01-24%2012-19-31.png"&gt;
&lt;/figure&gt;


&lt;p&gt;We now need to install Zigbee2MQTT, for that create your data folder at the position specified in your compose file, navigate inside it, and download the configuration file:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-sh" data-lang="sh"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;1&lt;/span&gt;&lt;span class="cl"&gt;mkdir zigbee2mqtt-data
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;2&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="nb"&gt;cd&lt;/span&gt; zigbee2mqtt-data
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;3&lt;/span&gt;&lt;span class="cl"&gt;wget https://raw.githubusercontent.com/Koenkk/zigbee2mqtt/master/data/configuration.yaml
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Edit the configuration file using a text editor of your choice, for example, &lt;code&gt;nano&lt;/code&gt; (as explained in &amp;ldquo;My Homelab Part 2: DietPi&amp;rdquo;).&lt;/p&gt;
&lt;p&gt;Configure the configuration.yaml file based on the guidelines provided in &lt;a href="https://www.zigbee2mqtt.io/guide/installation/01_linux.html#configuring"&gt;the official guide&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;For instance, if using the Sonoff Zigbee 3.0 USB Dongle Plus, adjust the following settings:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-yml" data-lang="yml"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;1&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="nt"&gt;serial&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;2&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;adapter&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;ezsp&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Correct the port name based on the information obtained earlier, and set &lt;code&gt;homeassistant&lt;/code&gt; to &lt;code&gt;true&lt;/code&gt;. Initially, set &lt;code&gt;permit_join&lt;/code&gt; to &lt;code&gt;true&lt;/code&gt; for device pairing and later consider changing it to &lt;code&gt;false&lt;/code&gt; to prevent unwanted device connections.&lt;/p&gt;
&lt;p&gt;After configuring, install and run the Zigbee2MQTT service:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-sh" data-lang="sh"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;1&lt;/span&gt;&lt;span class="cl"&gt;docker compose -f Zigbee2MQTT-compose.yml up -d
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The web interface should resemble the following (without devices):&lt;/p&gt;


&lt;figure&gt;
 &lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width:80%" src="https://monkemanx.github.io/attachments/Screenshot%20from%202024-01-24%2012-32-44.png"&gt;
&lt;/figure&gt;


&lt;p&gt;To display Zigbee2MQTT devices in Home Assistant, enable the MQTT integration by navigating to &lt;code&gt;Settings -&amp;gt; Devices &amp;amp; Services -&amp;gt; Add Integration -&amp;gt; MQTT&lt;/code&gt;.
If no password is set for MQTT and the same port is used, the configuration should look like this:&lt;/p&gt;


&lt;figure&gt;
 &lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width:50%" src="https://monkemanx.github.io/attachments/Screenshot%20from%202024-01-24%2012-35-55.png"&gt;
&lt;/figure&gt;


&lt;p&gt;Following these steps, you should be able to see all your Zigbee2MQTT devices integrated into Home Assistant.&lt;/p&gt;
&lt;h2 id="automations-in-home-assistant"&gt;Automation&amp;rsquo;s in Home Assistant&lt;/h2&gt;
&lt;p&gt;Congratulations on successfully installing Home Assistant and Zigbee2MQTT, enabling you to control your smart devices. However, the true power of Home Assistant lies in its Automation capabilities, allowing you to define schedules and sequences of actions tailored to your preferences.&lt;/p&gt;
&lt;p&gt;For instance, you can create automations to turn off the lights when you leave your house or raise window shutters in the morning – the possibilities are virtually limitless.&lt;/p&gt;
&lt;h3 id="creating-an-automation"&gt;Creating an Automation&lt;/h3&gt;
&lt;p&gt;Let&amp;rsquo;s explore an example of a simple automation that turns on lights in the morning and off at night. To begin, navigate to &lt;code&gt;Settings -&amp;gt; Automations &amp;amp; Scenes -&amp;gt; Automations -&amp;gt; Create Automations&lt;/code&gt; within the web interface.&lt;/p&gt;
&lt;p&gt;You have the option to create automations using nodes in the web interface or by defining them in YAML. You can switch between these modes by clicking the icon in the top right corner.&lt;/p&gt;


&lt;figure&gt;
 &lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width:80%" src="https://monkemanx.github.io/attachments/Screenshot%20from%202024-01-24%2012-43-10.png"&gt;
&lt;/figure&gt;


&lt;p&gt;The first thing you asked it to select a &lt;code&gt;trigger&lt;/code&gt;, a trigger defines when you automation should be executed this could be something as simple as a certain time or something much more complex.
Next up is a &lt;code&gt;condition&lt;/code&gt;, this is a limitation on the trigger if the condition is not met the automation will not execute, you do not need to use a condition.
The last thing is a &lt;code&gt;action&lt;/code&gt;, this defines what should happen after the trigger is triggered and the condition is met.&lt;/p&gt;
&lt;p&gt;Here&amp;rsquo;s an example automation that gradually turns on lights in the morning:
&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Click here to show it&lt;/summary&gt;
 
 &lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-yml" data-lang="yml"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 1&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="nt"&gt;alias&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;Turn Lights On, Morning, Weekdays&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 2&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="nt"&gt;description&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;Turns the light on in the morning on weekdays to wake up&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 3&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="nt"&gt;trigger&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 4&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="nt"&gt;platform&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;time&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 5&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;at&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;06:00:00&amp;#34;&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 6&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="nt"&gt;condition&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 7&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="nt"&gt;condition&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;and&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 8&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;conditions&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 9&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="nt"&gt;condition&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;time&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;10&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;weekday&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;11&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="l"&gt;mon&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;12&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="l"&gt;tue&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;13&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="l"&gt;wed&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;14&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="l"&gt;thu&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;15&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="l"&gt;fri&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;16&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="nt"&gt;action&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;17&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="nt"&gt;service&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;light.turn_on&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;18&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;data&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;19&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;transition&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="m"&gt;900&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;20&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;target&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;21&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;area_id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;bedroom&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;22&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="nt"&gt;wait_for_trigger&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;23&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="nt"&gt;platform&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;sun&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;24&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;event&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;sunrise&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;25&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;offset&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;+90&amp;#34;&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;26&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;continue_on_timeout&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;27&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="nt"&gt;service&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;light.turn_off&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;28&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;target&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;29&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;area_id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;bedroom&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;30&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;data&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;31&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;transition&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="m"&gt;10&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;32&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="nt"&gt;mode&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;single&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
 
&lt;/details&gt;

&lt;/p&gt;
&lt;p&gt;This automation triggers on weekdays at 6 a.m. with a gradual transition of lights over 900 seconds. After that, the lights turn off 90 minutes after sunrise.&lt;/p&gt;
&lt;h3 id="device-grouping"&gt;Device Grouping&lt;/h3&gt;
&lt;p&gt;You might have noticed the &lt;code&gt;area_id: bedroom&lt;/code&gt; in the automation. This allows targeting all devices in the bedroom. To use this feature, create an area by navigating to &lt;code&gt;Settings -&amp;gt; Area &amp;amp; Zones -&amp;gt; Create Area&lt;/code&gt;. You can assign devices to the area under &lt;code&gt;Settings -&amp;gt; Devices &amp;amp; Services -&amp;gt; MQTT -&amp;gt; Devices&lt;/code&gt;, after which you press on the device you want to assign to the created area, then you press the edit button in the top right corner and select your newly created area.&lt;/p&gt;
&lt;figure&gt;
 &lt;img style="display: block; margin-left: auto; margin-right: auto; width:80%" src="https://monkemanx.github.io/attachments/52839f72156e311a777a462bfeee961e.png"&gt;
&lt;/figure&gt;
&lt;p&gt;For turning off lights at night, another automation is used:
&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Click here to show it&lt;/summary&gt;
 
 &lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-yml" data-lang="yml"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 1&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="nt"&gt;alias&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;Turn Lights Off, Evening, Weekdays&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 2&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="nt"&gt;description&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;Turns off the light in the evening on weekdays for sleeping time.&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 3&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="nt"&gt;trigger&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 4&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="nt"&gt;platform&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;time&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 5&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;at&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;21:15:00&amp;#34;&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 6&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="nt"&gt;condition&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 7&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="nt"&gt;condition&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;and&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 8&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;conditions&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 9&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="nt"&gt;condition&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;time&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;10&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;weekday&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;11&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="l"&gt;tue&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;12&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="l"&gt;wed&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;13&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="l"&gt;sun&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;14&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="l"&gt;mon&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;15&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="l"&gt;thu&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;16&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="nt"&gt;action&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;17&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="nt"&gt;service&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;light.turn_off&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;18&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;data&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;19&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;transition&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="m"&gt;900&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;20&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;target&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;21&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;device_id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;22&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="l"&gt;4b8a1917bea51bc1c693c47ca6e744fe&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;23&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="l"&gt;0f50cb3c050c4759a8b2956326f6009a&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;24&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="l"&gt;316804d86ed3d55b22f0749a0c35df43&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;25&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="nt"&gt;service&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;light.turn_on&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;26&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;target&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;27&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;entity_id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[]&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;28&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;device_id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;29&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="l"&gt;846e13ea6a7f1a66eeeb6ce0a2ca394c&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;30&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;area_id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[]&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;31&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;data&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;32&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;brightness_pct&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="m"&gt;50&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;33&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;transition&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="m"&gt;900&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;34&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="nt"&gt;delay&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;35&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;hours&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;36&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;minutes&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="m"&gt;30&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;37&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;seconds&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;38&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;milliseconds&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;39&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="nt"&gt;service&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;light.turn_off&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;40&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;target&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;41&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;device_id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;846e13ea6a7f1a66eeeb6ce0a2ca394c&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;42&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;data&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;43&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;transition&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="m"&gt;900&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;44&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="nt"&gt;mode&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;single&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
 
&lt;/details&gt;

&lt;/p&gt;
&lt;p&gt;This automation triggers at 21:15, gradually turning off all lights besides one, over 900 seconds and turning the last light to 50% brightness. After a 30-minute delay, the last light turns off.
If you want to use this automation make sure to change the &lt;code&gt;device_id&lt;/code&gt; to the id of your lights.&lt;/p&gt;
&lt;p&gt;Feel free to adapt these automations based on your devices and preferences. The flexibility of Home Assistant&amp;rsquo;s automation engine allows you to tailor it to your specific needs.&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;Resources:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.home-assistant.io/docs/"&gt;Home Assistant Documentation&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://en.wikipedia.org/wiki/Home_Assistant"&gt;Home Assistant Wikipedia&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>My Homelab Part 4: Wireguard VPN</title><link>https://monkemanx.github.io/articles/my_homelab_part_4_wireguard_vpn/</link><pubDate>Fri, 19 Jan 2024 11:31:55 +0000</pubDate><author>monkeman@cock.li (MonkeMan)</author><guid>https://monkemanx.github.io/articles/my_homelab_part_4_wireguard_vpn/</guid><description>&lt;p&gt;Sometimes I need access to my home server to work on some configuration files or check the health of the server, but not always do I have physical access to my home server. One way to still get access to my server even when I am far away is through a VPN, which allows me to connect to my home network, and from the home network, I can then SSH into my home server.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://www.wireguard.com/"&gt;Wireguard&lt;/a&gt; is a free, open-source, modern, and fast VPN service. The other big competitor to Wireguard that I want to mention for completion&amp;rsquo;s sake is &lt;a href="https://openvpn.net/"&gt;OpenVPN&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;To be more specific, I use &lt;a href="https://github.com/wg-easy/wg-easy"&gt;wg-easy&lt;/a&gt; for my server, which is one of the easiest ways to self-host a VPN server. Not only is wg-easy a VPN service, but it also allows you to manage your connection through a WebUI.&lt;/p&gt;


&lt;figure&gt;
 &lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width:80%" src="https://monkemanx.github.io/attachments/aed9491cae39af755a01815eb44b0c19.png"&gt;
&lt;/figure&gt;


&lt;h2 id="installation"&gt;Installation&lt;/h2&gt;
&lt;p&gt;Just like in my previous blog post with Calibre, I will use Docker Compose to install wg-easy with the following Docker Compose file:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-yml" data-lang="yml"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 1&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="nt"&gt;version&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;3.8&amp;#34;&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 2&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="nt"&gt;services&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 3&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;wg-easy&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 4&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;environment&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 5&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="c"&gt;# ⚠️ Required:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 6&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="c"&gt;# Change this to your host&amp;#39;s public address&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 7&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="l"&gt;WG_HOST=&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 8&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 9&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="c"&gt;# Optional:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;10&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="l"&gt;PASSWORD= &lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;11&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;image&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;weejewel/wg-easy&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;12&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;container_name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;wg-easy&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;13&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;volumes&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;14&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="l"&gt;/root/wg-easy:/etc/wireguard&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;15&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;ports&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;16&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="s2"&gt;&amp;#34;51820:51820/udp&amp;#34;&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;17&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="s2"&gt;&amp;#34;51821:51821/tcp&amp;#34;&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;18&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;restart&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;unless-stopped&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;19&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;cap_add&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;20&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="l"&gt;NET_ADMIN&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;21&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="l"&gt;SYS_MODULE&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;22&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;sysctls&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;23&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="l"&gt;net.ipv4.ip_forward=1&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;24&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="l"&gt;net.ipv4.conf.all.src_valid_mark=1&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The first thing you have to do is change the &lt;code&gt;WG_HOST&lt;/code&gt; variable to the IP-Address or domain of your server and set a &lt;code&gt;PASSWORD&lt;/code&gt; so that not everyone can access the Web UI. After that, you can start the Docker container with:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-sh" data-lang="sh"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;1&lt;/span&gt;&lt;span class="cl"&gt;docker compose -f wg-easy-compose.yml up -d
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;After some time, you should be able to access the website of wg-easy with the URL: &lt;code&gt;http://&amp;lt;Server_IP_Address&amp;gt;:51821&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;There are multiple clients available cross-platform to connect to your VPN Server, including an Android/iOS app and a Windows/Linux client. To download a client, you can visit their &lt;a href="https://www.wireguard.com/install/"&gt;Official Website&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;To establish a VPN connection with your server, you first need to add the connection on the client. You can do that by pressing the &lt;code&gt;new&lt;/code&gt; button on the wg-easy website.
&lt;img src="./attachments/2024-01-20_16-58.png" alt="2024-01-20_16-58.png"&gt;
After giving your connection a name, you can either download the config file and send it to your client device or scan the QR code.&lt;/p&gt;
&lt;p&gt;There are two additional things to keep in mind when trying to connect to your VPN Server:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;If the network from which you use the VPN has the same IP range as the network from your home server, Wireguard will get confused and won&amp;rsquo;t know where to send the internet traffic. You can fix this by using a more uncommon IP range for your home network.&lt;/li&gt;
&lt;li&gt;If you try to use the Windows Wireguard client, you might experience the issue that all the traffic gets directed towards you in a cycle, and you DoS yourself. This is a &lt;a href="https://github.com/WireGuard/wireguard-nt/blob/master/TODO.md"&gt;known issue&lt;/a&gt;(see &amp;ldquo;Forwarding/WeakHostSend breaks IP_PKTINFO&amp;rdquo;). You can disable it by:
&lt;ol&gt;
&lt;li&gt;Opening a powershell terminal&lt;/li&gt;
&lt;li&gt;To see the status of weakhostsend, type:
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-sh" data-lang="sh"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;1&lt;/span&gt;&lt;span class="cl"&gt;Get-NetIPInterface &lt;span class="p"&gt;|&lt;/span&gt; ft interfacealias,forwarding,weakhostsend
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;To disable it, use the following command:
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-sh" data-lang="sh"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;1&lt;/span&gt;&lt;span class="cl"&gt;netsh interface ipv4 &lt;span class="nb"&gt;set&lt;/span&gt; interface &lt;span class="s2"&gt;&amp;#34;Ethernet 2&amp;#34;&lt;/span&gt; &lt;span class="nv"&gt;weakhostreceive&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;disable
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;Do the same for the &lt;code&gt;forwarding&lt;/code&gt; variable.&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;hr&gt;
&lt;p&gt;References:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.wireguard.com/"&gt;https://www.wireguard.com/&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>My Homelab Part 3: Calibre</title><link>https://monkemanx.github.io/articles/my_homelab_part_3_calibre/</link><pubDate>Fri, 19 Jan 2024 11:30:23 +0000</pubDate><author>monkeman@cock.li (MonkeMan)</author><guid>https://monkemanx.github.io/articles/my_homelab_part_3_calibre/</guid><description>&lt;p&gt;In my free time, I enjoy reading books. For a long time, I organized the books I read on physical paper notes. However, as the list grew longer and paper deteriorated over time, I realized it was impractical. To address this, I decided to switch to a digital organization strategy, and for that, I chose the software Calibre.&lt;/p&gt;
&lt;p&gt;Calibre is a free and open-source e-book management program. It supports organizing existing e-books into virtual libraries, displaying and editing e-books, and even synchronizing them with different e-readers.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/janeczku/calibre-web"&gt;Calibre-Web&lt;/a&gt; is a web app for Calibre that allows access to Calibre via the internet.&lt;/p&gt;


&lt;figure&gt;
 &lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width:80%" src="https://monkemanx.github.io/attachments/ca92bc5421fc394fb5a55384fe696aea.png"&gt;
 &lt;figcaption style="text-align:center"&gt;"An exemplary view of the Calibre-Web software.&lt;/figcaption&gt;
&lt;/figure&gt;


&lt;p&gt;In this short blog post, I&amp;rsquo;ll guide you through the process of installing Calibre-Web.
If you are interested in how I set up my homeserver, you can read one of my previous blog posts.&lt;/p&gt;
&lt;h2 id="installation"&gt;Installation&lt;/h2&gt;
&lt;p&gt;For the installation of Calibre-Web, I used Docker, specifically Docker Compose. If you&amp;rsquo;re curious about why, you can check out my blog post &amp;ldquo;My Homelab Part 1: Introduction,&amp;rdquo; where I explain the advantages of docker.&lt;/p&gt;
&lt;p&gt;In Docker, to start a container, you typically use a long command with configurations as arguments. This approach can be confusing and hard to reproduce.&lt;/p&gt;


&lt;figure&gt;
 &lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width:80%" src="https://monkemanx.github.io/attachments/0d442bad34cd850c0ca7cba6f033393e.png"&gt;
 &lt;figcaption style="text-align:center"&gt;Example of a docker command to run a container.&lt;/figcaption&gt;
&lt;/figure&gt;


&lt;p&gt;A better option is Docker Compose, where all the configurations are placed in a &lt;code&gt;compose.yaml&lt;/code&gt; file, making it clearer and easier to reproduce.&lt;/p&gt;
&lt;p&gt;In general the docker compose file uses &lt;a href="https://en.wikipedia.org/wiki/YAML"&gt;YAML&lt;/a&gt; as a file format, which is a human readable data language.
The Compose files uses some predefined keys that can be used to configure how docker should behave, to read more &lt;a href="https://docs.docker.com/compose/"&gt;check this out&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The Docker Compose file for Calibre I used is as follows:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-yaml" data-lang="yaml"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 1&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="nn"&gt;---&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 2&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="nt"&gt;version&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;2.1&amp;#34;&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 3&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="nt"&gt;services&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 4&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;calibre-web&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 5&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;image&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;lscr.io/linuxserver/calibre-web:latest&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 6&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;container_name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;calibre-web&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 7&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;environment&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 8&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="l"&gt;PUID=1000&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 9&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="l"&gt;PGID=1000&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;10&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="l"&gt;TZ=Europe/Berlin&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;11&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;volumes&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;12&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="l"&gt;/root/calibre/config:/config&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;13&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="l"&gt;/mnt/externalDisk/calibre/libary:/books&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;14&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;ports&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;15&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="m"&gt;8083&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="m"&gt;8083&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;16&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;restart&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;unless-stopped&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This configuration file needs some explanation:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;image&lt;/code&gt; describes the container pulled from the internet i.e the software that you want to install. Images can be found on the &lt;a href="https://hub.docker.com/"&gt;docker hub website&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;environment&lt;/code&gt; specifies additional settings for the container. For instance:
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;TZ&lt;/code&gt; specifies the timezone for the software&lt;/li&gt;
&lt;li&gt;&lt;code&gt;PUID/PGID&lt;/code&gt; the id of the user and group under which the software will run.
&lt;ul&gt;
&lt;li&gt;to find out your &lt;code&gt;PUID/PGID&lt;/code&gt; you can run the following command for user id:
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-sh" data-lang="sh"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;1&lt;/span&gt;&lt;span class="cl"&gt;id -u username
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;and for group id:
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-sh" data-lang="sh"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;1&lt;/span&gt;&lt;span class="cl"&gt;id -g username
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;code&gt;volumes&lt;/code&gt; describe where data from the software is saved. The first path is the physical location on the computer, while the second is a virtual location inside the docker container, the paths are separated by &lt;code&gt;:&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;ports&lt;/code&gt; specify which ports are exposed to the docker container.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;restart&lt;/code&gt; instructs Docker on what to do if the container shuts down unexpectedly.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Normally, you will be able to find a list of keys that you can set for the given image by looking at the docker hub page or on the maintainers page.
For instance you can check out &lt;a href="https://docs.linuxserver.io/images/docker-calibre/#optional-run-configurations"&gt;linuxserver page on calibre&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;To install Calibre on your server, follow these steps:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;create a file titled &lt;code&gt;calibre-web-compose.yml&lt;/code&gt; and copy the content of the above into the YAML file.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Edit the file to suit your needs, you should especially change the volumes, timezone, and PUID/PGID. Ensure the PUID and PGID match the owner of the volumes.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Move the file to your server. Save it in your home directory, and use &lt;code&gt;scp&lt;/code&gt; to transfer it if needed.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Open a terminal at the file location and run::&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-sh" data-lang="sh"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;1&lt;/span&gt;&lt;span class="cl"&gt;docker compose -f calibre-web-compose.yml up -d
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This starts the container in the background:
The &lt;code&gt;-f&lt;/code&gt; specifies the file name of the compose file
&lt;code&gt;-d&lt;/code&gt; tells docker to start the container in the background without displaying the logs in the terminal.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;After installation, check the container status by running:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-sh" data-lang="sh"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;1&lt;/span&gt;&lt;span class="cl"&gt;docker ps -a
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Access Calibre-Web at &lt;code&gt;http://&amp;lt;IP_Of_Your_Server&amp;gt;:Calibre_Port&lt;/code&gt;, log in using the default credentials (Username: admin, Password: admin123).&lt;/p&gt;
&lt;p&gt;

 &lt;figure&gt;
 &lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width:80%" src="https://monkemanx.github.io/attachments/Screenshot%20from%202024-01-19%2017-59-03.png"&gt;
 &lt;/figure&gt;
 

Should the default login data have changed, you should be able to find them on the &lt;a href="https://docs.linuxserver.io/images/docker-calibre-web/#version-tags"&gt;image doc site&lt;/a&gt; of calibre.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;After login in you should get greeted by a window similar to the image below.&lt;/p&gt;


 &lt;figure&gt;
 &lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width:80%" src="https://monkemanx.github.io/attachments/Screenshot%20from%202024-01-19%2018-01-34.png"&gt;
 &lt;/figure&gt;
 

&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;In order to function properly Calibre-Web will need a virtual library, which is a databank that saves all the information about your books.
Unfortunately Calibre-Web, doesn&amp;rsquo;t let you create new libraries from scratch, instead it only works with already created existing libraries.
For that you can either:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Download Calibre on your computer create an empty library and export it or&lt;/li&gt;
&lt;li&gt;You can download an already created database, via the command:
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-sh" data-lang="sh"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;1&lt;/span&gt;&lt;span class="cl"&gt;weget sempervieo.de/metadata.db
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;If you do download this file make sure to make yourself the owner of the file and give you full permission on this file(see &amp;ldquo;My Homelab Part 2: DietPi&amp;rdquo;).&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;After you have downloaded or created the file move the file into your books volume, that you have defined in your &lt;code&gt;compose&lt;/code&gt; file. Following that, you should be able to select the books folder as database folder in the Calibre-Web application.&lt;/p&gt;
&lt;p&gt;The last thing you should do, is enabling uploads of books via Calibre-Web and change your password. To do that navigate to&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;Configuration -&amp;gt; Edit Basic Confguration -&amp;gt; Feature Configuration -&amp;gt; Enable Uploads&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;admin -&amp;gt; edit user&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="opds"&gt;OPDS&lt;/h2&gt;
&lt;p&gt;The Open Publication Distribution System (OPDS) is an electronic catalog format for electronic publications. OPDS can be used on the server to enable clients, such as e-readers or programs with ODPS support, to discover and download e-books.&lt;/p&gt;
&lt;p&gt;I use ODPS to download books to my e-reader (which uses Koreader software) or to my computer (which uses Calibre) whenever I want to read an e-book.&lt;/p&gt;
&lt;p&gt;To configure ODPS for Koreader:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Open the menu by tapping on the top of the screen&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Navigate to the magnifying glass.&lt;/p&gt;


 &lt;figure&gt;
 &lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width:60%" src="https://monkemanx.github.io/attachments/2024-01-20_11-54.png"&gt;
 &lt;/figure&gt;
 

&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Press the ODPD Catalog option, and press the + Button in the top left corner to add an ODPS Catalogue.&lt;/p&gt;


 &lt;figure&gt;
 &lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width:60%" src="https://monkemanx.github.io/attachments/2024-01-20_11-57.png"&gt;
 &lt;/figure&gt;
 

&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Choose a catalogue name; the catalogue URL should be: &lt;code&gt;http://&amp;lt;Server_IP&amp;gt;:Calibre_Port/opds&lt;/code&gt;. Enter the username and password defined in your Calibre-Web server.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;To connect to your OPDS catalogue, press the newly added catalogue.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;As a last piece of advice,&lt;a href="https://annas-archive.org/"&gt;Annas Archive&lt;/a&gt; has an enormous library of e-books available for free download. However, please keep in mind that supporting authors is crucial for them to continue producing their awesome works.&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;References:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/janeczku/calibre-web/wiki"&gt;https://github.com/janeczku/calibre-web/wiki&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.linuxserver.io/images/docker-calibre-web/#version-tags"&gt;https://docs.linuxserver.io/images/docker-calibre-web/#version-tags&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://en.wikipedia.org/wiki/Open_Publication_Distribution_System"&gt;https://en.wikipedia.org/wiki/Open_Publication_Distribution_System&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://youtu.be/bucvyiwsnMc?si=SDn_PfIWOIXNgMoV"&gt;Calibre Web: Ebook Verwaltung leicht gemacht&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>My Homelab Part 2: DietPi</title><link>https://monkemanx.github.io/articles/my_homelab_part_2_dietpi/</link><pubDate>Fri, 19 Jan 2024 11:30:08 +0000</pubDate><author>monkeman@cock.li (MonkeMan)</author><guid>https://monkemanx.github.io/articles/my_homelab_part_2_dietpi/</guid><description>&lt;p&gt;Like mentioned in my last blog post in the &amp;ldquo;Homelab&amp;rdquo; series, I choose DietPi as operating system for my server.
In this post I want to give a short overview on the installation process and other miscellaneous aspects related to it.&lt;/p&gt;
&lt;h2 id="installation"&gt;Installation&lt;/h2&gt;
&lt;p&gt;Installation Guide&lt;/p&gt;
&lt;p&gt;The installation process for DietPi may vary slightly from one computer to another, but the steps outlined below should be applicable to most setups. This guide is specifically tailored for Raspberry Pi, but it can be adapted for other systems.&lt;/p&gt;
&lt;style&gt;
 .warning {
 background-color: #ffe4e1; 
 padding: 15px; 
 border-radius: 5px; 
 margin-bottom: 15px; 
 }

 .warning-title {
 font-size: 20px; 
 margin-bottom: 10px; 
 color: #8b0000; 
 font-weight: bold; 
 }
&lt;/style&gt;

&lt;div class="warning"&gt;
 &lt;div class="warning-title"&gt;Warning&lt;/div&gt;
 &lt;p&gt;Ensure that your server computer is connected to the internet via Ethernet before proceeding.&lt;/p&gt;
&lt;/div&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Download DietPi:&lt;/strong&gt;&lt;br&gt;
Visit the &lt;a href="https://dietpi.com/#downloadinfo"&gt;official website&lt;/a&gt; and download the DietPi image for your hardware.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Create Bootable Media:&lt;/strong&gt;&lt;br&gt;
Use &lt;a href="https://github.com/pop-os/popsicle"&gt;popsicle&lt;/a&gt; on Linux or &lt;a href="https://rufus.ie/en/"&gt;rufus&lt;/a&gt; for windows to flash the image onto a USB stick or on a SD card when installing on a Raspberry Pi.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Insert Bootable Media:&lt;/strong&gt;&lt;br&gt;
Insert the flashed SD card or USB stick into your server computer.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Boot Your Server Computer:&lt;/strong&gt;&lt;br&gt;
For Raspberry Pi, simply wait for it to fully start.
For other computers, access the BIOS by pressing keys like &amp;ldquo;F1, F2, F10, F12, DEL, ESC&amp;rdquo; during startup.
In the BIOS, locate the &amp;ldquo;Boot&amp;rdquo; option and select your USB stick as the first boot option.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;


&lt;figure&gt;
 &lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width:80%" src="https://monkemanx.github.io/attachments/7c7cc39ad53f15d60dd0ceed04c95322.png"&gt;
 &lt;figcaption style="text-align:center"&gt;"Example of an MSI BIOS/UEFI, with the boot loader option marked.&lt;/figcaption&gt;
&lt;/figure&gt;


&lt;ol start="5"&gt;
&lt;li&gt;&lt;strong&gt;Configure DietPi via Network:&lt;/strong&gt;&lt;br&gt;
Since DietPi is a headless operating system, configure it via the network using SSH.
Open a terminal and type ssh root@DietPi (replace &amp;ldquo;root&amp;rdquo; with your username and &amp;ldquo;DietPi&amp;rdquo; with the Hostname of your server if it differs).
If SSH doesn&amp;rsquo;t work, use the IP address of your server computer instead (you can find it on your router&amp;rsquo;s website).&lt;/li&gt;
&lt;/ol&gt;


&lt;figure&gt;
 &lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width:80%" src="https://monkemanx.github.io/attachments/2b6a04bcb492405f041c6cacf6deb07b.png"&gt;
 &lt;figcaption style="text-align:center"&gt;"Example of my Rasperry device appearing on my rotuers website with the IP-Address 192.168.12.100&lt;/figcaption&gt;
&lt;/figure&gt;


&lt;p&gt;Enter the password when prompted (default is dietpi).&lt;/p&gt;
&lt;style&gt;
 .info {
 background-color: #e6f7ff; 
 padding: 15px; 
 border-radius: 5px; 
 margin-bottom: 15px; 
 }

 .info-title {
 font-size: 20px; 
 margin-bottom: 10px; 
 color: #000080; 
 font-weight: bold; 
 }
&lt;/style&gt;

&lt;div class="info"&gt;
 &lt;div class="info-title"&gt;Info&lt;/div&gt;
 &lt;p&gt;SSH(Secure Shell Protocol) is a network protocol for accessing services and computer over an unsecured network.&lt;/p&gt;
&lt;/div&gt;

&lt;ol start="6"&gt;
&lt;li&gt;&lt;strong&gt;Installation Process:&lt;/strong&gt;&lt;br&gt;
After connecting successfully, a series of installation processes will run in the terminal.&lt;/li&gt;
&lt;/ol&gt;


&lt;figure&gt;
 &lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width:80%" src="https://monkemanx.github.io/attachments/Screenshot%20from%202024-01-19%2013-17-34.png"&gt;
&lt;/figure&gt;


&lt;p&gt;You may be asked about enabling the &amp;ldquo;DietPi Survey,&amp;rdquo; password change, and &amp;ldquo;serial/UART&amp;rdquo; settings. Follow the recommended options.&lt;/p&gt;
&lt;ol start="7"&gt;
&lt;li&gt;&lt;strong&gt;Post-Installation Configuration:&lt;/strong&gt;&lt;br&gt;
After installation, you&amp;rsquo;ll be in the configuration window.&lt;/li&gt;
&lt;/ol&gt;


&lt;figure&gt;
 &lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width:80%" src="https://monkemanx.github.io/attachments/Screenshot%20from%202024-01-19%2013-22-40.png"&gt;
&lt;/figure&gt;


&lt;p&gt;If you do not see this window you can type &lt;code&gt;dietpi-software&lt;/code&gt; to enter it. Interesting settings are:
If you want to use &lt;code&gt;scp&lt;/code&gt; to transfer files to your server, you need to change the SSH Server to OpenSSH.
Install Docker and Docker Compose if not already installed.&lt;/p&gt;
&lt;ol start="8"&gt;
&lt;li&gt;&lt;strong&gt;Exit:&lt;/strong&gt;&lt;br&gt;
After configuring, exit the interface to see a screen similar to the one below in your terminal.&lt;/li&gt;
&lt;/ol&gt;


&lt;figure&gt;
 &lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width:80%" src="https://monkemanx.github.io/attachments/Screenshot%20from%202024-01-19%2013-32-29.png"&gt;
 &lt;figcaption style="text-align:center"&gt;Source:&lt;a&gt;https://github.com/adityatelange/hugo-PaperMod&lt;/a&gt;&lt;/figcaption&gt;
&lt;/figure&gt;


&lt;p&gt;Congratulations! You have successfully installed DietPi headlessly on your server computer.
If you want to exit your ssh session you can press &lt;code&gt;strg + d&lt;/code&gt;.&lt;/p&gt;
&lt;h2 id="useful-linux-commands"&gt;Useful Linux Commands&lt;/h2&gt;
&lt;p&gt;In general If you are not sure on how a Linux command works exactly, I would recommend looking into the &lt;a href="https://man7.org/linux/man-pages/index.html"&gt;man pages&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Here are some essential Linux commands that can help you perform various task&amp;rsquo;s on your system, these are especially important when maintaining your server via ssh:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;If you type &lt;code&gt;ls&lt;/code&gt; you will see all the files in the current working directory. If you type &lt;code&gt;ls -l&lt;/code&gt; you will in addition see the permissions and the owner of the files.&lt;/li&gt;
&lt;/ul&gt;


&lt;figure&gt;
 &lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width:60%" src="https://monkemanx.github.io/attachments/Screenshot%20from%202024-01-19%2013-36-57.png"&gt;
&lt;/figure&gt;


&lt;ul&gt;
&lt;li&gt;To change the current working direction you can use the command &lt;code&gt;cd path/to/which/you/want/to/go&lt;/code&gt;. If you enter &lt;code&gt;cd ..&lt;/code&gt; you will move to the parent folder.&lt;/li&gt;
&lt;li&gt;If you want to change the permission of a file you can use the command &lt;code&gt;chmod permission file_name&lt;/code&gt;, options for permission are:
&lt;ul&gt;
&lt;li&gt;&amp;ldquo;r&amp;rdquo; which stands for read&lt;/li&gt;
&lt;li&gt;&amp;ldquo;w&amp;rdquo; which stands for write&lt;/li&gt;
&lt;li&gt;&amp;ldquo;x&amp;rdquo; which stands for executable.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;To change the owner of a file you can use the command &lt;code&gt;chown user_name file_name&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;To see the current working directory you can type &lt;code&gt;pwd&lt;/code&gt;:&lt;/li&gt;
&lt;/ul&gt;


&lt;figure&gt;
 &lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width:30%" src="https://monkemanx.github.io/attachments/Screenshot%20from%202024-01-19%2013-40-13.png"&gt;
&lt;/figure&gt;


&lt;ul&gt;
&lt;li&gt;To edit/read/create files you can use the command &lt;code&gt;nano file_name&lt;/code&gt;:&lt;/li&gt;
&lt;/ul&gt;


&lt;figure&gt;
 &lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width:80%" src="https://monkemanx.github.io/attachments/Screenshot%20from%202024-01-19%2013-42-29.png"&gt;
&lt;/figure&gt;


&lt;p&gt;To save you written content you can press &lt;code&gt;ctrl + o&lt;/code&gt; and then &lt;code&gt;enter&lt;/code&gt;, to exit &lt;code&gt;nano&lt;/code&gt; you can press &lt;code&gt;ctrl + x&lt;/code&gt;.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;If you want to sent a file from your computer to the server computer you can use the following command:
&lt;code&gt;scp /path/to/file/file_name root@dietpi:/path/saving/location&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Other useful commands are:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;sudo&lt;/code&gt; to get admin privileges.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;rm file_name&lt;/code&gt; to delete a file.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;mv file_name path/to/location&lt;/code&gt; to move a file or directory.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;cp file_name path/to/location&lt;/code&gt; to copy a file or directory.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;mkdir direcory_name&lt;/code&gt; to create a directory.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;./file_name&lt;/code&gt; to execute a executable file.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;htop&lt;/code&gt; to see the current resource consumption by process.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;wget https://url&lt;/code&gt; to download a file from the internet.&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;p&gt;References:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://dietpi.com/docs"&gt;https://dietpi.com/docs&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>My Homelab Part 1: Introduction</title><link>https://monkemanx.github.io/articles/my_homelab_part_1_introduction/</link><pubDate>Tue, 26 Dec 2023 15:17:38 +0000</pubDate><author>monkeman@cock.li (MonkeMan)</author><guid>https://monkemanx.github.io/articles/my_homelab_part_1_introduction/</guid><description>&lt;p&gt;In my previous blog post in the Homelab Series, I shared how the need to maintain a regular sleep schedule led me to the idea of running my own server at home, which I affectionately call my &amp;ldquo;homelab.&amp;rdquo; The primary purpose of this homelab is to control the smart lights in my room through Home Assistant.&lt;/p&gt;
&lt;p&gt;In this post, I want to provide an overview about the different technologies I employed for running my Homelab.&lt;/p&gt;
&lt;h2 id="hardware"&gt;Hardware&lt;/h2&gt;
&lt;p&gt;The first thing I needed for my Homelab was the Hardware, specifically a device to host services such as Home Assistant. I considered multiple options, including:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://projects.raspberrypi.org/en/"&gt;Raspberry Pi&lt;/a&gt;,&lt;/li&gt;
&lt;li&gt;ThinkCentre,&lt;/li&gt;
&lt;li&gt;Old Laptop,&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="thinkcentre"&gt;ThinkCentre&lt;/h3&gt;
&lt;p&gt;ThinkCentre is a line of business-oriented desktop computers developed by IBM and later Lenovo.&lt;/p&gt;
&lt;p&gt;ThinkCentre is a line of business-oriented desktop computers developed by IBM and later Lenovo. The reasons I considered ThinkCentre are threefold. Firstly, ThinkCentre has a compact form factor, making them easy to fit into a corner of the room. Secondly, they are cost-effective (often under 100 bucks) when purchased from marketplaces like eBay, as businesses frequently replace and sell off used units. Lastly, due to their age, they are well supported by FOSS software&lt;/p&gt;


&lt;figure&gt;
 &lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width:50%" src="https://monkemanx.github.io/attachments/d75367962fae83752347d1484ae650d4.png"&gt;
 &lt;figcaption style="text-align:center"&gt;Source:An ThinkCentre M910 tiny"&lt;/figcaption&gt;
&lt;/figure&gt;


&lt;h3 id="old-laptop"&gt;Old Laptop&lt;/h3&gt;
&lt;p&gt;I also thought about repurposing an old laptop (approximately 10 years old) as a server, that I had lying around.
But ultimately decided against it because of the higher power usage and the risk of the battery catching fire.&lt;/p&gt;
&lt;p&gt;If you decide to go this round, I would recommend configuring the laptop to not sleep when the lid is closed.
If you use a Linux based system which uses systemd you can do this by following these steps:
&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Disable Sleep mode on systemd devices&lt;/summary&gt;
 
 &lt;ol&gt;
&lt;li&gt;&lt;code&gt;sudo nano /etc/systemd/logind.conf&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Change: &lt;code&gt;#HandleLidSwitch=suspend #HandleLidSwitchExternalPower=suspend&lt;/code&gt; to &lt;code&gt;HandleLidSwitch=ignore HandleLidSwitchExternalPower=ignore&lt;/code&gt;&lt;/li&gt;
&lt;/ol&gt;

 
&lt;/details&gt;

&lt;/p&gt;
&lt;style&gt;
 .info {
 background-color: #e6f7ff; 
 padding: 15px; 
 border-radius: 5px; 
 margin-bottom: 15px; 
 }

 .info-title {
 font-size: 20px; 
 margin-bottom: 10px; 
 color: #000080; 
 font-weight: bold; 
 }
&lt;/style&gt;

&lt;div class="info"&gt;
 &lt;div class="info-title"&gt;Info&lt;/div&gt;
 &lt;p&gt;Another aspect to bear in mind, when using a laptop as server, is managing power consumption, especially if the operating system is installed with a desktop environment. Turning off the screen can help save power.&lt;/p&gt;
&lt;/div&gt;

&lt;h3 id="rasperry-pi"&gt;Rasperry Pi&lt;/h3&gt;
&lt;p&gt;The Raspberry Pi is a mini-computer that utilizes a single-board, incorporating all necessary electronic components onto a single board. It has the advantages of &lt;a href="https://picockpit.com/raspberry-pi/how-much-does-power-usage-cost-for-the-pi-4/"&gt;low power consumption&lt;/a&gt;), affordability, and being entirely open-source.&lt;/p&gt;
&lt;style&gt;
 .info {
 background-color: #e6f7ff; 
 padding: 15px; 
 border-radius: 5px; 
 margin-bottom: 15px; 
 }

 .info-title {
 font-size: 20px; 
 margin-bottom: 10px; 
 color: #000080; 
 font-weight: bold; 
 }
&lt;/style&gt;

&lt;div class="info"&gt;
 &lt;div class="info-title"&gt;Info&lt;/div&gt;
 &lt;p&gt;Keep in mind that the Raspberry Pi uses a CPU based on ARM architecture, and not all software is compiled for ARM.&lt;/p&gt;
&lt;/div&gt;

&lt;p&gt;In my case, as I had a Raspberry Pi 3 B lying around, I opted to use it as my server.&lt;/p&gt;


&lt;figure&gt;
 &lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width:50%" src="https://monkemanx.github.io/attachments/8504911ef60b57259099581ac08b7a5c.png"&gt;
 &lt;figcaption style="text-align:center"&gt;An Rasperry Pi 2&lt;/figcaption&gt;
&lt;/figure&gt;


&lt;h2 id="operating-system"&gt;Operating System&lt;/h2&gt;
&lt;p&gt;Choosing the right operating system for the server is crucial. Options include Ubuntu Server, headless Debian, or Raspbian for the Raspberry Pi.
I decided to use &lt;a href="https://dietpi.com/"&gt;dietpi&lt;/a&gt;, a minimal headless operating system that aims to reduce resource consumption by installing only the most essential services.&lt;/p&gt;
&lt;p&gt;Here&amp;rsquo;s a resource consumption comparison between dietpi and Raspberry Pi OS:&lt;/p&gt;


&lt;figure&gt;
 &lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width:90%" src="https://monkemanx.github.io/attachments/20240330_22h24m17s_grim.png"&gt;
 &lt;figcaption style="text-align:center"&gt;Source:&lt;a&gt;https://dietpi.com/stats.html#distrostats&lt;/a&gt;&lt;/figcaption&gt;
&lt;/figure&gt;


&lt;h2 id="docker"&gt;Docker&lt;/h2&gt;
&lt;p&gt;An essential part of my setup is &lt;a href="https://www.docker.com/"&gt;docker&lt;/a&gt;, a software that allows users to install other software in containers, virtually isolating them.&lt;/p&gt;
&lt;p&gt;One can think about docker as little Virtual Machines, that are way more granular. They isolate a single application/service with all their dependencies, they need to run.&lt;/p&gt;
&lt;p&gt;Why would you install a software as a container instead of running it directly bare metal?
Docker provides several advantages:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Increased Security&lt;/strong&gt;: Each software is containerized, ensuring that if one container is breached, the attacker only gains access to that specific container.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Modularity&lt;/strong&gt;: Docker allows for easy maintenance or replacement of a service without affecting others.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Easy and Fast Deployment&lt;/strong&gt;: Software deployment is quick and straightforward through a single command.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Reproducibility and Portability&lt;/strong&gt;: Docker ensures consistent behavior, even when reinstalled on different machines.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="building-my-home-server"&gt;Building my Home Server&lt;/h2&gt;
&lt;p&gt;I assembled my own Home Server, incorporating the following following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;1x Rasperry Pi 3b&lt;/li&gt;
&lt;li&gt;2x Toschiba Portable 1 TB Disks&lt;/li&gt;
&lt;li&gt;1x Sonoff Zigbee 3.0 USB Dongle Plus&lt;/li&gt;
&lt;li&gt;1x Generic Power Strip&lt;/li&gt;
&lt;li&gt;1x Generic Ethernet Splitter&lt;/li&gt;
&lt;li&gt;1x Generic Powered USB Hub&lt;/li&gt;
&lt;li&gt;1x Old Cardboard Box of a Power supply&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The Raspberry Pi serves as the main component of the entire server; it acts as the heart responsible for running all the necessary software. Additionally, I have two external hard disks connected via USB to the USB hub, which, in turn, is connected to the Raspberry Pi. One disk functions as the primary storage, while the other serves as a backup by cloning the contents of the first disk.&lt;/p&gt;
&lt;style&gt;
 .info {
 background-color: #e6f7ff; 
 padding: 15px; 
 border-radius: 5px; 
 margin-bottom: 15px; 
 }

 .info-title {
 font-size: 20px; 
 margin-bottom: 10px; 
 color: #000080; 
 font-weight: bold; 
 }
&lt;/style&gt;

&lt;div class="info"&gt;
 &lt;div class="info-title"&gt;Info&lt;/div&gt;
 &lt;p&gt;Despite the Raspberry Pi having sufficient USB ports for the hard disks, it is not recommended to directly connect them to the Raspberry Pi. This precaution is due to the limited power supply of the Raspberry Pi; connecting too many devices directly may lead to power instabilities.&lt;/p&gt;
&lt;/div&gt;

&lt;p&gt;I&amp;rsquo;ve also added an Ethernet splitter since my room has only one Ethernet cable, which needs to be shared with my computer. The Sonoff Zigbee 3.0 USB Dongle Plus acts as an antenna for Zigbee signals, allowing me to control my smart devices via Home Assistant.&lt;/p&gt;
&lt;p&gt;Lastly, the power strip ensures a stable power supply for the Raspberry Pi, USB hub, and Ethernet splitter. An added advantage is that turning the power strip off completely powers down the entire server.&lt;/p&gt;


&lt;figure&gt;
 &lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width:80%" src="https://monkemanx.github.io/attachments/IMG_20240119_211642797.jpg"&gt;
&lt;/figure&gt;

&lt;figure&gt;
 &lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width:80%;" src="https://monkemanx.github.io/attachments/IMG_20240119_211727160.jpg"&gt;
 &lt;figcaption style="text-align: center;"&gt;Some Images of my Home Server"&lt;/figcaption&gt;
&lt;/figure&gt;


&lt;p&gt;(Don&amp;rsquo;t judge me for the cable management -_-)&lt;/p&gt;
&lt;h1 id="whats-next"&gt;What&amp;rsquo;s Next?&lt;/h1&gt;
&lt;p&gt;In the next part of this series, I will show how I installed the Operating System and Docker to my Rasperry Pi 3 and how Docker generally works.&lt;/p&gt;</description></item><item><title>Introduction to Poetry</title><link>https://monkemanx.github.io/articles/introduction_to_poetry/</link><pubDate>Mon, 25 Dec 2023 23:45:43 +0000</pubDate><author>monkeman@cock.li (MonkeMan)</author><guid>https://monkemanx.github.io/articles/introduction_to_poetry/</guid><description>&lt;p&gt;Poetry has long been an mystery to me - Never understood why people like it, never understood the need for analyzing them in school and especially never understood why people treat it so highly.
It always felt similar to the esoteric behavior displayed by wine snobs about what the perfect wine is.
However, as my interest recently shifted to world building. I began to recognize the potential within poetry as story telling tool, realizing it could serve as integral role to craft religions and history of the world.
Moreover, when looking into the history of writing and books than its clear that poetry predates modern novels and as such it&amp;rsquo;s interesting on it own how this came to be.&lt;/p&gt;
&lt;p&gt;With all this in mind, I want to introduce in this text some general concepts about poetry, to help me and you to make more sense of poetry.&lt;/p&gt;
&lt;h2 id="what-is-poetry"&gt;What is Poetry?&lt;/h2&gt;
&lt;p&gt;Defining poetry is as challenging as its counterpart, prose. No single definition can fit the entire body of poetry. But we can make some general claims about it. Generally, poetry is characterized by its greater ambiguity compared to prose and its use of specialized language. The most outward sign of poetry is the unconventional formatting, where text lines don&amp;rsquo;t span the entire width of a page but wrap around to the next line.&lt;/p&gt;
&lt;p&gt;Moreover, poetry employs specialized language that may include newly invented words, &amp;ldquo;incorrect&amp;rdquo; grammar, and unconventional sentence structure. Structural techniques such as verses, stanzas, metre, imagery, rhetorical devices and sound patterns are also widely used in poetry.
No poem incorporates all of these techniques, poetry often rely on them to achieve a specific impact on the reader.&lt;/p&gt;
&lt;p&gt;Contrary to popular belief, poetry is not just about exploring universals truths or deeply personal experiences, but also about day to day life and silly nonsense.
One of my favorite example of this is the book &amp;ldquo;Old Possum&amp;rsquo;s Book of Practical Cats&amp;rdquo;, in which the author shows the life of cats through the medium of poetry. Here&amp;rsquo;s a glimpse:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;The Rum Tum Tugger is a Curious Cat;&lt;br&gt;
If you offer him pheasant he would rather have grouse.&lt;br&gt;
If you put him in a house he would much prefer a flat,&lt;br&gt;
If you put him in a flat then he’d rather have a house.&lt;br&gt;
If you set him on a mouse then he only wants a rat,&lt;br&gt;
If you set him on a rat then he’d rather chase a mouse.&lt;br&gt;
Yes the Rum Tum Tugger is a Curious Cat—&lt;br&gt;
And there isn’t any call for me to shout it:&lt;br&gt;
For he will do&lt;br&gt;
As he do do&lt;br&gt;
And there’s no doing anything about it!&lt;br&gt;
&lt;/p&gt;
\[...\]&lt;p&gt;&amp;ldquo;THE RUM TUM TUGGER&amp;rdquo; by T.S. Eliot&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Pinpointing a precise definition of poetry remains difficult. However, for most individuals, the recognition of poetry is rather intuitive - they know it when they see it.&lt;/p&gt;
&lt;h2 id="poetry-techniques"&gt;Poetry Techniques&lt;/h2&gt;
&lt;h3 id="metre"&gt;Metre&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;Metre&lt;/strong&gt; describes the arrangement of accents and syllables in the text. In everyday speech, we naturally emphasize different parts of the words we articulate - syllables we emphasize are called &lt;strong&gt;stressed&lt;/strong&gt;, while those not emphasized are called &lt;strong&gt;not-stressed&lt;/strong&gt;
For Instance the phrase &amp;ldquo;And how are you this morning?&amp;rdquo; most people would stress this phrase like this: &amp;ldquo;And HOW are YOU this MORning?&amp;rdquo;, but this is not the only possible option on how to stress this sentence, one could also say &amp;ldquo;And how ARE you this MORning?&amp;rdquo;.
With this you can already see the way sentence are stressed is not unambiguously.&lt;/p&gt;
&lt;p&gt;Various metrical patterns exist, including:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Accentual Metre:&lt;/strong&gt; Each line has the same number of stressed syllables, with the total number of syllables varying.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Syllabic Metre:&lt;/strong&gt; Each line maintains a consistent number of syllables, though the stressed syllables may differ.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Accentual-Syllabic Metre:&lt;/strong&gt; Each line contains an equal number of both stressed and unstressed syllables.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Free Verse:&lt;/strong&gt; Characterized by an irregular distribution of syllables and stress,&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;An example for &lt;em&gt;Accentual Metre&lt;/em&gt; is the following poem:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Baa&lt;/strong&gt;, baa, &lt;strong&gt;black&lt;/strong&gt;* sheep, (4)&lt;br&gt;
&lt;strong&gt;Have&lt;/strong&gt; you any &lt;strong&gt;wool&lt;/strong&gt;? (5)&lt;br&gt;
&lt;strong&gt;Yes&lt;/strong&gt; sir, &lt;strong&gt;yes&lt;/strong&gt; sir, (4)&lt;br&gt;
&lt;strong&gt;Three&lt;/strong&gt; bags &lt;strong&gt;full&lt;/strong&gt;; (3)&lt;br&gt;
&lt;strong&gt;One&lt;/strong&gt; for the &lt;strong&gt;mas&lt;/strong&gt;-ter, (5)&lt;br&gt;
And &lt;strong&gt;one&lt;/strong&gt; for the &lt;strong&gt;dame&lt;/strong&gt;, (5)&lt;br&gt;
And &lt;strong&gt;one&lt;/strong&gt; for the &lt;strong&gt;lit&lt;/strong&gt;-tle boy (7)&lt;br&gt;
Who &lt;strong&gt;lives&lt;/strong&gt; down the &lt;strong&gt;lane&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;&amp;ldquo;Baa Baa Black Sheep&amp;rdquo;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;In this example here the bold represents stressed syllables and the number of syllables is represented by the number after each line.
&lt;em&gt;Accentual Metre&lt;/em&gt; is often used in nursery rhymes, rap music also uses a similar scheme.&lt;/p&gt;
&lt;p&gt;Pure &lt;em&gt;Syllabic Metre&lt;/em&gt; is rare in the English language, one famous form though is &lt;strong&gt;Haiku&lt;/strong&gt;, this is poem form that originated from japan.
A &lt;em&gt;Haiku&lt;/em&gt; consists of three lines the first lines has five syllables, the second line has seven syllables and the last line has five syllables again.
A famous example of a haiku is:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;I write, erase, rewrite&lt;br&gt;
Erase again, and then&lt;br&gt;
A poppy blooms.&lt;/p&gt;
&lt;p&gt;“A Poppy Blooms” by Katsushika Hokusai&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;This poem was originally written in Japanese and got then translated, that&amp;rsquo;s why the number of syllables is not correct. Also many modern poets don&amp;rsquo;t hold themselves strictly to the requirements, it&amp;rsquo;s more important to fulfill the core idea behind it.
I made a try myself to write a haiku:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Basking in the sun&lt;br&gt;
Dread, pain and agony gone&lt;br&gt;
Dreamless sleep!&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Often poems are described by the number of syllables a line has, so if every line in a poem has fourteen syllables one would call the poem a &lt;em&gt;fourteen-er&lt;/em&gt;, example:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Now the gate has been unlatched, headstones pushed aside;&lt;br&gt;
Corpses shift and offer room, a fate you must abide.&lt;/p&gt;
&lt;p&gt;&amp;ldquo;The Gravemind&amp;rdquo; from the Halo Trilogy&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Among various metrical systems, the &lt;em&gt;Accentual-Syllabic metre&lt;/em&gt; stands as the most widely used. In this system, the arrangement of stressed and unstressed syllables follow a regular pattern, with each unit of this regularity called a &lt;strong&gt;foot&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;Common metrical patterns within the Accentual-Syllabic system include:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Iamb(01)&lt;/strong&gt;: Pronounced as &amp;ldquo;da-DUM&amp;rdquo;, this metre has a unstressed syllable followed by a stressed syllables. (e.g. re&lt;strong&gt;turn&lt;/strong&gt;)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Trochee(10)&lt;/strong&gt;: Pronounced as &amp;ldquo;DUM-da&amp;rdquo;, this metre has a stressed syllable followed by a unstressed syllables. (e.g. &lt;strong&gt;Gar&lt;/strong&gt;den)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Dactyl(100)&lt;/strong&gt;: Pronounced as &amp;ldquo;DUM-da-da&amp;rdquo;, this metre has a stressed syllable followed by two unstressed syllables. (e.g. &lt;strong&gt;ba&lt;/strong&gt;sketball)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Anapaest(001)&lt;/strong&gt;: Pronounced as &amp;ldquo;da-da-DUM&amp;rdquo;, this metre has two unstressed syllables folloed by a stressed syllable.(e.g. contra&lt;strong&gt;dict&lt;/strong&gt;)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Spondee(11)&lt;/strong&gt;: Pronounced as &amp;ldquo;DUM-DUM&amp;rdquo;, the spondee features two consecutive stressed syllables.(e.g. &lt;strong&gt;bookmark&lt;/strong&gt;)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If a poem follows the da-DUM metric pattern we call it &lt;em&gt;iambic&lt;/em&gt;, we can combine this property in addition with the number of syllables e.g. a iambic poem with five syllables per line is called &lt;strong&gt;iambic pentamter&lt;/strong&gt;.&lt;/p&gt;


&lt;figure&gt;
 &lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width:50%" src="https://monkemanx.github.io/attachments/iambic_pentameter.jpg"&gt;
 &lt;figcaption style="text-align:center"&gt;&lt;a href="https://xkcd.com/79/"&gt;Source&lt;/a&gt;&lt;/figcaption&gt;
&lt;/figure&gt;


&lt;p&gt;The poet Shakespeare, famously often wrote in &lt;em&gt;iambic&lt;/em&gt; pattens in his poems.&lt;/p&gt;
&lt;p&gt;The &lt;em&gt;Spondee&lt;/em&gt; pattern is a pattern that isn&amp;rsquo;t used throughout the whole poem, but only at certain parts of the poem.
This introduced an important facet: metric patterns need not to be the same throughout a poem but can be switched. Using a continuous metre risk monotony and tedium.
To counter this poets, often employ a technique called &lt;strong&gt;Substitutions&lt;/strong&gt;, wherein they deliberately alter the metre in the final few syllables of a line.
One exmaple if the following iambic poem, the poem introduces trochee and spondee in line 5:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;What dire Offence from am’rous Causes springs,&lt;br&gt;
What mighty Contests rise from trivial things,&lt;br&gt;
I sing – this Verse to Caryll, Muse! is due;&lt;br&gt;
This ev’n Belinda may vouchsafe to view:&lt;br&gt;
Slight is the Subject, but not so the Praise,&lt;br&gt;
If She inspire, and He approve my Lays.&lt;br&gt;
(From: Pope, Rape of the Lock, 1-6)&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;In Line 5, &amp;ldquo;Slight is&amp;rdquo; is a trochaic foot that varies from the other monotone iambic pattern.
This also indicates to the reader that they should pay extra attention to &amp;ldquo;Slight&amp;rdquo;.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Why does this even matter?&lt;/em&gt;
The significance of metre lies in its ability to evoke specific effects in the reader. For instance, a bouncy metre, can be used to make a poem sound more playful and fun.&lt;/p&gt;
&lt;h3 id="rhythm"&gt;Rhythm&lt;/h3&gt;
&lt;p&gt;All language uses rhythm, poetry especially takes advantage of rhythm to create meaning.
Rhythm, in essence describes how the poem flows throughout the text.
Metre is part of Rhythm, but Rhythm is more general, it describes the speed of the poem and is influenced by:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Pauses&lt;/li&gt;
&lt;li&gt;Elisions and expansions&lt;/li&gt;
&lt;li&gt;Vowel and Consonant Length&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;There are two types of pauses at the end of a line and within a line.&lt;/p&gt;
&lt;h4 id="pauses-at-the-end-of-a-line"&gt;Pauses at the end of a line&lt;/h4&gt;
&lt;p&gt;Pauses at the end of a line are naturally created in a poem, by the simple fact that the text doesn&amp;rsquo;t fill the whole text width of the page.
Compare for instance the following poems, one written as prose and one properly formatted like a poem:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;The sea is calm to-night. The tide is full, the moon lies fair upon the&lt;br&gt;
straits; on the French coast the light gleams and is gone; the cliffs of&lt;br&gt;
England stand, glimmering and vast, out in the tranquil bay. Come to&lt;br&gt;
the window, sweet is the night air! Only, from the long line of spray&lt;br&gt;
where the sea meets the moon-blanched land, listen! you hear the&lt;br&gt;
grating roar of pebbles which the waves draw back, and fling, at their&lt;br&gt;
return, up the high strand, begin, and cease, and then again begin, with&lt;br&gt;
tremulous cadence slow, and bring the eternal note of sadness in.&lt;/p&gt;
&lt;p&gt;The sea is calm to-night.&lt;br&gt;
The tide is full, the moon lies fair&lt;br&gt;
Upon the straits; on the French coast the light&lt;br&gt;
Gleams and is gone; the cliffs of England stand,&lt;br&gt;
Glimmering and vast, out in the tranquil bay.&lt;br&gt;
Come to the window, sweet is the night air!&lt;br&gt;
Only, from the long line of spray&lt;br&gt;
Where the sea meets the moon-blanched land,&lt;br&gt;
Listen! you hear the grating roar&lt;br&gt;
Of pebbles which the waves draw back, and fling,&lt;br&gt;
At their return, up the high strand,&lt;br&gt;
Begin, and cease, and then again begin,&lt;br&gt;
With tremulous cadence slow, and bring&lt;br&gt;
The eternal note of sadness in.&lt;/p&gt;
&lt;p&gt;&amp;ldquo;Dover Beach&amp;rdquo; by Arnold&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;The poem without any formatting feels a lot faster, because we are missing the short pauses at the end of lines. Also a lot of the Rhythm is lost.&lt;/p&gt;
&lt;p&gt;Additionally, we differentiate between &lt;strong&gt;end-stopped-lines&lt;/strong&gt; which are lines that have at the end some kind of punctuation and &lt;strong&gt;run-on-lines&lt;/strong&gt; without any form of punctuation at the end of line.
In End-stopped-lines through the punctuation the pauses are especially pronounced.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;The Pekes and the Pollicles, everyone knows,&lt;br&gt;
Arc proud and implacable passionate foes,&lt;br&gt;
It is always the same, wherever one goes.&lt;br&gt;
&lt;/p&gt;
\[...\]&lt;p&gt;&lt;br&gt;
Continued below&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;While in run-on-lines the pauses are more soft, there is still a short pause due the reader needing to move his eyes from the end of line to the beginning of the next line.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;And the Pugs and the Poms, although most people say&lt;br&gt;
That they do not like fighting, yet once in a way,&lt;br&gt;
They will now and again join in to the fray&lt;br&gt;
And they&lt;br&gt;
Bark bark bark bark&lt;br&gt;
Bark bark bark bark&lt;br&gt;
Until you can hear them all over the Park.&lt;/p&gt;
&lt;p&gt;&amp;ldquo;OF THE AWEFULL BATTLE OF THE PEKES AND THE FOLLICLES&amp;rdquo; by T. S. Eliot&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Poets strategically utilize these pauses to direct the reader&amp;rsquo;s focus toward individual words and sounds. This deliberate control over pacing allows poets to imbue additional layers of meaning into their verses.&lt;/p&gt;
&lt;h4 id="pauses-within-lines"&gt;Pauses within lines&lt;/h4&gt;
&lt;p&gt;Pauses can also occur within lines, often times they are created by using &amp;ldquo;-&amp;rdquo; between lines.
Like pauses at the end of lines, they can be used highlight certain words. Additionally they can also be used to break the monotony of a metric pattern and create some contrast within the line.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;The time has come,’ the Walrus said,&lt;br&gt;
‘To talk of many things:&lt;br&gt;
Of shoes – and ships – and sealing-wax&lt;br&gt;
Of cabbages – and kings –&lt;br&gt;
And why the sea is boiling hot –&lt;br&gt;
And whether pigs have wings.’&lt;/p&gt;
&lt;p&gt;&amp;ldquo;THE WALRUS AND THE CARPENTER&amp;rdquo; by LEWIS CARROLL&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h4 id="ellision-and-expansion"&gt;Ellision and Expansion&lt;/h4&gt;
&lt;p&gt;There are some cases where syllables which are pronounced unstressed are pronounced stressed to fit the metrical pattern, we call this &lt;strong&gt;Ellision&lt;/strong&gt;.&lt;/p&gt;
&lt;h4 id="vowel-length"&gt;Vowel Length&lt;/h4&gt;
&lt;p&gt;The speed of poem can be varied throughout a poem, one way to archive that is though the use of different metrical pattern, but this is not the only aspect that influences the speed of a poem another one is &lt;strong&gt;vowel length&lt;/strong&gt;.
Example:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;The swift, brisk wind kissed the cliffs.&lt;br&gt;
The slow, mellow wind embraced the cliffs.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;In line 1, the short vowels (&amp;ldquo;swift,&amp;rdquo; &amp;ldquo;brisk&amp;rdquo;) lead to a fast and lively pace. In contrast, line 2, with its long vowels (&amp;ldquo;slow,&amp;rdquo; &amp;ldquo;mellow&amp;rdquo;), imparts a slow and unhurried feeling.&lt;/p&gt;
&lt;h2 id="rhymes"&gt;Rhymes&lt;/h2&gt;
&lt;p&gt;When two words or more sound really similar we call them rhymes. We differentiate between different rhymes form such as &lt;strong&gt;full rhmyes&lt;/strong&gt; where the consonant preceding the last stressed vowel is different: ni&lt;strong&gt;ght&lt;/strong&gt;/deli&lt;strong&gt;ght&lt;/strong&gt;, p&lt;strong&gt;ower&lt;/strong&gt;/f&lt;strong&gt;lower&lt;/strong&gt; or the &lt;strong&gt;rich rhyme&lt;/strong&gt; when the consonant before the last stressed vowel is also identical: &lt;strong&gt;lap&lt;/strong&gt;/ c&lt;strong&gt;lap&lt;/strong&gt;, &lt;strong&gt;stick&lt;/strong&gt;/ecclesia&lt;strong&gt;stic&lt;/strong&gt;. In additon to that there are a variation of other rhymes forms.&lt;/p&gt;
&lt;p&gt;Rhymes can appear at different position in a poem. In &lt;strong&gt;end-rhyme&lt;/strong&gt; words at the ends of a line rhyme.&lt;/p&gt;
&lt;p&gt;We can also have lines within a line, these are called &lt;strong&gt;internal-rhymes&lt;/strong&gt;. As particular form of this is the &lt;strong&gt;leonine rhyme&lt;/strong&gt; where the middle word rhymes with the word at the end of the line.&lt;/p&gt;
&lt;p&gt;Rhymes can be arranged according to different patterns. Some popular rhyme schemes are:&lt;/p&gt;
&lt;table&gt;
	&lt;thead&gt;
			&lt;tr&gt;
					&lt;th&gt;Name&lt;/th&gt;
					&lt;th&gt;Form&lt;/th&gt;
			&lt;/tr&gt;
	&lt;/thead&gt;
	&lt;tbody&gt;
			&lt;tr&gt;
					&lt;td&gt;alternate rhyme&lt;/td&gt;
					&lt;td&gt;abab cdcd &amp;hellip;&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;rhyming couplet&lt;/td&gt;
					&lt;td&gt;aa bb cc &amp;hellip;&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;chain rhyme&lt;/td&gt;
					&lt;td&gt;aba bcb cdc &amp;hellip;&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;tail rhyme&lt;/td&gt;
					&lt;td&gt;aab ccb &amp;hellip;&lt;/td&gt;
			&lt;/tr&gt;
	&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;The same letter are marks for one rhyme. One Example for a alternate rhyme is:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Bid me to weep, and I will &lt;strong&gt;weep&lt;/strong&gt; 		A&lt;br&gt;
While I have eyes to &lt;strong&gt;see&lt;/strong&gt; 					B&lt;br&gt;
And having none, yet I will &lt;strong&gt;keep&lt;/strong&gt; 		A&lt;br&gt;
A heart to weep for &lt;strong&gt;thee&lt;/strong&gt; 					 B&lt;br&gt;
&amp;ldquo;To Anthea, who may Command him Anything&amp;rdquo;, by Robert Herrick&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2 id="miscellaneous"&gt;Miscellaneous&lt;/h2&gt;
&lt;p&gt;There are many more techniques poets can employ in their poems, which I don&amp;rsquo;t and can&amp;rsquo;t name them all. But a few noteworthy are:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Alliteration:&lt;/strong&gt; Is the repetition of the same sound
&lt;ul&gt;
&lt;li&gt;The &lt;strong&gt;G&lt;/strong&gt;rumpy &lt;strong&gt;G&lt;/strong&gt;ray &lt;strong&gt;G&lt;/strong&gt;azelle&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;F&lt;/strong&gt;ire&lt;strong&gt;f&lt;/strong&gt;rore&lt;strong&gt;f&lt;/strong&gt;iddle, the &lt;strong&gt;F&lt;/strong&gt;iend of the &lt;strong&gt;F&lt;/strong&gt;ell.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Onomatopoeia:&lt;/strong&gt; words that are associated with a sound
&lt;ul&gt;
&lt;li&gt;Boom&lt;/li&gt;
&lt;li&gt;Crash&lt;/li&gt;
&lt;li&gt;Clink&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="structure-of-poems"&gt;Structure of poems&lt;/h2&gt;
&lt;p&gt;In this last section I want to take a look at some different popular Poem structures, to be precise the different forms of &lt;strong&gt;stanza&lt;/strong&gt;, which is a sequence of line which form a unit in the poem.&lt;/p&gt;
&lt;h3 id="haiku"&gt;Haiku&lt;/h3&gt;
&lt;p&gt;The &lt;a href="https://en.wikipedia.org/wiki/Haiku"&gt;Haiku&lt;/a&gt; is a short form poetry that originates from Japan. Traditional Haikus consists out of three lines where the first and the last line have 5 syllables and the middle one has 7 syllables. Besides that Haiku&amp;rsquo;s are known for having themes about Nature or the Seasons and employing a so called &lt;em&gt;cutting word&lt;/em&gt;. Haiku&amp;rsquo;s don&amp;rsquo;t use rhyme nor metre, they rely strongly on imagery.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;An old silent pond…&lt;br&gt;
A frog jumps into the pond,&lt;br&gt;
splash! Silence again.&lt;br&gt;
by Matsuo Bashō&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h3 id="limerick"&gt;Limerick&lt;/h3&gt;
&lt;p&gt;The &lt;a href="https://en.wikipedia.org/wiki/Limerick_(poetry)"&gt;Limerick&lt;/a&gt; is a traditional English verse form. It is often used for humorous poems about nonsense or obscenity. The limerick is written in five-lines, mostly uses anapestic metre and a strict rhyme scheme of AABBAA.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;The limerick packs laughs anatomical&lt;br&gt;
Into space that is quite economical.&lt;br&gt;
But the good ones I&amp;rsquo;ve seen&lt;br&gt;
So seldom are clean&lt;br&gt;
And the clean ones so seldom are comical&lt;br&gt;
by Unknown&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h3 id="blank-verse"&gt;Blank Verse&lt;/h3&gt;
&lt;p&gt;&lt;a href="https://en.wikipedia.org/wiki/Blank_verse"&gt;Blank Verse&lt;/a&gt; is has a rather simple poem structure written in unrhymed but metered lines, almost always in iambic pentameters.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;My lord?&lt;br&gt;
A grave.&lt;br&gt;
He shall not live.&lt;br&gt;
Enough.&lt;br&gt;
by Shakespeare&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h3 id="ballad"&gt;Ballad&lt;/h3&gt;
&lt;p&gt;&lt;a href="https://en.wikipedia.org/wiki/Ballad"&gt;Ballad&lt;/a&gt; are often narrative poems, with lines of iambic tetrameter alternated with trimeter. The rhyme scheme is usually &lt;code&gt;abcb&lt;/code&gt;.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Down dropped the breeze, the sails dropped down,&lt;br&gt;
‘Twas sad as sad could be;&lt;br&gt;
And we did speak only to break&lt;br&gt;
The silence of the sea!&lt;/p&gt;
&lt;p&gt;All in a hot and copper sky,&lt;br&gt;
The bloody Sun, at noon,&lt;br&gt;
Right up above the mast did stand,&lt;br&gt;
No bigger than the Moon.&lt;br&gt;
&amp;ldquo;The Rime of the Ancient Mariner&amp;rdquo; by Coleridge&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h3 id="shakespeare-sonnet"&gt;Shakespeare Sonnet&lt;/h3&gt;
&lt;p&gt;&lt;a href="https://en.wikipedia.org/wiki/Sonnet"&gt;Sonnet&lt;/a&gt; is a poetic form that originated from Italy. It is lyrical poem of usually fourteen lines in iambic pentameter. The Shakespearean Sonnet usually uses a rhyme pattern of &lt;code&gt;abab cdcd efef gg&lt;/code&gt;.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Since brass, nor stone, nor earth, nor boundless sea&lt;br&gt;
But sad mortality o’er-sways their power,&lt;br&gt;
How with this rage shall beauty hold a plea,&lt;br&gt;
Whose action is no stronger than a flower?&lt;br&gt;
O, how shall summer’s honey breath hold out&lt;br&gt;
Against the wreckful siege of battering days,&lt;br&gt;
When rocks impregnable are not so stout,&lt;br&gt;
Nor gates of steel so strong, but Time decays?&lt;br&gt;
O fearful meditation! where, alack,&lt;br&gt;
Shall Time’s best jewel from Time’s chest lie hid?&lt;br&gt;
Or what strong hand can hold his swift foot back?&lt;br&gt;
Or who his spoil of beauty can forbid?&lt;br&gt;
O, none, unless, this miracle have might&lt;br&gt;
That in black ink my love may still shine bright.&lt;br&gt;
&amp;ldquo;Sonnet 65&amp;rdquo; by Shakespeare&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h1 id="conclusion"&gt;Conclusion&lt;/h1&gt;
&lt;p&gt;In this article I gave a short overview about poetry, what poetry is, what techniques it uses and different poem structures.
I hope this article helped bring some of you closer to poetry.&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;References:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;This article is based on a script from &lt;em&gt;Stefanie Lethbridge&lt;/em&gt; and &lt;em&gt;Jarmila Mildorf&lt;/em&gt; at the university of Tübingen.&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>What is PGP/GPG?</title><link>https://monkemanx.github.io/articles/what_is_pgp_gpg/</link><pubDate>Mon, 25 Dec 2023 17:07:52 +0000</pubDate><author>monkeman@cock.li (MonkeMan)</author><guid>https://monkemanx.github.io/articles/what_is_pgp_gpg/</guid><description>&lt;style&gt;
 .info {
 background-color: #e6f7ff; 
 padding: 15px; 
 border-radius: 5px; 
 margin-bottom: 15px; 
 }

 .info-title {
 font-size: 20px; 
 margin-bottom: 10px; 
 color: #000080; 
 font-weight: bold; 
 }
&lt;/style&gt;

&lt;div class="info"&gt;
 &lt;div class="info-title"&gt;Info&lt;/div&gt;
 &lt;p&gt;In this post, I provide an example of implementing digital signatures for blog posts. While this method works, I no longer use it due to a switch in my Hugo theme for my website.&lt;/p&gt;
&lt;/div&gt;

&lt;p&gt;To quote Wikipedia, &amp;ldquo;Pretty Good Privacy (&lt;a href="https://en.wikipedia.org/wiki/Pretty_Good_Privacy"&gt;PGP&lt;/a&gt;) is an encryption program that provides cryptographic privacy and authentication for data communication.&amp;rdquo;
It is widely used for sending encrypted emails, encrypting sensitive files and digitally signing files.&lt;/p&gt;
&lt;p&gt;The popularity of PGP can be attributed to multiple factors, two of which I want to note: the software was originally spread as freeware, and its encryption method which employs symmetric-key cryptography and public-key cryptography.&lt;/p&gt;
&lt;p&gt;Building upon the original PGP, a standard was established called &lt;strong&gt;OpenPGP&lt;/strong&gt;.
Today there exist many product which comply with the OpenPGP standard, and one such software is GNU Privacy Guard (&lt;a href="https://en.wikipedia.org/wiki/GNU_Privacy_Guard"&gt;GPG&lt;/a&gt;), a free and open source implementation of PGP. GPG is commonly included as standard on many Linux operating systems.&lt;/p&gt;
&lt;p&gt;From this point onward, my focus will be on GPG,although many, if not most, of the aspects discussed also apply to PGP.&lt;/p&gt;
&lt;h1 id="how-does-gpg-work"&gt;How does GPG work?&lt;/h1&gt;
&lt;h2 id="sending-encrypted-messages"&gt;Sending encrypted messages&lt;/h2&gt;
&lt;p&gt;When user &lt;strong&gt;A&lt;/strong&gt; intends to send a message &lt;strong&gt;m&lt;/strong&gt; to a user &lt;strong&gt;B&lt;/strong&gt; using GPG, both parties must first generate a GPG key, consisting of a public key and a private key.&lt;/p&gt;
&lt;p&gt;Following the key generation, user &lt;strong&gt;B&lt;/strong&gt; needs to share their public key with user &lt;strong&gt;A&lt;/strong&gt;.
Subsequently, user &lt;strong&gt;A&lt;/strong&gt; utilizes the provided public key from user &lt;strong&gt;B&lt;/strong&gt; to encrypt the message &lt;strong&gt;m&lt;/strong&gt;.
One encrypted user &lt;strong&gt;A&lt;/strong&gt; can sent their encoded message to user &lt;strong&gt;B&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;To decrypt the received message, user &lt;strong&gt;B&lt;/strong&gt; employs their private key, which only known by them.
Upon the finish of the decryption process, the original message &lt;strong&gt;m&lt;/strong&gt; sent by user &lt;strong&gt;A&lt;/strong&gt; will be revealed.&lt;/p&gt;


&lt;figure&gt;
 &lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width:80%" src="https://monkemanx.github.io/attachments/20240330_19h07m31s_grim.png"&gt;
 &lt;figcaption style="text-align:center"&gt;&lt;a href="https://www.varonis.com/blog/pgp-encryption"&gt;Source&lt;/a&gt;&lt;/figcaption&gt;
&lt;/figure&gt;


&lt;h2 id="digitally-signing"&gt;Digitally Signing&lt;/h2&gt;
&lt;p&gt;One problem when receiving some kind of file such as a text or a binary is how can you trust that the file comes really from the source that you think it comes from and that it wasn&amp;rsquo;t altered?
For instance, how can you make sure the program you downloaded really is the program you were looking for and not some kind of malware?&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Digitally Signatures&lt;/strong&gt; provide a solution for this problem by incorporating a string of bits generated from a hash algorithm and a cryptographic key.&lt;/p&gt;
&lt;p&gt;A Hash function takes some kind of input(like some text or a file) and outputs a unique string that identifies this input.
For example, altering a single bit of the original file will result in a completely different hash output.
By comparing the hash output of the received file and the hash of the original file, users can verify that the downloaded file has not been tampered with.&lt;/p&gt;
&lt;p&gt;Digitally signatures of GPG go one step further they also take also take in consideration an cryptographic key. This allows users to cross verify the digital signature against the cryptographic key associated with the person or organization they believe the file originates from.
This step ensures that the file truly comes from the expected source.&lt;/p&gt;
&lt;p&gt;Here&amp;rsquo;s how the algorithm works:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;User &lt;strong&gt;A&lt;/strong&gt; want to digitally sign a file &lt;strong&gt;m&lt;/strong&gt;, and user &lt;strong&gt;B&lt;/strong&gt; wants to verify if their downloaded file matches the file &lt;strong&gt;m&lt;/strong&gt; and comes from user &lt;strong&gt;A&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;User &lt;strong&gt;A&lt;/strong&gt; creates a hash of the file &lt;strong&gt;m&lt;/strong&gt; to be sent. This hash in then encrypted with the private key of user &lt;strong&gt;A&lt;/strong&gt; and sent along the original file.&lt;/li&gt;
&lt;li&gt;To verify the file, user &lt;strong&gt;B&lt;/strong&gt; decrypts the received hash using the public key of user &lt;strong&gt;A&lt;/strong&gt;. After which, user &lt;strong&gt;B&lt;/strong&gt; creates a hash of the downloaded file and compares it with the decrypted hash.&lt;/li&gt;
&lt;li&gt;If the message has been altered the hash value will not match.&lt;/li&gt;
&lt;/ol&gt;


&lt;figure&gt;
 &lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width:70%" src="https://monkemanx.github.io/attachments/20240330_19h09m39s_grim.png"&gt;
 &lt;figcaption style="text-align:center"&gt;&lt;a href="https://techterms.com/definition/digitalsignature"&gt;Source&lt;/a&gt;&lt;/figcaption&gt;
&lt;/figure&gt;


&lt;h2 id="some-consideration"&gt;Some Consideration&lt;/h2&gt;
&lt;p&gt;An important thing for GPG to function properly, is obtaining the public key of the recipient(for sending messages) or the sender(for verifying digital signatures) is essential.
However, this introduces a challenge: how can you be certain that the received public key truly belongs to the intended person and not a malicious actor?&lt;/p&gt;
&lt;p&gt;There are several methods that address this:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;In-Person Key Exchange:&lt;/strong&gt; Exchanging the keys in Person allows for checking the identify of the the person the keys belongs to.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Centralized Verification Organizations:&lt;/strong&gt; Another approach is to utilize a central organization which is tasked with verifying public keys. These organization can authenticate users, to make sure that a public key relong belongs to the Person. Other User can then retrieve public keys from these trusted sources.&lt;/li&gt;
&lt;/ul&gt;
&lt;h1 id="application"&gt;Application&lt;/h1&gt;
&lt;p&gt;Next up, I want to explore some practical application on using GPG. While GPG is typically pre-installed on Linux systems, Windows users may need to install it.&lt;/p&gt;
&lt;h2 id="generating-and-exporting-gpg-keys"&gt;Generating and Exporting GPG Keys&lt;/h2&gt;
&lt;p&gt;To generate a GPG, follow thesese steps:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Open your terminal or command prompt&lt;/li&gt;
&lt;li&gt;Run the following command to initalize the key generation process:
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-sh" data-lang="sh"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;1&lt;/span&gt;&lt;span class="cl"&gt;gpg --gen-key
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;You will be prompted to enter your name and email address that will associated with your GPG key. Additionally, you will need to create and enter a passphrase which protects your private key. It is crucial to securely store both your private key and your passphrase and not loosing them. If lost, there&amp;rsquo;s no way to recover them. Also, make sure to never share your private key with others; this key should only be seen and used by you.&lt;/li&gt;
&lt;li&gt;After generating a key, you can list your created GPG keys along with its ID using:
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-sh" data-lang="sh"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;1&lt;/span&gt;&lt;span class="cl"&gt;gpg --list-secret-keys --keyid-format&lt;span class="o"&gt;=&lt;/span&gt;long
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;To export your public created GPG key:
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-sh" data-lang="sh"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;1&lt;/span&gt;&lt;span class="cl"&gt;gpg --export --armor --output exported_keys.asc
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;If, you need to export your &lt;strong&gt;private&lt;/strong&gt; GPG key, use:
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-sh" data-lang="sh"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;1&lt;/span&gt;&lt;span class="cl"&gt;gpg --export-secret-keys --armor --output private_key.asc
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Note: You will be prompted to enter your passphrase to execute this command.&lt;/p&gt;
&lt;p&gt;Personally I would recommend making a backup of the private key and securely storing it on a hard drive or other offline storage media.&lt;/p&gt;
&lt;h2 id="singning-blog-bost-and-git-commit-with-pgp"&gt;Singning Blog Bost and Git commit with PGP&lt;/h2&gt;
&lt;p&gt;After getting into GPG, I was curious for which practical(or not so practical) application I could use it for.
As mentioned earlier, there are two big usage cases for GPG: encryption and digital signatures.
This lead me thinking, &amp;ldquo;What could I digitally sign?&amp;rdquo; - two application that came to my mind was signing git commits and blog posts(emails are an option too).&lt;/p&gt;


&lt;figure&gt;
 &lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width:40%" src="https://monkemanx.github.io/attachments/pgp.png"&gt;
 &lt;figcaption style="text-align:center"&gt;&lt;a href="https://xkcd.com/1181/"&gt;Source&lt;/a&gt;&lt;/figcaption&gt;
&lt;/figure&gt;


&lt;p&gt;Assuming you have already generated your GPG key in the device from whiich you intend to sign, the GPG key should already be imported into your credential/encryption key manager.
If not, you first need to import your GPG key:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-sh" data-lang="sh"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;1&lt;/span&gt;&lt;span class="cl"&gt;gpg --import private_key.asc
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id="signing-git-commits"&gt;Signing Git Commits&lt;/h3&gt;
&lt;p&gt;To sign a Git commit, you can use the &lt;code&gt;-S&lt;/code&gt; argument when committing with Git:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-sh" data-lang="sh"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;1&lt;/span&gt;&lt;span class="cl"&gt;git commit -S -m &lt;span class="s2"&gt;&amp;#34;message&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;When you use a remote repository like GitHub you might first need to verify the GPG key. To do that, follow these steps:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Navigate to &lt;em&gt;Settings -&amp;gt; SSH and GPG keys&lt;/em&gt; on GitHub&lt;/li&gt;
&lt;li&gt;Press the &lt;em&gt;New GPG key&lt;/em&gt; button to add a GPG key&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Once added your commits should appear as verified.&lt;/p&gt;


&lt;figure&gt;
 &lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width:80%" src="https://monkemanx.github.io/attachments/Screenshot%20from%202023-12-22%2012-53-07.png"&gt;
&lt;/figure&gt;


&lt;h3 id="signing-blog-posts"&gt;Signing Blog Posts&lt;/h3&gt;
&lt;p&gt;As previously mentioned in one of my blog posts, I utilize Hugo, a static site generator, to create my website and host it as GitHub Page.
I decided to enhance the trustworthiness of my posts by incoperating digital signatures. This involves automatically creating and displaying GPG signatures for each post, allowing users to verify the authenticity of the content:&lt;/p&gt;


&lt;figure&gt;
 &lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width:60%" src="https://monkemanx.github.io/attachments/Screenshot%20from%202023-12-22%2014-50-54.png"&gt;
&lt;/figure&gt;


&lt;h4 id="automating-signature-creation"&gt;Automating Signature Creation&lt;/h4&gt;
&lt;p&gt;In order to automatically generate signatures for my blog posts, I created a shell script named deploy_to_github.sh. This script performs the following tasks:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Set my PGP key ID and define the folders where my markdown files and signed files will be located.&lt;/li&gt;
&lt;li&gt;Export GPG environment variables, including the GPG home directory. Replace &amp;ldquo;lupos&amp;rdquo; with your own username.&lt;/li&gt;
&lt;li&gt;Verify that a commit message is provided as an argument.&lt;/li&gt;
&lt;li&gt;Find all markdown files recursively, sign each with the specified PGP key, and save the detached signatures in the static folder.&lt;/li&gt;
&lt;li&gt;Move all signature files from the source folder to the static Hugo folder.&lt;/li&gt;
&lt;li&gt;Add signed files to Git, commit changes with a signed message, and push to the remote repository.&lt;/li&gt;
&lt;/ol&gt;
&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Here is the script in full&lt;/summary&gt;
 
 &lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-sh" data-lang="sh"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 1&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="cp"&gt;#!/bin/bash
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 2&lt;/span&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 3&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;# Set your PGP key ID&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 4&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="nv"&gt;PGP_KEY_ID&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;10E75F565D2CD2D3&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 5&lt;/span&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 6&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;# Set the folders where your markdown files and signed files will be located&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 7&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="nv"&gt;TARGET_FOLDER&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;./content&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 8&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="nv"&gt;STATIC_FOLDER&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;./static&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 9&lt;/span&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;10&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;# Export GPG environment variables&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;11&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;# where lupos stands you need to write down your own name&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;12&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="nb"&gt;export&lt;/span&gt; &lt;span class="nv"&gt;GNUPGHOME&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;/home/lupos/.gnupg&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;13&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="nv"&gt;GPG_TTY&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="k"&gt;$(&lt;/span&gt;tty&lt;span class="k"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;14&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="nb"&gt;export&lt;/span&gt; GPG_TTY
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;15&lt;/span&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;16&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;# Check if a commit message is provided as an argument&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;17&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="o"&gt;[&lt;/span&gt; -n &lt;span class="s2"&gt;&amp;#34;&lt;/span&gt;&lt;span class="nv"&gt;$1&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;&lt;/span&gt; &lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;then&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;18&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="nv"&gt;COMMIT_MESSAGE&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;&lt;/span&gt;&lt;span class="nv"&gt;$1&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;19&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="k"&gt;else&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;20&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;&amp;#34;Error: Please provide a commit message.&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;21&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="nb"&gt;exit&lt;/span&gt; &lt;span class="m"&gt;1&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;22&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="k"&gt;fi&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;23&lt;/span&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;24&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;# Find all markdown files recursively and sign each with the PGP key&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;25&lt;/span&gt;&lt;span class="cl"&gt;find &lt;span class="s2"&gt;&amp;#34;&lt;/span&gt;&lt;span class="nv"&gt;$TARGET_FOLDER&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;&lt;/span&gt; -type f -name &lt;span class="s2"&gt;&amp;#34;*.md&amp;#34;&lt;/span&gt; -exec sh -c &lt;span class="s1"&gt;&amp;#39;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;26&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="s1"&gt; for file do
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;27&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="s1"&gt; gpg --yes --armor --output &amp;#34;$file.asc&amp;#34; --detach-sign --default-key &amp;#34;$PGP_KEY_ID&amp;#34; &amp;#34;$file&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;28&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="s1"&gt; done
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;29&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="s1"&gt;&amp;#39;&lt;/span&gt; sh &lt;span class="o"&gt;{}&lt;/span&gt; +
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;30&lt;/span&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;31&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;# Find all .asc files in the source folder and move them to the static folder&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;32&lt;/span&gt;&lt;span class="cl"&gt;find &lt;span class="s2"&gt;&amp;#34;&lt;/span&gt;&lt;span class="nv"&gt;$TARGET_FOLDER&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;&lt;/span&gt; -type f -name &lt;span class="s2"&gt;&amp;#34;*.asc&amp;#34;&lt;/span&gt; -exec mv &lt;span class="o"&gt;{}&lt;/span&gt; &lt;span class="s2"&gt;&amp;#34;&lt;/span&gt;&lt;span class="nv"&gt;$STATIC_FOLDER&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;&lt;/span&gt; &lt;span class="se"&gt;\;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;33&lt;/span&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;34&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;# Add all changes to Git&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;35&lt;/span&gt;&lt;span class="cl"&gt;git add &lt;span class="s2"&gt;&amp;#34;&lt;/span&gt;&lt;span class="nv"&gt;$TARGET_FOLDER&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;&lt;/span&gt;/*.asc
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;36&lt;/span&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;37&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;# Commit changes&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;38&lt;/span&gt;&lt;span class="cl"&gt;git commit -S -m &lt;span class="s2"&gt;&amp;#34;&lt;/span&gt;&lt;span class="nv"&gt;$COMMIT_MESSAGE&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;39&lt;/span&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;40&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;# Push changes to remote repository&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;41&lt;/span&gt;&lt;span class="cl"&gt;git push
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
 
&lt;/details&gt;


&lt;p&gt;Whenever I&amp;rsquo;m ready to publish new posts or updates to my GitHub Page, I streamline the process by executing the &lt;code&gt;deploy_to_github.sh&lt;/code&gt; script. This script automates the signing of all my blog posts, generating individual signature files (&lt;code&gt;file_name.md.asc&lt;/code&gt;) for each post. These signatures are then stored in the &lt;code&gt;static&lt;/code&gt; folder.
Following the automated signature creation, the script proceeds to commit the changes and push them to my GitHub repository.&lt;/p&gt;
&lt;h3 id="displaying-signatures"&gt;Displaying Signatures&lt;/h3&gt;
&lt;p&gt;To display the signatures on each blog post, I created a template file named &lt;code&gt;pgp-key.html&lt;/code&gt; in the &lt;code&gt;/themes/PaperMod/layouts/partials/templates&lt;/code&gt; folder.&lt;/p&gt;
&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Here is the full `pgp-key.html` file&lt;/summary&gt;
 
 &lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-html" data-lang="html"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 1&lt;/span&gt;&lt;span class="cl"&gt;{{ $title := .Title }}
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 2&lt;/span&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 3&lt;/span&gt;&lt;span class="cl"&gt;{{ with .File }}
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 4&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;style&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 5&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="p"&gt;#&lt;/span&gt;&lt;span class="nn"&gt;signature&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 6&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mh"&gt;#007BFF&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="err"&gt;/&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 7&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="p"&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 8&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;span-class&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 9&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;font-size&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;18&lt;/span&gt;&lt;span class="kt"&gt;px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;10&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;black&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;11&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;border&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="kt"&gt;px&lt;/span&gt; &lt;span class="kc"&gt;solid&lt;/span&gt; &lt;span class="mh"&gt;#B7B7B7&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;12&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;border-radius&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="kt"&gt;px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c"&gt;/* Add rounded corners */&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;13&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;padding&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="kt"&gt;px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;14&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;display&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;inline-block&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;15&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;style&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;16&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="c"&gt;&amp;lt;!-- Create a link to the static file --&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;17&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;span&lt;/span&gt; &lt;span class="na"&gt;class&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;&amp;#34;span-class&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;18&lt;/span&gt;&lt;span class="cl"&gt;	This site is
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;19&lt;/span&gt;&lt;span class="cl"&gt;	&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;a&lt;/span&gt; &lt;span class="na"&gt;id&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;&amp;#34;signature&amp;#34;&lt;/span&gt; &lt;span class="na"&gt;href&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;&amp;#34;{{ printf &amp;#34;&lt;/span&gt;&lt;span class="err"&gt;/%&lt;/span&gt;&lt;span class="na"&gt;s&lt;/span&gt;&lt;span class="err"&gt;.&lt;/span&gt;&lt;span class="na"&gt;md&lt;/span&gt;&lt;span class="err"&gt;.&lt;/span&gt;&lt;span class="na"&gt;asc&lt;/span&gt;&lt;span class="err"&gt;&amp;#34;&lt;/span&gt; &lt;span class="err"&gt;.&lt;/span&gt;&lt;span class="na"&gt;BaseFileName&lt;/span&gt; &lt;span class="err"&gt;}}&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;cryptographically signed&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;a&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;20&lt;/span&gt;&lt;span class="cl"&gt;	by my
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;21&lt;/span&gt;&lt;span class="cl"&gt;	&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;a&lt;/span&gt; &lt;span class="na"&gt;id&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;&amp;#34;signature&amp;#34;&lt;/span&gt; &lt;span class="na"&gt;href&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;&amp;#34;{{ relURL &amp;#34;&lt;/span&gt;&lt;span class="na"&gt;monkeman_pgp_public_key&lt;/span&gt;&lt;span class="err"&gt;.&lt;/span&gt;&lt;span class="na"&gt;asc&lt;/span&gt;&lt;span class="err"&gt;&amp;#34;&lt;/span&gt; &lt;span class="err"&gt;}}&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;public key&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;a&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;.
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;22&lt;/span&gt;&lt;span class="cl"&gt; (&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;a&lt;/span&gt; &lt;span class="na"&gt;id&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;&amp;#34;signature&amp;#34;&lt;/span&gt; &lt;span class="na"&gt;href&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;&amp;#34;{{ relURL &amp;#34;&lt;/span&gt;&lt;span class="err"&gt;/&lt;/span&gt;&lt;span class="na"&gt;posts&lt;/span&gt;&lt;span class="err"&gt;/&lt;/span&gt;&lt;span class="na"&gt;pgp&lt;/span&gt;&lt;span class="err"&gt;/&amp;#34;&lt;/span&gt; &lt;span class="err"&gt;}}&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;See More&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;a&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;)
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;23&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;span&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;24&lt;/span&gt;&lt;span class="cl"&gt;{{ end }}
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
 
&lt;/details&gt;


&lt;p&gt;Ensure to move your public key into the &lt;code&gt;static&lt;/code&gt; folder and update the href in the &lt;code&gt;pgp-key.html&lt;/code&gt; file with the correct name of your public key.&lt;/p&gt;
&lt;p&gt;Finally, I added the following code sniped to the &lt;code&gt;signle.html&lt;/code&gt; page in the &lt;code&gt;/themes/PaperMod/layouts/_default&lt;/code&gt; folder, just above the &lt;code&gt;&amp;lt;footer&amp;gt;&lt;/code&gt;:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-sh" data-lang="sh"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;1&lt;/span&gt;&lt;span class="cl"&gt; &amp;lt;!-- custom code--&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;2&lt;/span&gt;&lt;span class="cl"&gt; &amp;lt;span&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;3&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="o"&gt;{{&lt;/span&gt; partial &lt;span class="s2"&gt;&amp;#34;pgp-key.html&amp;#34;&lt;/span&gt; . &lt;span class="o"&gt;}}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;4&lt;/span&gt;&lt;span class="cl"&gt; &amp;lt;/span&amp;gt;&amp;lt;br&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Placing this code snippet in the &lt;code&gt;footer.html&lt;/code&gt; will not work, because it depends on the file name to link to the correct signed key.&lt;/p&gt;
&lt;p&gt;Following these steps correctly will lead to a seamlessly integrated GPG signature into each post.&lt;/p&gt;
&lt;h1 id="conclusion"&gt;Conclusion&lt;/h1&gt;
&lt;p&gt;This post dived into the world of GPG keys, exploring their functionality, application and significance. I covered the basics of how GPG key works, their uses in encryption and digital signatures, and examined practical applications.&lt;/p&gt;
&lt;p&gt;Notable was especially the integration of GPG signatures into both blog posts and Git commits. By automating the signing process and showcasing the cryptographic signatures alongside the content, some level of extra authenticity and trust can be archived.&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;References:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://linux.die.net/man/1/gpg"&gt;https://linux.die.net/man/1/gpg&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://labs.tomasino.org/signing-posts-with-gpg/"&gt;https://labs.tomasino.org/signing-posts-with-gpg/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://blog.probablyfine.co.uk/2019/11/08/signing-my-blog-posts.html"&gt;https://blog.probablyfine.co.uk/2019/11/08/signing-my-blog-posts.html&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://stackoverflow.com/questions/71691219/add-collapsible-section-in-hugo"&gt;https://stackoverflow.com/questions/71691219/add-collapsible-section-in-hugo&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>Introduction to Convolutional Neural Network</title><link>https://monkemanx.github.io/articles/proseminar_cnn/</link><pubDate>Fri, 22 Dec 2023 00:00:00 +0000</pubDate><author>monkeman@cock.li (MonkeMan)</author><guid>https://monkemanx.github.io/articles/proseminar_cnn/</guid><description>&lt;style&gt;
 .info {
 background-color: #e6f7ff; 
 padding: 15px; 
 border-radius: 5px; 
 margin-bottom: 15px; 
 }

 .info-title {
 font-size: 20px; 
 margin-bottom: 10px; 
 color: #000080; 
 font-weight: bold; 
 }
&lt;/style&gt;

&lt;div class="info"&gt;
 &lt;div class="info-title"&gt;Background&lt;/div&gt;
 &lt;p&gt;&lt;pre&gt;&lt;code&gt;I wrote this article back in uni as part of the seminar, &amp;quot;Basics of Machine Learning 1 &amp;amp; 2&amp;quot;. As such this text only introduces some basic concepts and is limited in scope.
&lt;/code&gt;&lt;/pre&gt;
&lt;/p&gt;
&lt;/div&gt;

&lt;h1 id="abstract"&gt;Abstract&lt;/h1&gt;
&lt;p&gt;In recent years, significant advancements have been made in the field of Machine Learning, particularly in the domain of image-related tasks. This paper aims to provide a comprehensive overview of Convolutional Neural Networks (CNNs), a powerful class of neural networks widely employed for image analysis and processing. In addition to that, this paper presents a self-trained CNN model specifically designed for digit classification. The model achieves solid performance in accurately classifying hand-drawn digits. By shedding light on the inner workings of CNNs and showcasing their practical application in digit classification, I seek to encourage further research and development in this domain.&lt;/p&gt;
&lt;h1 id="1-introduction"&gt;1. Introduction&lt;/h1&gt;
&lt;p&gt;A study revealed that over 24,000 GB of data is uploaded to the internet every second, from which approximately 80% consists of Video Data [1] . Consequently, a vast amount of visual data is generated each second, highlighting the significance of algorithms capable of comprehending visual information.&lt;/p&gt;
&lt;p&gt;Algorithms that can interpret visual data have various applications, including autonomous vehicles that rely on cameras to perceive the environment, analyze it, and make informed decisions based on the gathered data. Additionally, these algorithms are instrumental in fields such as skin cancer detection, robotics, crop disease detection, and more. Therefore, the development of algorithms that possess the ability to understand visual data is rather important.&lt;/p&gt;
&lt;h2 id="11-semantic-understanding-of-images-challenges-and-a-solution"&gt;1.1 Semantic Understanding Of Images: Challenges And A Solution&lt;/h2&gt;
&lt;p&gt;In computer systems, an image is represented as a matrix, where the size of the matrix corresponds to the dimensions of the image. For instance, if we have an Image with the size of 1920×1080 pixels then the Matrix representation will have the same size, with each entry in the Matrix representing a pixel value in the Image. In the case of a black-and-white image, a single matrix is sufficient to represent the image. However, for colored images, we require separate matrices for each color channel, typically represented by the Red, Green, Blue (RGB) values. Therefore, to represent a colored image, we need a tensor of size 3×1920×1080, so we have three matrices with the size 1920×1080.&lt;/p&gt;
&lt;p&gt;This matrix representation poses several challenges for algorithms aiming to understand images, including viewpoint variations, illumination changes, occlusions, background clutter, and more. For Instance, when viewing an image from different perspectives or under different lighting conditions, the semantic meaning remains the same, but the values within the matrix can change drastically.&lt;/p&gt;
&lt;p&gt;This brings us to the fundamental question: How can we develop algorithms that can effectively understand images despite the inherent variability in their representations?&lt;/p&gt;
&lt;p&gt;One Idea is instead of using rigid rules and handcrafted feature, we let the Computer learn the semantic meaning of Images.&lt;/p&gt;
&lt;h1 id="2-convolutional-neural-network"&gt;2. Convolutional Neural Network&lt;/h1&gt;
&lt;p&gt;The paper [2] proved that Neural Network serve as universal function approximator, capable of learning to approximate a given function. This property makes them a suitable candidate for training algorithms to achieve semantic understanding of images. However, as highlighted in this research paper [8], conventional neural networks are not optimally designed for learning visual data due to the following reasons:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;A fully connected Neural Network would take too many parameters, thus being computational very expensive to train.&lt;/li&gt;
&lt;li&gt;A fully connected Neural Network have no built-in invariance to image transformed like already named in subsection 1.1.&lt;/li&gt;
&lt;li&gt;fully connected Neural Networks ignore how the input is ordered, we could randomly map (fixed) input pixels to the first layer without affecting the training.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;A more effective approach is to utilize specialized architectures known as convolutional neural networks (CNNs), like introduced in [6], [7] and [8]. These CNNs address the limitations faced by traditional neural networks and provide improved performance in handling visual data.&lt;/p&gt;
&lt;p&gt;CNNs can learn to semantically understand images, instead of relying on handcrafted features or explicit rules. CNNs do that by learning a hierarchical representation from the raw pixel data, like seen in figure 1.&lt;/p&gt;


&lt;figure&gt;
 &lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width:80%" src="https://monkemanx.github.io/cnn_figures/cnn_features.png"&gt;
 &lt;figcaption&gt;Figure 1: Feature visualization of convolutional net trained on ImageNet from [10]. Images to the left are features extracted in earlier layers, while images to the right are features extracted in later layer. We can see earlier layer look for more simple patterns while later layer look for more complex pattern. Source: Alfredo Canziani Book Deep Learning.&lt;/figcaption&gt;
&lt;/figure&gt;


&lt;h1 id="21-convolutional-neural-network"&gt;2.1 Convolutional Neural Network&lt;/h1&gt;
&lt;p&gt;Convolutional neural networks (CNNs) combine several key ideas:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Local Receptive Fields: Each neuron in the Neural Network receives Input from neighboring neurons in a small local region of the previous layer.&lt;/li&gt;
&lt;li&gt;Weights Sharing: Neurons within the same layer share the same set of weights, as opposed to having individual weights for each neuron.&lt;/li&gt;
&lt;li&gt;Spatial Subsampling: Subsampling is performed based on region, reducing the dimension of the neural network.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The underlying concept of CNNs is inspired by the functioning of neurons in the visual cortex of animals and humans. This idea dates back to a paper by Hubel and Wiesel [3] in 1960. Where they demonstrated that neurons in the brain of a cat are hierarchically organized and possess local receptive fields. These local receptive fields enable the detection of elementary patterns such as edges, vertices, corners, and more.&lt;/p&gt;
&lt;p&gt;To implement this concept, weight sharing is employed. Neurons within the same layer share an identical set of weights, leading to a reduction in the number of parameters in the neural network. This set of weight is also called a filter/kernel. This not only makes training and usage of the network more computationally efficient, but also ensures that the network attends to the same patterns across the entire image. These elementary patterns, identified by the kernel, are also referred to as features and are crucial building blocks for the semantic understanding of the image.&lt;/p&gt;
&lt;p&gt;Subsequent layers in the network combine these elementary patterns to form more complex features. A collection of neurons within a layer is commonly referred to as a feature-/activation-map, where all neurons share the same set of weights. This design constraint enables the network to perform the same convolutional operation across different parts of the image.&lt;/p&gt;
&lt;p&gt;Within a single convolutional layer, multiple filter/kernel can be employed, each focusing on different features within the image. For instance, we could have one filter which focuses on detecting edges, while another filter identifies corners.&lt;/p&gt;
&lt;h2 id="22-convolutional-operation"&gt;2.2 Convolutional Operation&lt;/h2&gt;


&lt;figure&gt;
 &lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width:80%" src="https://monkemanx.github.io/cnn_figures/convolution_operation.png"&gt;
 &lt;figcaption&gt;Figure 2: Example of a convolution operation. We have an input matrix, take an input patch out of it, multiply it with the kernel matrix to get the first value of our output. To get the subsequent values, we take the next image patches and do the same process again. Source: Medium @draj0718&lt;/figcaption&gt;
&lt;/figure&gt;


&lt;p&gt;The convolutional operation in the 1-dimensional case with the input \(x\) and the weight matrix \(w\) can be expressed mathematically as follows:&lt;/p&gt;
$$
y_{i} = \sum_{j} w_{j} x_{i−j}
$$&lt;p&gt;This is the same as computing the i-th output of a dot product in reverse, in practice we just compute the standard dot product. Thus, the operation can also be understood as a matrix operation, where a weight matrix also known as filter/kernel, is multiplied with a corresponding section of the image matrix. For images as input, we use the two-dimensional formula for convolution:&lt;/p&gt;
$$
y_{ij} = \sum_{kl} w_{kl} x_{i+k}
$$&lt;p&gt;Where \(y_{ij}\) is an entry in the output matrix. This process is visually illustrated in the figure 2.&lt;/p&gt;
&lt;p&gt;The outcome of a single operation is the value assigned to a single neuron in the subsequent layer. By sliding a kernel over the entire image matrix and performing the convolution operation, we obtain the values for the subsequent layer, which are commonly referred to as the feature map.&lt;/p&gt;
&lt;p&gt;Two important hyperparameters are associated with the convolution operation:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The first is stride, which determines the number of pixel the kernel slides by during each operation. For example, a stride of 1 means that the sliding window moves 1 pixel at a time.&lt;/li&gt;
&lt;li&gt;The second Hyperparameter is the kernel size, which determines the dimensions of the kernel sliding over the input image. For instance, a kernel size of 4×4 indicates that we have a kernel matrix of size 4×4 that slides over the input matrix.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The kernel size can also be understood as the size of the local receptive field of the neurons.&lt;/p&gt;
&lt;h2 id="23-subsampling"&gt;2.3 Subsampling&lt;/h2&gt;
&lt;p&gt;Training an infinitely large neural network is not feasible due to the increasing computational costs associated with both training and inference. Therefore, it is essential to ensure that a network is not unnecessarily larger than necessary. One way to achieve this is by reducing the dimensions of the network layers, where the dimension means the number of neurons in a layer.&lt;/p&gt;
&lt;p&gt;To accomplish dimension reduction, subsampling techniques can be employed. Two popular subsampling methods are average pooling and max pooling.&lt;/p&gt;


&lt;figure&gt;
 &lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width:70%" src="https://monkemanx.github.io/cnn_figures/pooling.png"&gt;
 &lt;figcaption&gt;Figure 3: Demonstration of the max-pooling operation with stride 2 and filter size 2x2. We go over each image patch and take the highest value. Source: O’Reilly Media&lt;/figcaption&gt;
&lt;/figure&gt;


&lt;p&gt;In average pooling, similar to convolution layers, we slide over our image matrix and take the average of a neighborhood region in the Image and map it to a single neuron in the next layer. On the Figure 3 : Demonstration of the max-pooling operation with stride 2 and filter size 2x2. We go over each image patch and take the highest value. Source: O&amp;rsquo;Reilly Media other hand, in max pooling, the highest value within a neighborhood region is selected and mapped to a neuron in the subsequent layer. This can be seen as propagating only the most significant signal that excites a neuron while discarding the rest. This approach bears some resemblance to the way the brain processes information. Max pooling is generally more popular than average pooling.&lt;/p&gt;
&lt;p&gt;Both of these approached aid in reducing the dimension of the network.&lt;/p&gt;
&lt;h1 id="3-self-trained-cnn"&gt;3. Self-Trained CNN&lt;/h1&gt;
&lt;p&gt;In order to demonstrate the effectiveness of a CNN, I conducted an experiment where I trained a CNN from scratch to recognize black-and-white digits from images.&lt;/p&gt;
&lt;h2 id="31-dataset"&gt;3.1 Dataset&lt;/h2&gt;
&lt;p&gt;I trained my CNN using the MNIST dataset [8], the MNIST dataset is a collection of 70,000 hand-drawn digits. These digits have been normalized to fit within a 28×28 pixel bounding box and are gray scaled images. I choose this dataset due to its popularity within the machine learning community and its low computational requirements.&lt;/p&gt;
&lt;p&gt;The MNIST dataset is divided into 60,000 training images and 10,000 testing images. By default, the MNIST dataset consists of images with white digits on a black background. However, to enhance the usefulness of the dataset, I inverted the color of all images, making the background white and the digits black.&lt;/p&gt;


&lt;figure&gt;
 &lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width:70%" src="https://monkemanx.github.io/cnn_figures/sample_modified_dataset.png"&gt;
 &lt;figcaption&gt;Figure 4: Sample Data from the MNIST dataset after the preprocessing got applied, but before the color got inverted.&lt;/figcaption&gt;
&lt;/figure&gt;


&lt;p&gt;For the alternative models, I applied various additional transformations to the images. Firstly I randomly cropped images, this random cropping helps to augment the dataset, by introducing variation in digit position. Since not all digits are perfectly centered, it will help the model to generalize to different digit locations. Furthermore, I introduced random noise to the image, by sampling from a Bernoulli-Distribution with a probability of 0.7. By doing so, the hope is that the model becomes more robust to noise in the input data. An example of this preprocessing can be seen in figure 4.&lt;/p&gt;
&lt;h2 id="32-architecture"&gt;3.2 Architecture&lt;/h2&gt;


&lt;figure style="max-width: 100%; width: 15%; float: right; margin: 0 0 1em 1em;"&gt;
 &lt;div style="float: right; width: 100%;"&gt;
 &lt;img loading="lazy" src="https://monkemanx.github.io/cnn_figures/main_architecture.png" style="width: 100%;" alt="Description of the image"&gt;
 &lt;/div&gt;
 &lt;figcaption style="clear: both; text-align: center;"&gt;Figure 5: The architecture of the Baseline Model. General Matrix multiplication (Gemm) is the same as a fully connected layer.&lt;/figcaption&gt;
&lt;/figure&gt;


&lt;p&gt;The CNN architecture, like illustrated in Figure 5, consists of 5 layers with learnable weights. The initial 3 layers are convolutional, while the subsequent 2 layers are fully connected.&lt;/p&gt;
&lt;p&gt;The first convolutional layer takes a 28×28×1 image as input and applies 16 filters. The output of the first convolutional layer serves as the input for the second convolutional layer, which further processes it using 64 filters. Lastly, the third convolutional layer employs 16 filters. All convolutional layers employ a kernel size of 4 and a stride of 1.&lt;/p&gt;
&lt;p&gt;Following the convolutional layers, the fully connected layers contain 5776, 200, and 10 neurons, respectively. As activation function, Leaky ReLU is applied to all layers except the last one.&lt;/p&gt;
&lt;p&gt;The final layer&amp;rsquo;s output is passed through a 10-way softmax function, generating a probability distribution across 10 class labels. Each neuron in this layer corresponds to a specific digit label, where neuron 0 represents digit 0, neuron 1 represents digit 1, and so on.&lt;/p&gt;
&lt;h2 id="33-trainings-details"&gt;3.3 Trainings-Details&lt;/h2&gt;
&lt;p&gt;The model was trained using the backpropagation algorithm and the cross entropy loss function, which is commonly used for multi-class classification tasks.&lt;/p&gt;
&lt;p&gt;For efficient training, Google Colab was used, taking advantage of the free dedicated GPU to accelerate the training process.&lt;/p&gt;
&lt;p&gt;The CNN was trained for 5 epochs using a batch size of 1024. The total training time was approximately 5 minutes.&lt;/p&gt;
&lt;p&gt;As trainings optimizer, Adam was used with a learning rate of 0.001. Adam is a state-of-the-art optimizer known for its ability to adaptively adjust learning rates during training and the use of momentum [5]. The activation function used in the CNN was Leaky-ReLU, initialized with a slope of 0.2, this value was determined to be effective based on findings from the paper [9].&lt;/p&gt;
&lt;h2 id="34-results--ablation-study"&gt;3.4 Results &amp;amp; Ablation Study&lt;/h2&gt;
&lt;p&gt;As depicted in figure 6, the final CNN model, referred to as &amp;ldquo;Main&amp;rdquo; achieved a validation accuracy of approximately 98% and a validation loss of 1.5. The graph shows that the validation loss initially decreases and then stabilizes. This observation indicates that the CNN model has converged to its optimal state, and further training would only make the model overfit the dataset.&lt;/p&gt;
&lt;p&gt;To investigate further, I trained alternative models using various techniques to mitigate overfitting, as shown in figure 6 . Notably, the introduction of random noise and random cropping had a substantial negative impact on performance. This is to be expected given the increase of complexity in the training&amp;rsquo;s data.&lt;/p&gt;
&lt;p&gt;Furthermore, applying batch normalization [4], significantly improved the results. This makes sense because of the normalization process, which helps with mitigating the distribution shift caused by the random noise. It is also worth noting that the model seems to require a minimum of 16 filters, to produce good results, since reducing the number of filters down to 8 hinders performance considerably.&lt;/p&gt;


&lt;figure&gt;
 &lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width:90%" src="https://monkemanx.github.io/cnn_figures/loff_full.png"&gt;
 &lt;figcaption&gt;Figure 6: Following abbreviations apply RN = Applies random noise to the images in dataset while training, RC = Random cropping of the images in the dataset while training, BN = Uses Batch norm, 8f = Instead of using 16 filters for the convolutional layer it uses 8 filter.&lt;/figcaption&gt;
&lt;/figure&gt;


&lt;h1 id="4-conclusion--discussion"&gt;4. Conclusion &amp;amp; Discussion&lt;/h1&gt;
&lt;p&gt;This paper provides an overview of Convolutional Neural Network, including their definition and functionality. Additionally, a practical demonstration was conducted aimed to show the capabilities of CNNs and illustrate how a CNN architecture might look like. This serves as an example to showcase the effectiveness of CNNs and provide insight into their architectural structure.&lt;/p&gt;
&lt;p&gt;It would have been interesting to explore more alternative models to &amp;ldquo;Main&amp;rdquo;. For instance, in section 3.4, I theorized that at least 16 filters are required to achieve good results. However, it is not clear what would happen if I would use slightly fewer filter or doubled the number of filter? Another interesting question is the practical performance of the &amp;ldquo;RN RC BN&amp;rdquo; model and how it compares to the &amp;ldquo;Main&amp;rdquo; model. Are the introduced transformations realistic and beneficial in real-world applications, or do they hinder the model&amp;rsquo;s performance?&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;References:&lt;/p&gt;
&lt;p&gt;[1] K. Hornik, M. Stinchcombe, and H. White. Multilayer feedforward networks are universal ap- proximators. Neural Networks, 2(5):359-366, 1989. ISSN 0893-6080. doi: &lt;a href="https://doi.org/10.1016/0893-6080(89)90020-8"&gt;https://doi.org/10.1016/0893-6080(89)90020-8&lt;/a&gt;&lt;br&gt;
[2] D. H. Hubel and T. N. Wiesel. Receptive fields, binocular interaction and functional architec- ture in the cat&amp;rsquo;s visual cortex. The Journal of physiology, 160(1):106, 1962.&lt;br&gt;
[3] S. Ioffe and C. Szegedy. Batch normalization: Accelerating deep network training by reducing internal covariate shift. In International conference on machine learning, pages 448-456. pmlr, 2015.&lt;br&gt;
[4] D. P. Kingma and J. Ba. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980, 2014.&lt;br&gt;
[5] A. Krizhevsky, I. Sutskever, and G. E. Hinton. Imagenet classification with deep convo- lutional neural networks. In F. Pereira, C. Burges, L. Bottou, and K. Weinberger, edi- tors, Advances in Neural Information Processing Systems, volume 25. Curran Associates, Inc., 2012. URL&lt;br&gt;
[6] Y. LeCun, B. Boser, J. S. Denker, D. Henderson, R. E. Howard, W. Hubbard, and L. D. Jackel. Backpropagation applied to handwritten zip code recognition. Neural Computation, 1(4):541- 551, 1989. doi: 10.1162/neco.1989.1.4.541.&lt;br&gt;
[7] Y. Lecun, L. Bottou, Y. Bengio, and P. Haffner. Gradient-based learning applied to document recognition. Proceedings of the IEEE, 86(11):2278-2324, 1998. doi: 10.1109/5.726791.&lt;br&gt;
[8] B. Xu, N. Wang, T. Chen, and M. Li. Empirical evaluation of rectified activations in convolu- tional network. arXiv preprint arXiv:1505.00853, 2015.&lt;br&gt;
[9] M. D. Zeiler and R. Fergus. Visualizing and understanding convolutional networks. In Com- puter Vision-ECCV 2014: 13th European Conference, Zurich, Switzerland, September 6-12, 2014, Proceedings, Part I 13, pages 818-833. Springer, 2014.&lt;/p&gt;</description></item><item><title>How did I created my website?</title><link>https://monkemanx.github.io/articles/how_did_i_created_my_website/</link><pubDate>Tue, 19 Dec 2023 20:08:14 +0000</pubDate><author>monkeman@cock.li (MonkeMan)</author><guid>https://monkemanx.github.io/articles/how_did_i_created_my_website/</guid><description>&lt;style&gt;
 .warning {
 background-color: #ffe4e1; 
 padding: 15px; 
 border-radius: 5px; 
 margin-bottom: 15px; 
 }

 .warning-title {
 font-size: 20px; 
 margin-bottom: 10px; 
 color: #8b0000; 
 font-weight: bold; 
 }
&lt;/style&gt;

&lt;div class="warning"&gt;
 &lt;div class="warning-title"&gt;Info&lt;/div&gt;
 &lt;p&gt;This post is outdated, I do not use the theme specified in this post anymore.&lt;/p&gt;
&lt;/div&gt;

&lt;p&gt;This post primarily serves as documentation for my website. Additionally, if someone finds something useful here, they are welcome to use it. The entire source code, including blog posts and their digital signatures, can be found on &lt;a href="https://github.com/MonkeManX/monkemanx.github.io"&gt;GitHub&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;I created my website using three main components:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Server Host:&lt;/strong&gt; I utilize &lt;a href="https://pages.github.com/"&gt;Github-Pages&lt;/a&gt; for hosting. I choose GitHub Pages, because they are free and it&amp;rsquo;s really easy to upload files to it.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Website Framework:&lt;/strong&gt; The website is built using &lt;a href="https://gohugo.io/"&gt;Hugo&lt;/a&gt;, a static website generator. Hugo can generate a website from markdown files, making it really easy to add new content to the website.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Website-Theme:&lt;/strong&gt; I choose the &lt;a href="https://github.com/adityatelange/hugo-PaperMod"&gt;PaperMod&lt;/a&gt; theme for my Website. Hugo offers all kinds of different &lt;a href="https://github.com/topics/hugo-theme"&gt;themes&lt;/a&gt; one can use, I choose PaperMod since its simple and I like its look.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;One important disclaimer for those considering GitHub Pages: the repository must be public. If you prefer to use GitHub Pages with a private repository, you will need either GitHub Pro or Enterprise.&lt;/p&gt;
&lt;h1 id="installing-hugo"&gt;Installing Hugo&lt;/h1&gt;
&lt;p&gt;For a detailed guide on how to install Hugo, I recommend visiting the &lt;a href="https://gohugo.io/installation/"&gt;official Hugo website&lt;/a&gt;. If you have at any point difficulties installing Hugo, refer to that website for assistance.&lt;/p&gt;
&lt;p&gt;On Debian and Debian-based Operating System, such as Ubuntu, you can install Hugo using the &lt;code&gt;apt&lt;/code&gt; package manager. Open a terminal and type the following:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-sh" data-lang="sh"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;1&lt;/span&gt;&lt;span class="cl"&gt;sudo apt install hugo&lt;span class="sb"&gt;`&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;To verify the installed version of Hugo, you can use the following command:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-sh" data-lang="sh"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;1&lt;/span&gt;&lt;span class="cl"&gt;hugo version
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Keep in mind Debian, has a very slow release cycle. In my case, the installed version was not up-to-date, so I chose to uninstall it:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-sh" data-lang="sh"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;1&lt;/span&gt;&lt;span class="cl"&gt;sudo apt remove hugo
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Instead, I installed the latest Hugo version, by downloading the package directly from &lt;a href="https://github.com/gohugoio/hugo/releases"&gt;GitHub&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;For Windows users, Hugo can be installed using a package manager like &lt;em&gt;&lt;a href="https://chocolatey.org/"&gt;choco&lt;/a&gt;,&lt;/em&gt; &lt;em&gt;scoop&lt;/em&gt; or &lt;em&gt;winget&lt;/em&gt;.
For instance, to install Hugo via chocolate execute the following command:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-sh" data-lang="sh"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;1&lt;/span&gt;&lt;span class="cl"&gt;choco install hugo-extended
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h1 id="creating-a-project"&gt;Creating a Project&lt;/h1&gt;
&lt;p&gt;To start your Hugo project, you can refer to the &lt;a href="https://gohugo.io/getting-started/quick-start/"&gt;Hugo quickstart guide&lt;/a&gt; for guidance.&lt;/p&gt;
&lt;p&gt;We begin by establishing the folder structure for your Hugo project. Open a terminal in the desired folder for your project and create a new Hugo project with the following command:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-sh" data-lang="sh"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;1&lt;/span&gt;&lt;span class="cl"&gt;hugo new site &amp;lt;website_folder_name&amp;gt; --format yaml
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;I recommend including the &lt;code&gt;--format yaml&lt;/code&gt; argument when creating the project.
This ensures that the project configuration file is generated using a YAML format, which in my opinion, is more readable. However if you omit the &lt;code&gt;--format yaml&lt;/code&gt; argument, the configuration file will be generated in the &lt;code&gt;.toml&lt;/code&gt; format.&lt;/p&gt;
&lt;h1 id="installing-the-theme"&gt;Installing the Theme&lt;/h1&gt;
&lt;p&gt;Themes play a crucial role in determining the front-end design, overall appearance, and functionality of your website. They provide a collection of site layouts that make it easy to build a website. Numerous Hugo themes can be found on &lt;a href="https://github.com/topics/hugo-theme"&gt;GitHub&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;For my website, I choose the &lt;a href="https://github.com/adityatelange/hugo-PaperMod"&gt;PaperMod&lt;/a&gt; theme which features a clean modern design:&lt;/p&gt;


&lt;figure&gt;
 &lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width:100%" src="https://monkemanx.github.io/attachments/114303440-bfc0ae80-9aeb-11eb-8cfa-48a4bb385a6d.png"&gt;
 &lt;figcaption style="text-align:center"&gt;&lt;a href="https://github.com/adityatelange/hugo-PaperMod"&gt;Source&lt;/a&gt;&lt;/figcaption&gt;
&lt;/figure&gt;


&lt;p&gt;To install the PaperMod theme and ensure compatibility with GitHub Pages, use the &lt;a href="https://github.com/adityatelange/hugo-PaperMod/wiki/Installation"&gt;second installation method&lt;/a&gt;, which involves using git sub modules:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-fallback" data-lang="fallback"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;1&lt;/span&gt;&lt;span class="cl"&gt;git submodule add --depth=1 https://github.com/adityatelange/hugo-PaperMod.git themes/PaperMod
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;2&lt;/span&gt;&lt;span class="cl"&gt;git submodule update --init --recursive
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;If in the future you need to re clone your repository, remember to execute the second command again, s the submodule might not be included in the cloning process.&lt;/p&gt;
&lt;p&gt;To update the theme, use the following command:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-sh" data-lang="sh"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;1&lt;/span&gt;&lt;span class="cl"&gt;git submodule update --remote --merge
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;After installing the theme, you need to inform Hugo that you want to use the PaperMod theme. To do that, you need to edit the &lt;code&gt;hugo.yaml&lt;/code&gt; file and add the following line:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-yaml" data-lang="yaml"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;1&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="nt"&gt;theme&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;PaperMod&amp;#34;&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h1 id="the-project-structure"&gt;The Project Structure&lt;/h1&gt;
&lt;p&gt;After creating your project structure and installing a theme of your choice, your project structure should resemble the following:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-sh" data-lang="sh"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 1&lt;/span&gt;&lt;span class="cl"&gt;├───archetypes
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 2&lt;/span&gt;&lt;span class="cl"&gt;├───assets
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 3&lt;/span&gt;&lt;span class="cl"&gt;├───content
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 4&lt;/span&gt;&lt;span class="cl"&gt;├───data
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 5&lt;/span&gt;&lt;span class="cl"&gt;├───i18n
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 6&lt;/span&gt;&lt;span class="cl"&gt;├───layouts
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 7&lt;/span&gt;&lt;span class="cl"&gt;├───public
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 8&lt;/span&gt;&lt;span class="cl"&gt;├───static
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 9&lt;/span&gt;&lt;span class="cl"&gt;├───themes
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;10&lt;/span&gt;&lt;span class="cl"&gt;└───hugo.yml
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Key components of this structure include:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;content&lt;/code&gt;: This folder is used to store the content of your website. In here you save your markdown files, which will be used to generate the site.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;public&lt;/code&gt;: Hugo saves the built websites in this folder. It contains the final output of your website that can be deployed.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;static&lt;/code&gt;: This folder is used to store static data such as images or videos for your pages.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;themes&lt;/code&gt;: Here, the installed theme is saved. If you want to customize the appearance or behavior of the theme, you would make modifications in this folder.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;hugo.yml&lt;/code&gt;: This file is the general configuration file for your website. You can adjust various settings, such as the title of your website or the author information.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;For more thorough explanation, refer to the Hugo website &lt;a href="https://gohugo.io/getting-started/directory-structure/"&gt;guide on directory structure&lt;/a&gt;.&lt;/p&gt;
&lt;h1 id="configure-settings"&gt;Configure Settings&lt;/h1&gt;
&lt;h2 id="general-settings"&gt;General Settings&lt;/h2&gt;
&lt;p&gt;To tailor the behavior and appearance of your website, edit the &lt;code&gt;hugo.yml&lt;/code&gt; file within the project structure. All changes mentioned in this section will be made in that file unless specified otherwise. If you chose a different format during installation, the file name could be either &lt;code&gt;hugo.toml&lt;/code&gt; or &lt;code&gt;hugo.json&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;The first modification addresses privacy settings to align with &lt;a href="https://en.wikipedia.org/wiki/General_Data_Protection_Regulation"&gt;GDPR&lt;/a&gt; guidelines:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-yml" data-lang="yml"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 1&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="nt"&gt;privacy&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 2&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;disqus&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 3&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;disable&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 4&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;googleAnalytics&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 5&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;disable&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 6&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;instagram&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 7&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;disable&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 8&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;twitter&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 9&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;disable&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;10&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;vimeo&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;11&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;disable&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;12&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;youtube&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;13&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;disable&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;For enhanced website security, I use the following HTTP headers configurations:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-sh" data-lang="sh"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;1&lt;/span&gt;&lt;span class="cl"&gt;server:
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;2&lt;/span&gt;&lt;span class="cl"&gt; headers:
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;3&lt;/span&gt;&lt;span class="cl"&gt; - &lt;span class="k"&gt;for&lt;/span&gt;: /**
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;4&lt;/span&gt;&lt;span class="cl"&gt; values:
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;5&lt;/span&gt;&lt;span class="cl"&gt; Content-Security-Policy: script-src localhost:1313
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;6&lt;/span&gt;&lt;span class="cl"&gt; Referrer-Policy: strict-origin-when-cross-origin
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;7&lt;/span&gt;&lt;span class="cl"&gt; X-Content-Type-Options: nosniff
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;8&lt;/span&gt;&lt;span class="cl"&gt; X-Frame-Options: DENY
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;9&lt;/span&gt;&lt;span class="cl"&gt; X-XSS-Protection: 1&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nv"&gt;mode&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;block
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;For a more in depth guide on what these different configurations mean you can check out the awesome &lt;a href="https://cheatsheetseries.owasp.org/cheatsheets/HTTP_Headers_Cheat_Sheet.html"&gt;cheat-sheet from owsap&lt;/a&gt; on this topic.
Another useful tool in combination with that is the following website: &lt;a href="https://securityheaders.com/?q=https%3A%2F%2Fmonkemanx.github.io%2F&amp;amp;followRedirects=on"&gt;security-header&lt;/a&gt; which allows you to check if the HTTP headers of your website are really correctly configured.&lt;/p&gt;
&lt;h2 id="params-settings"&gt;Params Settings&lt;/h2&gt;
&lt;p&gt;The following section is about the &lt;code&gt;params&lt;/code&gt; section of the configuration file. If the &lt;code&gt;params&lt;/code&gt; section doesn&amp;rsquo;t exist, create it in the configuration file. Refer to my complete &lt;code&gt;hugo.yml&lt;/code&gt; file for more details.&lt;/p&gt;
&lt;p&gt;Here are some other neat settings I found, some of them are from Hugo others are from my theme:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;howReadingTime: true&lt;/code&gt;: Provides an estimate of how long it would take to read each post.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;ShowCodeCopyButtons: true&lt;/code&gt;: Allows copying of code from code blocks with a button press.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;ShowWordCount: true&lt;/code&gt;: Displays the number of words at the top of each post.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;ShowRssButtonInSectionTermList: true&lt;/code&gt;: Adds an RSS icon to the archive page.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Refer to the &lt;a href="https://github.com/adityatelange/hugo-PaperMod/wiki/Variables"&gt;PapersMod variables&lt;/a&gt; for additional settings.&lt;/p&gt;
&lt;h2 id="menu"&gt;Menu&lt;/h2&gt;
&lt;p&gt;Finally, I adjusted the website menu by modifying the menu section. The example below illustrates the menu:&lt;/p&gt;


&lt;figure&gt;
 &lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width:80%" src="https://monkemanx.github.io/attachments/2023-12-21_22-50.png"&gt;
&lt;/figure&gt;


&lt;p&gt;To archive a menu like shown above, the first thing you need to do is add the following to the &lt;code&gt;hugo.yaml&lt;/code&gt;:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-yml" data-lang="yml"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 1&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="nt"&gt;menu&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 2&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;main&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 3&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="nt"&gt;identifier&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;home&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 4&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;Home&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 5&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;url&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;/posts/&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 6&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;weight&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="m"&gt;10&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 7&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="nt"&gt;identifier&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;about&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 8&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;About&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 9&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;url&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;/about&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;10&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;weight&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="m"&gt;20&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;11&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="nt"&gt;identifier&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;tags&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;12&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;Posts by Tags&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;13&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;url&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;/tags/&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;14&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;weight&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="m"&gt;30&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;15&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="nt"&gt;identifier&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;archive&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;16&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;Archive&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;17&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;url&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;archives&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;18&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;weight&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="m"&gt;40&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The &lt;code&gt;identifier&lt;/code&gt; is a unique name for every item in the menu, the &lt;code&gt;url&lt;/code&gt; describes the location the link in the menu leads to, keep in mind the URLs starts implicit already in the &lt;code&gt;content&lt;/code&gt; folder.
The weight &lt;code&gt;describes&lt;/code&gt; the physical location of the menu, with it you can order the menus into a custom order.&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;home&lt;/code&gt; button leads back to the homepage, which shows an overview of my recent blog posts:&lt;/p&gt;


&lt;figure&gt;
 &lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width:80%" src="https://monkemanx.github.io/attachments/Screenshot%20from%202023-12-21%2022-58-11.png"&gt;
&lt;/figure&gt;


&lt;p&gt;The &lt;code&gt;About&lt;/code&gt; button leads to a site, which describes what the website is about, this page is also not visible in the archive or on the homepage:&lt;/p&gt;


&lt;figure&gt;
 &lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width:80%" src="https://monkemanx.github.io/attachments/Screenshot%20from%202023-12-21%2022-58-29.png"&gt;
&lt;/figure&gt;


&lt;p&gt;The &lt;code&gt;tags&lt;/code&gt; button leads to a site, where one can search for posts by tags:&lt;/p&gt;


&lt;figure&gt;
 &lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width:80%" src="https://monkemanx.github.io/attachments/Screenshot%20from%202023-12-21%2022-58-49.png"&gt;
&lt;/figure&gt;


&lt;p&gt;The &lt;code&gt;Archive&lt;/code&gt; button leads to a site, which depicts all posted posts by time they were posted, you can see here an example:&lt;/p&gt;


&lt;figure&gt;
 &lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width:80%" src="https://monkemanx.github.io/attachments/Screenshot%20from%202023-12-21%2022-59-02.png"&gt;
&lt;/figure&gt;


&lt;p&gt;For the archive site to work properly, you need to create a &lt;code&gt;archives.md&lt;/code&gt; file in the &lt;code&gt;content&lt;/code&gt; folder, with the following lines in it:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-md" data-lang="md"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;1&lt;/span&gt;&lt;span class="cl"&gt;+++
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;2&lt;/span&gt;&lt;span class="cl"&gt;title = &amp;#34;Archive&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;3&lt;/span&gt;&lt;span class="cl"&gt;layout = &amp;#34;archives&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;4&lt;/span&gt;&lt;span class="cl"&gt;url = &amp;#34;/archives/&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;5&lt;/span&gt;&lt;span class="cl"&gt;summary = &amp;#34;archives&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;6&lt;/span&gt;&lt;span class="cl"&gt;+++
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Everything between the pluses is called &lt;a href="https://gohugo.io/content-management/front-matter/"&gt;front matter&lt;/a&gt; and is used to embed meta information about the file.&lt;/p&gt;
&lt;h2 id="summary"&gt;Summary&lt;/h2&gt;
&lt;p&gt;In summary my complete &lt;code&gt;hugo.yml&lt;/code&gt; file is the following:
&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;Click here to show it&lt;/summary&gt;
 
 &lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-yml" data-lang="yml"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 1&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="nt"&gt;baseURL&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;&amp;#39;&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 2&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="nt"&gt;title&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;Title-of-Website&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 3&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="nt"&gt;languageCode&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;en-us&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 4&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="nt"&gt;theme&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;PaperMod&amp;#34;&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 5&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 6&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="nt"&gt;privacy&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 7&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;disqus&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 8&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;disable&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 9&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;googleAnalytics&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;10&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;disable&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;11&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;instagram&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;12&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;disable&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;13&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;twitter&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;14&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;disable&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;15&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;vimeo&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;16&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;disable&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;17&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;youtube&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;18&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;disable&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;19&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;20&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="nt"&gt;server&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;21&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;headers&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;22&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="nt"&gt;for&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;/**&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;23&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;values&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;24&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;Content-Security-Policy&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;script-src localhost:1313&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;25&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;Referrer-Policy&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;strict-origin-when-cross-origin&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;26&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;X-Content-Type-Options&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;nosniff&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;27&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;X-Frame-Options&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;DENY&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;28&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;X-XSS-Protection&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="m"&gt;1&lt;/span&gt;&lt;span class="l"&gt;; mode=block&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;29&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;30&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="nt"&gt;params&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;31&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;MonkeMan&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;32&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;email&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;WiseServiceScholar@protonmail.com&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;33&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;ShowRssButtonInSectionTermList&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;34&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;description&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;The Personel Blog of MonkeMan&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;35&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;keyword&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;blog&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;36&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;ShowReadingTime&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;37&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;ShowShareButtons&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;38&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;ShowWordCount&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;39&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;ShowCodeCopyButtons&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;40&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;41&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="nt"&gt;menu&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;42&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;main&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;43&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="nt"&gt;identifier&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;home&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;44&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;Home&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;45&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;url&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;/posts/&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;46&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;weight&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="m"&gt;10&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;47&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="nt"&gt;identifier&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;about&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;48&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;About&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;49&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;url&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;/about&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;50&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;weight&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="m"&gt;20&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;51&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="nt"&gt;identifier&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;tags&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;52&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;Posts by Tags&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;53&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;url&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;/tags/&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;54&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;weight&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="m"&gt;30&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;55&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="nt"&gt;identifier&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;archive&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;56&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;Archive&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;57&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;url&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;archives&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;58&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;weight&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="m"&gt;40&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;59&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
 
&lt;/details&gt;

&lt;/p&gt;
&lt;h1 id="adding-content-to-your-website"&gt;Adding Content to Your Website&lt;/h1&gt;
&lt;p&gt;Adding content to your website involves creating new pages, blog posts, or sections. As demonstrated in the previous section, you can include these in the menu by updating the &lt;code&gt;hugo.yml&lt;/code&gt; file.&lt;/p&gt;
&lt;p&gt;To add an About page to the menu, execute the following command:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-sh" data-lang="sh"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;1&lt;/span&gt;&lt;span class="cl"&gt;hugo new about.md
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Remember to be in the project folder when running this command. The file will be created in the content directory. Edit the &lt;code&gt;about.md&lt;/code&gt; file to add content to the About page. For example:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-md" data-lang="md"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;1&lt;/span&gt;&lt;span class="cl"&gt;+++
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;2&lt;/span&gt;&lt;span class="cl"&gt;title = &amp;#39;About&amp;#39;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;3&lt;/span&gt;&lt;span class="cl"&gt;date = 2023-12-21T20:00:07+01:00
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;4&lt;/span&gt;&lt;span class="cl"&gt;draft = true
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;5&lt;/span&gt;&lt;span class="cl"&gt;hiddenInHomelist = true
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;6&lt;/span&gt;&lt;span class="cl"&gt;+++
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;7&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="gh"&gt;# About
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;8&lt;/span&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;9&lt;/span&gt;&lt;span class="cl"&gt;I am a very cool guy!
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;To create a new blog post visible on the homepage and in the archive, use the command:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-sh" data-lang="sh"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;1&lt;/span&gt;&lt;span class="cl"&gt;hugo new posts/new-cool-post.md
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This will create a markdown file &lt;code&gt;new-cool-post.md&lt;/code&gt;, in the &lt;code&gt;content/posts&lt;/code&gt; folder.&lt;/p&gt;
&lt;p&gt;To make blog posts discoverable by tags, you can include tags in the front matter of the post. Like this:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-fallback" data-lang="fallback"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;1&lt;/span&gt;&lt;span class="cl"&gt;+++
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;2&lt;/span&gt;&lt;span class="cl"&gt;tags = [&amp;#34;my-first-cool-tag&amp;#34;, &amp;#34;my-second-cool-tag&amp;#34;]
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;3&lt;/span&gt;&lt;span class="cl"&gt;+++
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;To add an image to a page, place the image in the static folder and reference it in the markdown file:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-fallback" data-lang="fallback"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;1&lt;/span&gt;&lt;span class="cl"&gt;![name_of_image](/name_of_image.png)
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;In the &lt;code&gt;frontmatter&lt;/code&gt; of your markdown file you can change a bunch of setting on how the post will appear. Some useful settings include:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;tags&lt;/code&gt;, If you want that your blog post are discoverable by tags&lt;/li&gt;
&lt;li&gt;&lt;code&gt;hiddenInHomelist&lt;/code&gt;, If you want to hide some blog post&lt;/li&gt;
&lt;li&gt;&lt;code&gt;drafts&lt;/code&gt;, set this to false for deployment, hugo doesn&amp;rsquo;t build draft files to html sites.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Refer to &lt;a href="https://github.com/adityatelange/hugo-PaperMod/wiki/Variables"&gt;PaperMod Variables&lt;/a&gt; for more front matter settings.&lt;/p&gt;
&lt;p&gt;When ready to build your site, run:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-sh" data-lang="sh"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;1&lt;/span&gt;&lt;span class="cl"&gt;hugo serve
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;To include drafts in the build, add the &lt;code&gt;--buildDrafts&lt;/code&gt; option.
Hugo will spin up a webserver hosting your website, you can access it through &lt;code&gt;localhost:1313&lt;/code&gt;.&lt;/p&gt;
&lt;h2 id="shortcodes"&gt;Shortcodes&lt;/h2&gt;
&lt;p&gt;Shortcodes in Hugo are like custom tags that you can use to extend the functionality of your content. They allow you to embed dynamic elements or execute custom logic within your markdown files.&lt;/p&gt;
&lt;h3 id="details-shortcode"&gt;Details Shortcode&lt;/h3&gt;
&lt;p&gt;In my case, I wanted a shortcode named &lt;code&gt;details&lt;/code&gt; to generate foldable markdown boxes. Like this:
I wanted a shortcode which would allow me to use foldable markdown box:&lt;/p&gt;


&lt;figure&gt;
 &lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width:60%" src="https://monkemanx.github.io/attachments/Screenshot%20from%202023-12-23%2017-33-45.png"&gt;
&lt;/figure&gt;


&lt;p&gt;Here&amp;rsquo;s a brief explanation of how it works:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Shortcodes are stored in the &lt;code&gt;/layouts/shortcodes/&lt;/code&gt; directory. The shortcode file, &lt;code&gt;details.html&lt;/code&gt;, contains HTML and Hugo templating code.&lt;/li&gt;
&lt;li&gt;Shortcodes can take parameters to customize their behavior. In the details shortcode, we use a parameters: &lt;code&gt;$summary&lt;/code&gt; for the summary text.&lt;/li&gt;
&lt;li&gt;To use the &lt;code&gt;details&lt;/code&gt; shortcode, you include it in your markdown content with &lt;code&gt;\{\{&amp;lt; details ... &amp;gt;\}\}&lt;/code&gt;(without the backslashes).&lt;/li&gt;
&lt;/ol&gt;
&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;The full `details.html` code&lt;/summary&gt;
 
 &lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-html" data-lang="html"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 1&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;style&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 2&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="c"&gt;/* Style for the details element */&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 3&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="nt"&gt;details&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 4&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;border&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="kt"&gt;px&lt;/span&gt; &lt;span class="kc"&gt;solid&lt;/span&gt; &lt;span class="mh"&gt;#3498db&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c"&gt;/* Change border color to a noticeable color, e.g., blue */&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 5&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;border-radius&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;8&lt;/span&gt;&lt;span class="kt"&gt;px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 6&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;margin&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;20&lt;/span&gt;&lt;span class="kt"&gt;px&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 7&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;padding&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;15&lt;/span&gt;&lt;span class="kt"&gt;px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 8&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;background-color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mh"&gt;#f2f2f2&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c"&gt;/* Add a light background color */&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 9&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;overflow&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;hidden&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c"&gt;/* Hide the content initially */&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;10&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;transition&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="k"&gt;max-height&lt;/span&gt; &lt;span class="mf"&gt;0.5&lt;/span&gt;&lt;span class="kt"&gt;s&lt;/span&gt; &lt;span class="kc"&gt;ease-out&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c"&gt;/* Add a transition effect */&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;11&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;max-height&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;70&lt;/span&gt;&lt;span class="kt"&gt;px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c"&gt;/* Set a max-height value to determine the collapsed height */&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;12&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="p"&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;13&lt;/span&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;14&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="c"&gt;/* Style for the summary element */&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;15&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="nt"&gt;summary&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;16&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;font-weight&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;bold&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;17&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;cursor&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;pointer&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;18&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mh"&gt;#3498db&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c"&gt;/* Match the border color for consistency */&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;19&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="p"&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;20&lt;/span&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;21&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="c"&gt;/* Style for the content inside the details element */&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;22&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;collapsible-content&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;23&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;margin-top&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="kt"&gt;px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;24&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="p"&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;25&lt;/span&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;26&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="c"&gt;/* Expand the details when it&amp;#39;s open */&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;27&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="nt"&gt;details&lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="nt"&gt;open&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;28&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;max-height&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;500&lt;/span&gt;&lt;span class="kt"&gt;px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c"&gt;/* Set a higher value for the expanded height */&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;29&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="p"&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;30&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;style&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;31&lt;/span&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;32&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;details&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;33&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;summary&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;{{ (.Get 0) | markdownify }}&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;summary&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;34&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt; &lt;span class="na"&gt;class&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;&amp;#34;collapsible-content&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;35&lt;/span&gt;&lt;span class="cl"&gt; {{ .Inner | markdownify }}
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;36&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;37&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;details&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
 
&lt;/details&gt;


&lt;p&gt;An usage example in a blog post(again without the backslashes):&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-markdown" data-lang="markdown"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;1&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="gh"&gt;# This is my cool blog
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;2&lt;/span&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;3&lt;/span&gt;&lt;span class="cl"&gt;I have a lot to say, look at this:
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;4&lt;/span&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;5&lt;/span&gt;&lt;span class="cl"&gt;\{\{&amp;lt; details &amp;#34;This is the summary&amp;#34; &amp;gt;\}\}
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;6&lt;/span&gt;&lt;span class="cl"&gt;Collapsed text
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;7&lt;/span&gt;&lt;span class="cl"&gt;\{\{&amp;lt; /details &amp;gt;\}\}
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;8&lt;/span&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;9&lt;/span&gt;&lt;span class="cl"&gt;And here I have more to say.
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id="warning-shortcode"&gt;Warning Shortcode&lt;/h3&gt;
&lt;p&gt;Another shortcode I added was the warnings shortcode this is basically a red box with title and some kind of content:
&lt;style&gt;
 
 details {
 border: 2px solid #3498db; 
 border-radius: 8px;
 margin: 20px 0;
 padding: 15px;
 background-color: #f2f2f2; 
 overflow: hidden; 
 transition: max-height 0.5s ease-out; 
 }

 
 summary {
 font-weight: bold;
 cursor: pointer;
 color: #3498db; 
 }

 
 .collapsible-content {
 margin-top: 10px;
 }
&lt;/style&gt;






&lt;details &gt;
 &lt;summary&gt;The full `warning.html` code&lt;/summary&gt;
 
 &lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-html" data-lang="html"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 1&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="c"&gt;&amp;lt;!-- layouts/shortcodes/warning.html --&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 2&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;style&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 3&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;warning&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 4&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;background-color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mh"&gt;#ffe4e1&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c"&gt;/* Light pink background color */&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 5&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;padding&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;15&lt;/span&gt;&lt;span class="kt"&gt;px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c"&gt;/* Padding inside the box */&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 6&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;border-radius&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="kt"&gt;px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c"&gt;/* Rounded corners */&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 7&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;margin-bottom&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;15&lt;/span&gt;&lt;span class="kt"&gt;px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c"&gt;/* Margin at the bottom for spacing */&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 8&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="p"&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 9&lt;/span&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;10&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;warning-title&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;11&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;font-size&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;20&lt;/span&gt;&lt;span class="kt"&gt;px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c"&gt;/* Title font size */&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;12&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;margin-bottom&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="kt"&gt;px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c"&gt;/* Margin below the title */&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;13&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mh"&gt;#8b0000&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c"&gt;/* Dark red text color */&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;14&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;font-weight&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;bold&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c"&gt;/* Bold text */&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;15&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="p"&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;16&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;style&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;17&lt;/span&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;18&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt; &lt;span class="na"&gt;class&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;&amp;#34;warning&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;19&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt; &lt;span class="na"&gt;class&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;&amp;#34;warning-title&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;{{ .Get 0 | markdownify | safeHTML }}&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;20&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;p&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;{{ .Inner}}&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;p&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;21&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
 
&lt;/details&gt;

&lt;/p&gt;
&lt;h2 id="images-and-adding-captions"&gt;Images and Adding Captions&lt;/h2&gt;
&lt;p&gt;In Hugo, adding captions to images can be achieved using custom render hooks. Here&amp;rsquo;s a step-by-step guide:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Edit the file(or create it) named &lt;code&gt;render-image.html&lt;/code&gt; in the /&lt;code&gt;themes/PaperMod/layouts/_default/_markup&lt;/code&gt; directory. Add the following custom code:
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-sh" data-lang="sh"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 1&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="o"&gt;{{&lt;/span&gt; &lt;span class="k"&gt;if&lt;/span&gt; .Title &lt;span class="o"&gt;}}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 2&lt;/span&gt;&lt;span class="cl"&gt; &amp;lt;figure &lt;span class="nv"&gt;class&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;latex-figure&amp;#34;&lt;/span&gt;&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 3&lt;/span&gt;&lt;span class="cl"&gt; &amp;lt;img &lt;span class="nv"&gt;loading&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;lazy&amp;#34;&lt;/span&gt; &lt;span class="nv"&gt;src&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;{{ .Destination | safeURL }}&amp;#34;&lt;/span&gt; &lt;span class="nv"&gt;alt&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;{{ .Text }}&amp;#34;&lt;/span&gt;&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 4&lt;/span&gt;&lt;span class="cl"&gt; &amp;lt;figcaption&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 5&lt;/span&gt;&lt;span class="cl"&gt; &amp;lt;p&amp;gt;&lt;span class="o"&gt;{{&lt;/span&gt; .Title &lt;span class="p"&gt;|&lt;/span&gt; markdownify &lt;span class="o"&gt;}}&lt;/span&gt;&amp;lt;/p&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 6&lt;/span&gt;&lt;span class="cl"&gt; &amp;lt;/figcaption&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 7&lt;/span&gt;&lt;span class="cl"&gt; &amp;lt;/figure&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 8&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="o"&gt;{{&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="o"&gt;}}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 9&lt;/span&gt;&lt;span class="cl"&gt; &amp;lt;img &lt;span class="nv"&gt;loading&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;lazy&amp;#34;&lt;/span&gt; &lt;span class="nv"&gt;src&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;{{ .Destination | safeURL }}&amp;#34;&lt;/span&gt; &lt;span class="nv"&gt;alt&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;{{ .Text }}&amp;#34;&lt;/span&gt;&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;10&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="o"&gt;{{&lt;/span&gt; end &lt;span class="o"&gt;}}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;Now, when you add an image in your markdown, you can include a caption using the &lt;code&gt;![Alt Text](Image URL &amp;quot;Caption&amp;quot;)&lt;/code&gt; syntax. For example:
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-markdown" data-lang="markdown"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;1&lt;/span&gt;&lt;span class="cl"&gt;![&lt;span class="nt"&gt;monke&lt;/span&gt;](&lt;span class="na"&gt;/monke.jpg &amp;#34;test suopper cool caption&amp;#34;&lt;/span&gt;)
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;To add a image source to your Image:
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-markdown" data-lang="markdown"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;1&lt;/span&gt;&lt;span class="cl"&gt;![&lt;span class="nt"&gt;monke&lt;/span&gt;](&lt;span class="na"&gt;/monke.jpg &amp;#34;Test [source](https://google.com&lt;/span&gt;)&amp;#34;)
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;If needed you can adjust the CSS styling in the &lt;code&gt;render-image.html&lt;/code&gt; file.&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id="html-content-and-custom-css"&gt;HTML Content and custom CSS&lt;/h2&gt;
&lt;p&gt;If you already have finished html files that you want to add to your blog, you can add them to your content folder liek your markdown files. In order for them to be dispalyed correctly you need to add a front-matter section:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-html" data-lang="html"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;1&lt;/span&gt;&lt;span class="cl"&gt;+++
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;2&lt;/span&gt;&lt;span class="cl"&gt;title = &amp;#39;Title&amp;#39;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;3&lt;/span&gt;&lt;span class="cl"&gt;date = 2023-12-22T00:32:40+01:00
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;4&lt;/span&gt;&lt;span class="cl"&gt;draft = true
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;If you want to add some custom CSS code to &lt;strong&gt;all&lt;/strong&gt; your sites/posts, you can do this by creating a &lt;code&gt;.css&lt;/code&gt; file in the folder &lt;code&gt;assets/css/extended&lt;/code&gt;, all the CSS code in this file will be applied to all pages.&lt;/p&gt;
&lt;p&gt;If you want to add some custom CSS code to a &lt;strong&gt;single&lt;/strong&gt; site, you can do this by creating a custom &lt;code&gt;.css&lt;/code&gt; file in your &lt;code&gt;static&lt;/code&gt; folder, after which you need to edit the &lt;code&gt;single.html&lt;/code&gt; in the &lt;code&gt;themes/YOUR_THEME/layout/_default/&lt;/code&gt; folder and add the following section to it:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-md" data-lang="md"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;1&lt;/span&gt;&lt;span class="cl"&gt;{{ with .Params.custom_css }}
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;2&lt;/span&gt;&lt;span class="cl"&gt; {{- $customCSSPath := printf &amp;#34;%s.css&amp;#34; . }}
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;3&lt;/span&gt;&lt;span class="cl"&gt; &amp;lt;link rel=&amp;#34;stylesheet&amp;#34; href=&amp;#34;{{ $customCSSPath | absURL }}&amp;#34;&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;4&lt;/span&gt;&lt;span class="cl"&gt;{{ end }}
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The last thing you need to do it to edit the front matter of the html file to which you want to apply your custom css:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-md" data-lang="md"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;1&lt;/span&gt;&lt;span class="cl"&gt;+++
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;2&lt;/span&gt;&lt;span class="cl"&gt;title = &amp;#39;title&amp;#39;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;3&lt;/span&gt;&lt;span class="cl"&gt;date = 2023-12-22T00:32:40+01:00
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;4&lt;/span&gt;&lt;span class="cl"&gt;draft = true
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;5&lt;/span&gt;&lt;span class="cl"&gt;custom_css = &amp;#34;your_custom_cdd&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;6&lt;/span&gt;&lt;span class="cl"&gt;+++
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h1 id="comments"&gt;Comments&lt;/h1&gt;
&lt;p&gt;Adding comments or guest books to static sites, especially those hosted on platforms like GitHub Pages, can be challenging due to the lack of server-side processing like the lack of PHP or databases. I looked at some different options:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Self-Made Code:&lt;/strong&gt; Many traditional comment systems, like those using PHP, require server-side processing, which is not supported on GitHub Pages.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;External Hosting:&lt;/strong&gt; Some third-party services offer comment systems that work with static sites. Examples of this are Disquis or Commento. But such sites have often times privacy concerns&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;As such I didn&amp;rsquo;t add any commenting feature to my website.&lt;/p&gt;
&lt;h1 id="conclusion"&gt;Conclusion&lt;/h1&gt;
&lt;p&gt;I hope this quick tutorial could help whomever read this through their journey of hosting a website.
I will try to keep this post up to date with my changing website, but I might forget to.&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;References:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://sebastiandedeyne.com/captioned-images-with-markdown-render-hooks-in-hugo/"&gt;https://sebastiandedeyne.com/captioned-images-with-markdown-render-hooks-in-hugo/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://gohugo.io/"&gt;https://gohugo.io/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://pages.github.com/"&gt;https://pages.github.com/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://cheatsheetseries.owasp.org/cheatsheets/HTTP_Headers_Cheat_Sheet.html"&gt;https://cheatsheetseries.owasp.org/cheatsheets/HTTP_Headers_Cheat_Sheet.html&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/adityatelange/hugo-PaperMod"&gt;https://github.com/adityatelange/hugo-PaperMod&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>My Homelab Part 0: Prologue</title><link>https://monkemanx.github.io/articles/my_homelab_part_0_prologue/</link><pubDate>Sat, 16 Dec 2023 10:13:35 +0000</pubDate><author>monkeman@cock.li (MonkeMan)</author><guid>https://monkemanx.github.io/articles/my_homelab_part_0_prologue/</guid><description>&lt;p&gt;Lately, maintaining a consistent sleeping schedule has posed big challenge for me.
Different university courses have lead me to wake up on some days as early as 6 a.m., while on other days, I&amp;rsquo;ve found myself rising as late as 12. p.m .
This irregular sleeping schedule has been quite a struggle, especially on days where I had to get up early.
My body, accustomed to my late-night schedule, could never fall asleep soon enough for a well-rested morning.&lt;/p&gt;


&lt;figure&gt;
 &lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width:80%" src="https://monkemanx.github.io/attachments/insomnia.png"&gt;
 &lt;figcaption style="text-align:center"&gt;&lt;a href="https://imgs.xkcd.com/comics/insomnia.png"&gt;Source&lt;/a&gt;&lt;/figcaption&gt;
&lt;/figure&gt;


&lt;p&gt;Thus I decided to establish a more consistent sleep schedule by waking up early on every weekday.
The big question was how could I make this happen?&lt;/p&gt;
&lt;p&gt;The solution I arrived at consisted of three parts:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Shutting down my computer early&lt;/li&gt;
&lt;li&gt;A phone free bedroom&lt;/li&gt;
&lt;li&gt;Light as Sleep-Wake Signal&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id="early-shutdown-of-computer"&gt;Early Shutdown of Computer&lt;/h2&gt;
&lt;p&gt;I often caught myself watching YouTube videos after YouTube video late into the night, even when I knew that I should have gone to bed long ago.
In an attempt to stop this behavior, I came up with the idea of automatically shutting down my computer on a schedule.&lt;/p&gt;
&lt;p&gt;Implementing this was straightforward.
Given that I use Linux(Debian 12) as operating system for my Computer, I could use use &lt;a href="https://en.wikipedia.org/wiki/Cron"&gt;cron&lt;/a&gt; to automatically shutdown my computer on a specified schedule.&lt;/p&gt;
&lt;p&gt;To achieve this, I first needed to edit the crontab file - the crontab file is a configuration file that is responsible for storing all the scheduled jobs the cron daemon executes.
Users have the option to use their own crontab file or utilize the system-wide crontab file.&lt;/p&gt;
&lt;p&gt;To access and edit the crontab file, the following command is used:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-sh" data-lang="sh"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;1&lt;/span&gt;&lt;span class="cl"&gt;sudo crontab -e
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The usage of &lt;code&gt;sudo&lt;/code&gt; is particularly noteworthy. This grants the necessary privileges to edit the crontab file of the root user. Omitting the &lt;code&gt;sudo&lt;/code&gt; would mean editing the crontab file of the current user. This is important because the shutdown commands requires sudo privileges for execution.&lt;/p&gt;
&lt;p&gt;Upon executing the above command, users can then input the desired command to be executed to a specific schedule, following the syntax:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-fallback" data-lang="fallback"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;1&lt;/span&gt;&lt;span class="cl"&gt;# ┌───────────── minute (0–59)
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;2&lt;/span&gt;&lt;span class="cl"&gt;# │ ┌───────────── hour (0–23)
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;3&lt;/span&gt;&lt;span class="cl"&gt;# │ │ ┌───────────── day of the month (1–31)
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;4&lt;/span&gt;&lt;span class="cl"&gt;# │ │ │ ┌───────────── month (1–12)
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;5&lt;/span&gt;&lt;span class="cl"&gt;# │ │ │ │ ┌───────────── day of the week (0–6) (Sunday to Saturday;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;6&lt;/span&gt;&lt;span class="cl"&gt;# │ │ │ │ │ 7 is also Sunday on some systems)
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;7&lt;/span&gt;&lt;span class="cl"&gt;# │ │ │ │ │
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;8&lt;/span&gt;&lt;span class="cl"&gt;# │ │ │ │ │
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;9&lt;/span&gt;&lt;span class="cl"&gt;# * * * * * &amp;lt;command to execute&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;To ensure correctness in the syntax, a helpful tool is is &lt;a href="https://crontab.guru/"&gt;grontab guru&lt;/a&gt;.
This tool enables users to validate the syntax and show its semantic meaning.&lt;/p&gt;
&lt;p&gt;For my particularly use case, I inserted the following line into the crontab file:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-sh" data-lang="sh"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;1&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="m"&gt;45&lt;/span&gt; &lt;span class="m"&gt;21&lt;/span&gt; * * 0-4 systemctl shutdown
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This command will shutdown my computer on 21:45 on every day of the week from Sunday to Thursday.
This should work on all Linux operating systems that use &lt;a href="https://en.wikipedia.org/wiki/Systemd"&gt;Systemd&lt;/a&gt; such as fedora, debian, ubuntu, arc and ect.&lt;/p&gt;


&lt;figure&gt;
 &lt;img style="display: block; margin-left: auto; margin-right: auto; width:40%" src="https://monkemanx.github.io/attachments/Strip-Mr-CRON-550-finalenglish.jpg"&gt;
 &lt;figcaption style="text-align:center"&gt;&lt;a href="https://www.commitstrip.com/en/2013/09/23/et-sil-etait-humain/?"&gt;Source&lt;/a&gt;&lt;/figcaption&gt;
&lt;/figure&gt;


&lt;h2 id="a-phone-free-bedroom"&gt;A phone free bedroom&lt;/h2&gt;
&lt;p&gt;Implementing a phone-free bedroom has brought another very positive change in my routine.
Previously, I found myself often glued to the screen for long period of times.&lt;/p&gt;
&lt;p&gt;To establish the habit of removing my phone from my sleeping space, I followed roughly &lt;a href="https://jamesclear.com/"&gt;James Clear&amp;rsquo;s&lt;/a&gt; habit formation list, as outlined in his his book &lt;a href="https://jamesclear.com/atomic-habits"&gt;Atomic Habits&lt;/a&gt;, which emphasizes the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Make it obvious&lt;/strong&gt;: Create cues for your habit.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Make it attractive&lt;/strong&gt;: Utilize habit bundling.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Make it easy&lt;/strong&gt;: Reduce friction.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Make it Satisfying&lt;/strong&gt;: Use positive reinforcement.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;I relocated my phone charger to the power plug next to my toothbrush.
This simple act had multiple effect. Spotting the charger when I brush my teeth serve as a reminder to charge my phone and leave it out the bedroom - thereby &lt;em&gt;making it obvious&lt;/em&gt;.
Additionally, by combining the habit of leaving my phone outside of the room with brushing teeth, &lt;em&gt;I make it attractive and easy&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;A last aspect that I want to mention is that of the alarm clock. Like most people, I used my phone as an alarm clock. To gain independence from that I bought a cheap digital alarm clock.&lt;/p&gt;
&lt;h2 id="light-as-sleep-wake-signal"&gt;Light as Sleep-Wake Signal&lt;/h2&gt;
&lt;p&gt;Light plays a vital role in regulating our body&amp;rsquo;s circadian rhythm, the natural 24-hour cycle that governs our sleep-wake patterns.
For more on this check out the awesome book &lt;a href="https://www.goodreads.com/en/book/show/37534452"&gt;Circadian code by Satchin Panda&lt;/a&gt;.
By simulating natural light of sunrise and sunset, we can signal our bodies when it time to wake up and when its time to fall asleep.&lt;/p&gt;
&lt;p&gt;Initially, I considered about buying a daylight alarm clock capable of mimicking the light of sunrise and sunset.
However good options like the Philips HF3531 or Lumie Bodyclocks were outside of my price range.&lt;/p&gt;
&lt;p&gt;That&amp;rsquo;s where smart lighting solution like smart lamps come into play.
This option is not only affordable but combined with a central server which runs &lt;a href="https://www.home-assistant.io/"&gt;Home Assistant&lt;/a&gt; maximal flexible.&lt;/p&gt;
&lt;p&gt;In the blog entries in the series &amp;ldquo;My Homelab&amp;rdquo;, I want to write about how I exactly set up my server, Home Assistant and smart lightning.&lt;/p&gt;


&lt;figure&gt;
 &lt;img loading="lazy" style="display: block; margin-left: auto; margin-right: auto; width:40%" src="https://monkemanx.github.io/attachments//prosanation_comic.png"&gt;
&lt;/figure&gt;


&lt;p&gt;(I really feel like I ignored the bigger issue, and procrastinated by creating this whole elaborated setup, well you will see what I mean in the following posts :P)&lt;/p&gt;</description></item></channel></rss>