Skip to main content
Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Code code:"if (foo != bar)"
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Saves in:saves
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with
Search options not deleted user 7240

An algorithm is a sequence of well-defined steps that defines an abstract solution to a problem. Use this tag when your issue is related to design and analysis of algorithms.

1 vote

Bounding rectangle of a line

An algorithm to know if a point $P$ is in the rectangle $ABCD$ is to check that $\vec{AB}\cdot \vec{AP}\leq 0$, $\vec{DC}\cdot \vec{DP}\geq 0$, $\vec{DA}\cdot \vec{DP}\leq 0$, and $\vec{CB}\cdot \ve …
wece's user avatar
  • 748
2 votes

What is a "wasteful" execution? And a "schedule"?

I'm not completely sure of my answer since I don't have the book but I think that: By "wasteful" execution they mean an execution that follow $A$ but with a lot of messages. There are trying to prove …
wece's user avatar
  • 748
4 votes

Find out whose turn it is to buy the croissants

Let $\{P_1,...,P_n\}$ be the set of croissant's byers. Let ${v_i}^k-1$ be the amount spent by $P_i$ on croissant up to the day $k$ (it can be the number of times he buy croissant if they always spend …
wece's user avatar
  • 748
-1 votes
Accepted

Shortest paths candidate

The idea is to build a graph with only the edges that are candidates for the shortest path from $v$ to $u$ assuming that $f$ is the required solution. If during the process we find an edge that lead …
wece's user avatar
  • 748
2 votes

Deleting edges from complete graph

To disconnect a complet graph $G=(V,E)$ into $V_1,V_2$ you have to remove at least $|V_1|*|V_2|$ edges (all the edges between elements of $V_1$ and elements of $V_2$). Thus if $K<m*(|V|-m)$ you are …
wece's user avatar
  • 748
2 votes
Accepted

Changing AVL's balance factor to some other $s>2 \in \mathbb{N}$

If the maximal branch is of height $h$ then you know that all the other branches have at least height $h-s$. Lets consider $n$ the number of nodes in the two extreme case: All branches of height $ …
wece's user avatar
  • 748
0 votes

Are those definitions of universal hash family equivalent?

There not the same. For example the identity hash table $h(x)=x$ you have: $$\mathbb{Pr}_{h \in H}[h(k) = h(l)] = 0$$ which answer definition 2 but not 1. [Edit] A more interesting answer I hope :) …
wece's user avatar
  • 748