Recurrence Relations for Perfect Quad Trees (same as binary trees but with 4 children instead of 2)

I have to write and solve a recurrence relation for n(d), showing how I arrive at the formula and solve the recurrence relation, showing how I arrive at the solution. Then prove my answer is correct using induction for perfect quad trees which are basically binary trees but with 4 children at each node rather than 2 and the leaf nodes in the deepest layer have no children. Nodes at precisely depth d is designated by n(d). For example, the root node has depth d=0, and is the only node at that depth, and so n(0) = 1

Does this mean it would be T(n)= 4T(n/4) + d ? then prove

I’m really confused and would appreciate any help or resources.

Do the Secret Chats of Telegram really support Perfect Forward Secrecy?

In the Telegram API it is stated that Telegram support Perfect Forward Secrecy in their “secret chats”. It is also stated that

official Telegram clients will initiate re-keying once a key has been used to decrypt and encrypt more than 100 messages, or has been in use for more than one week, provided the key has been used to encrypt at least one message.

So my question is, in this case, if a session key gets compromised, is it possible for an attacker to read 100 messages (or possibly more)? If yes, can we still say that perfect forward secrecy is satisfied here?

Number of minimal perfect hash functions that are order preserving- why is it true?

Suppose we have a universe of $ u=|U|$ elements. We called a set of $ H$ function $ (U,m)$ order-preserving minimal perfect hash family (OPMPHF) if for every subset $ M\subset U$ of size $ m$ has at least one function $ h\in H$ which is an over preserving minimal prefect hash. It is shown in [1,2] that for every
$ (U,m)$ -OPMPHF $ H$ obeys:

$ $ H=m! \cdot {u \choose m}/(\frac{u}{m})^m $ $

Thus, the program length for any order preserving minimal perfect hash function should contain at least $ \log_2 |H|$ bits.

In partiular, if $ m=3,u=8$ , we have that $ |H|\geq 17.7$ .

However, I think I can create as set of $ |H|=6$ functions for such family. For every $ 2\leq i\leq 7$ we define $ f_i(x)$ to be equal $ 1$ if $ x<i$ , equal $ 2$ if $ x=i$ and equal $ 3$ if $ x\geq i$ . Every function $ f_i$ is order-preserving, and for each set $ M$ with second element $ i$ has a perfect function $ f_i$ .

Do I miss something in my analysis?

[1]- [2]-K. Mehlhorn. Data Structures and Algorithms 1: Sorting and Searching, volume 1. Springer-Verlag, Berlin Heidelberg, New York, Tokyo, 1984

URP cant get Pixel Perfect Camera to work

I am currently using URP to add bloom to my particlesystems. The problem im facing is that I cant pixelate the game. I have tried to implement several methods to post pixelate (via shaders and render texture) but none conserve the bloom on the particlesystem. This is the effect im after (using pixel perfect camera and zooming the editor window) but I cant achive this in build mode, any help on how I should pixelate the game so you can still see the character?

This is without 4x zoom: Without zoom

This is my current settings: Settings Old games site since 2005, perfect domain + content selling for $2k

Why are you selling this site?
Had it for a long time and I've stopped maintening it

How is it monetized?
Google Adsense, last payment was £73 in June 2019

Does this site come with any social media accounts?

How much time does this site take to run?
Left abandoned but has potential to be a great blog for a gamer or tip/cheats for games

What challenges are there with running this site?
I made it when I was 18, now I'm old at 34

Building a perfect hashing table

My understanding is that one way to build a perfect hash, as per CLRS, is to use two levels of hashing, with universal hashing functions at each level.

More specifically, CLRS shows that assuming $ n$ is the total number of keys, and $ n_j$ the number of keys hashed to the value $ j$ for the second level, we can then make $ m=n$ and $ m_j=n_j^2$ to guarantee that the expected number of collisions is < 1/2 in the second level.

However, as far as I understand, collisions are still possible in this second level, so to truly have no collisions in this 2nd level, one may need to try a few hash functions in this level for each value of $ j$ .

Is my understanding correct? If so, CLRS does not seem to elaborate much on this algorithm. Is it fair to assume that a simple sequence of random “try and error” (i.i.d sampling) of hash functions in this 2nd level is “as good as it gets” for this perfect hashing design?

Why is finding square root of perfect square $O(M(n))$

I saw this question and its answer on Theoretical Computer Science stack exchange and I can’t understand why the complexity of finding the root is the same as that of a multiplication. My thought was that we may need more than $ O(1)$ multiplications to find the root (using Newton’s Iteration as stated in the answer, since the method may need more than $ O(1)$ steps).

Is there an upper limit not depending on $ n$ to the amount of multiplications we may need? Or a method to find the root with enough accuracy(which means finding the actual root) after $ O(1)$ steps? Am I missing something?

Note: I didn’t ask this on theoretical CS stack exchange, since it is supposed to be for professional researchers in CS and no one asked about this in the comments so assume it isn’t a research level question even if it is about an explanation of one (research level question).

Perfect Matching in Bipartite Graph with mutually exclusive edges


I would to solve Perfect Matching in Bipartite Graph Problem where some edges are mutually exclusive.


Left vertices: $ a,b,c$

Right vertices: $ x,y,z$

Edges: $ (a,x),(a,y),(b,z),(c,y)$

Exlusive pairs: $ (b,z)$ and $ (c,y)$

Answer: no perfect matching


Is the problem in P or NP?

Solution Attempts

I know that Perfect Matching in Bipartite Graph Problem is in P. But I cannot find a polynomial-time algorithms for the above version of this problem. I have also tried proving that it is NP, but without any luck.