Notes, summaries, assignments, exams, and problems for Primary education

Sort by
Subject
Level

Polynomial-Time Reductions for NP-Complete Problems

Classified in Computers

Written on in English with a size of 3.67 KB

1. Independent Set to Vertex Cover Reduction

Input

A graph G and an integer k.

Reduction Steps

  1. Call the black-box for Vertex Cover with the input graph G.
  2. Provide n-k as the target size, where n is the number of nodes in G.
  3. Return the result ('yes' or 'no') from the black-box call.

2. SAT to Independent Set Reduction

Input

A CNF formula F.

Reduction Steps

  1. Construct a graph G where the nodes of G are the literals occurring in F (with possible repetitions).
  2. Add the following edges to G:
    • An edge joining every pair of complementary literals.
    • An edge joining any two literals that occur in the same clause.
  3. Call the black-box for Independent Set with input graph G and an integer k, where k is the number of clauses in F.
  4. Return the result ('yes' or 'no') from the
... Continue reading "Polynomial-Time Reductions for NP-Complete Problems" »

Efficient Recruiting and Algorithm Design: Set Cover, Hamiltonian Path, and Longest Increasing Subsequence

Classified in Computers

Written on in English with a size of 3.2 KB

Set Cover to Efficient Recruiting

Input: Set U of elements, collection S1, ..., Sm of subsets of U, integer k ≥ 0

Construct an instance of the Efficient Recruitment Problem:

  • Sports are represented by U.
  • Applicants are represented by {1, ..., m}.
  • For every s ∈ U and 1 ≤ i ≤ m, M[s, i] = 'qualified' if s ∈ Si and 'not qualified' otherwise.

Steps:

  1. Call the oracle for Efficient Recruiting with input M and k.
  2. Return the result (yes or no) of the previous call.

Vertex Cover and Hitting Set

Graph: G = (V, E)

  • U = V(G)
  • Si = {u, v}, where (u, v) is an edge of G.

Vertex Cover ⇒ Hitting Set:

If C is a vertex cover for G of size k, then by definition, for every edge (u, v) in G, either u ∈ C or v ∈ C. Therefore, C is a solution for Hitting Set because... Continue reading "Efficient Recruiting and Algorithm Design: Set Cover, Hamiltonian Path, and Longest Increasing Subsequence" »

French Revolution of 1789: A Comprehensive Account

Classified in Geography

Written on in English with a size of 2.41 KB

French Revolution of 1789

The French Revolution (1789) was a complex process that ended the Ancien Régime and paved the way for a new liberal society and new ways of thinking and living.

Convocation of the Estates-General

King Louis XVI’s minister, Calonne, proposed that the nobility contribute to paying taxes. The nobility refused, leading to a serious political crisis and forcing Louis XVI to convene the Estates-General. This situation fueled widespread discontent, resulting in the creation of so-called Cahiers de doléances (notebooks of grievances). These notebooks highlighted the people’s discontent with the monarchy. Enlightened sectors of the bourgeoisie demanded equal representation in the Estates-General compared to the nobility... Continue reading "French Revolution of 1789: A Comprehensive Account" »

City Thief Steals DVD Player, Watch, Jewelry

Classified in English

Written on in English with a size of 3.01 KB

City Thief Steals from Eileen Jacobs' Home

Witness Describes Suspect to Police

Police are hoping to make progress in catching a city thief. He was seen cycling away from the home of Eileen Jacobs after stealing a DVD player, a watch, and some jewelry. The main suspect is Neil Swains, a forty-year-old escaped convict. Daniel Cooper saw the criminal and is here to give us a description.

Presenter: Hello.

Mr. Cooper: Hello.

Presenter: Can you tell us what happened?

Mr. Cooper: Of course, I can. I was making my breakfast in the kitchen at about 8 AM when I heard a noise in Eileen's backyard. I knew she had gone on vacation last weekend, so I went to investigate.

Presenter: What did you see?

Mr. Cooper: I noticed the back door was open. It looked like someone... Continue reading "City Thief Steals DVD Player, Watch, Jewelry" »

Living Abroad After Studies, Youth Unemployment in Spain & Online Learning

Classified in English

Written on in English with a size of 4.13 KB

Living Abroad After Your Studies

What are the advantages and disadvantages of living abroad after you finish your studies?

Nowadays, some young people travel abroad after they finish their studies because it is a good way to discover new countries, cultures, and traditions and also to look for a good job.

Advantages

On the one hand, you can learn languages because if you stay in other countries you can finally speak them. Also, you can meet new people and go out to different places. Learning languages is good because you can find work and it is very beneficial for the future.

  • Improved language skills
  • Exposure to new cultures and traditions
  • Expanded social and professional networks

Disadvantages

On the other hand, living abroad is not always good because... Continue reading "Living Abroad After Studies, Youth Unemployment in Spain & Online Learning" »

C Development Tools and Functions: A Comprehensive Guide

Classified in Computers

Written on in English with a size of 2.85 KB

Which C development tool may add automatically malicious source code to the original application source code?

C Preprocessor

Which C software development tool may inadvertently add compiled object/binary code to the original compiled application object code?

Linker or Linkage Editor

If two programmers are developing two separate files a.c and b.c to be merged into one source code before compilation, and one declares in a.c global integer variable int j; how should the other programmer declare and use the same integer variable j in the source code b.c. Write a line of code that allows the second programmer to use in b.c declaration of variable j from the first file a.c?

extern int j;

What does ELF specify?

Executable file format, Executable file header,... Continue reading "C Development Tools and Functions: A Comprehensive Guide" »

Common Phrasal Verbs and Their Meanings

Classified in English

Written on in English with a size of 3.92 KB

PHRASAL VERBS

Blow out: to (cause to) go out, become extinguished (She blew out all the candles)

Break down: of a machine or motor vehicle. Suddenly cease to function (my car broke down while I was driving)

Blow up: to explode (I saw the plane blowing up)

Come back: to return (she will leave tomorrow, but she’ll come back for holidays)

Check out: going to bed // the moment you leave a place like a hotel

Coming up: (me and your mum are coming up)

Draw in: to cause to take part (This is your fight; don't draw me in)

Drive back: stop trying to reach a person or place and move back

Do without: to forgo, dispense with (We'll just have to do without a car until they fix it)

Drop off: take someone to place and leave them there (I dropped you off on my way... Continue reading "Common Phrasal Verbs and Their Meanings" »

Good morning, have you got

Classified in English

Written on in English with a size of 1.1 KB

ATTEMPT TO KIDNAP OF ENGLISH TEACHER
On Thursday morning at eleven o’clock, while I was talking with some friends, there
was an attempt to kidnap Eustakia Marin, the english teacher.
We were talking near the technology department when we saw Eustakia, without
knowing it will be the last time. Suddenly, we heard a noise coming from the inside of
the classroom. Then we saw a man following the english teacher inside the room.
Eventually, we entered into the technology department and we saw the teacher tied
to a chair and a man escaping through the window. Later we were informed that he
was her ex-husband, who was trying to hurt EUSTAKIA, in revenge for marring a new
man. Eustakia felt really scared, but fortunately now she is married to a good man.
I
... Continue reading "Good morning, have you got" »

Probability and Statistics Problems with Solutions

Classified in Mathematics

Written on in English with a size of 4.16 KB

1) If a toy company is planning to introduce 3 new toys next Christmas. The toys sales can be a success or a failure, what is the probability that at least 2 of the toys are a success?

FFF FFS FSF FSS 4/8 = ½ = 0.5

S SFF SFS SSF SSS

For problems 2 and 3: a guitar manufacturer has an average daily production of 60 units, with a standard deviation of 7 units per day. If the guitar production distribution is mound shape:

2) What percentage of days in a month will have a daily production between 53 and 74 units?

53

3) What percentage of days in a month will have a daily production of more than 67 units?

x>67 = 16%

4) A combination lock system has three ten-digit (0 to 9) number wheels side by side. How many four-digit opening numbers are possible if... Continue reading "Probability and Statistics Problems with Solutions" »

Real Estate & Dream Homes in Alicante and Beyond

Classified in English

Written on in English with a size of 3.01 KB

Beautiful Bungalow in Alicante

The bungalow is perfectly situated in the south of Alicante, near the beach. You can spend your holidays very comfortably. On the one hand, the bungalow has two floors. On the first floor, there are a kitchen, a bathroom, and a big living room. Also, it has a garden. On the other hand, the neighbors of the house next door have small children and they are always making noise. However, throughout the summer they are away. Finally, I want to say that this bungalow has a good price and is one of the best that you will find. I really recommend it!

My Dream House

My dream house would be in Huelva, on the outskirts of the city. It would be a bungalow near the beach. On the one hand, it would have two floors. In one of them,... Continue reading "Real Estate & Dream Homes in Alicante and Beyond" »