Interpreting the accuracy of solutions to the correspondence problem

I have two pictures of the same object, taken by a car travelling down the road like shown on the right side of the image below. I want to find pixels of the object in each frame that correspond to each other.

Now, in the description of the Middlebury Stereo Evaluation v.3 dataset it says

Maximum disparities range from 200 to 800 pixels at full resolution.

This leads me to my two questions:

  1. Do I understand correctly that algorithms working with the Middlebury dataset had to match pixels that were a distance of 200 to 800 pixels apart, like shown on the left side of the image?
  2. Consider the leaderboard for the Middlebury Stereo Evaluation. Does an average absolute error metric of 1.4 mean, that above problem could be solved for the images in the dataset with an average accuracy of 1.4 pixels?

Correspondence Problem Setup

CLRS 22.3-1, How Come Solutions Online State There Can’t Be Edges From WHITE to GRAY nodes “at any point… during search”?

The exercise (from the book Introduction To Algorithms) states

Make a 3-by-3 chart with row and column labels WHITE, GRAY,and BLACK. In each cell (i, j) indicate whether, at any point during a depth-first search of a di- rected graph, there can be an edge from a vertex of color i to a vertex of color j . For each possible edge, indicate what edge types it can be. Make a second such chart for depth-first search of an undirected graph.

The colors WHITE, GRAY, BLACK correspond to Undiscovered, discovered but not finished, and finished. The following solution is what multiple sites & universities have posted(such as: walkccc, Rutgers University):

 |       | WHITE         | GRAY                | BLACK                | |-------|---------------|---------------------|----------------------| | WHITE | All kinds     | Cross, Back         | Cross                | | GRAY  | Tree, Forward | Tree, Forward, Back | Tree, Forward, Cross | | BLACK | -             | Back                | All kinds            | 

I will draw a minimal counter example as it helps understand my conflict:


  • Start at node 0: 0 is GRAY
  • At this point, 3 is still white and has an edge to 0
  • Resume and keep going, eventually the edge from 3 to 0 will be discovered as a tree edge

This contradicts the solutions saying you can only have Cross/Back edges going form WHITE->GRAY. This example can be easily modified to contradict many of the elements in the table. I think the solutions are doing one of the following:

  • Assuming that the graph is a tree and that we start at its root. (Wrong as DFS doesn’t need a tree graph and any node can be started from).
  • More likely (Just thought of this), interpreting the question of "can there be an edge" as "can there be an edge that we have discovered". In which case, the solutions work, as although the edge from 3->0 was a WHITE->GRAY edge at one point, we hadn’t discovered it yet.

NMinimize: How to avoid solutions that do not satisfy constraints within a certain tolerance?

I just started to use Mathematica a few weeks ago. Using NMinimze, I would like to avoid solutions that do not satisfy certain constraints (although they "almost" satisfy them). Do you know how to change the following command to find a solution satisfying "completely" all the constraints, solving the same minimization problem?

NMinimize[{((e*(1 - Sqrt[(g - e)^2 + (f - h)^2]) + (g - e)*(1 -        Sqrt[f^2 + e^2])) + (h*(1 -        Sqrt[(g - e)^2 + (f - h)^2]) + (f - h)*(1 -        Sqrt[g^2 + h^2])))/((g + f)*  Max[1 - Sqrt[(g - e)^2 + (f - h)^2], 1 - Sqrt[g^2 + h^2]]), 0 <= e <= 1, 0 <= f <= 1, e^2 + f^2 == 1, e <= g <= 1, 0 <= h <= f, Sqrt[(g - e)^2 + (f - h)^2] <= 1, g^2 + h^2 <= 1}, {e, f, g, h}]  

finding the combinatorial solutions of series and parallel nodes

I have n nodes, and I want to find the (non duplicate) number of possible ways in which these nodes can be combined in series and parallel, and also enumerate all the solutions. For example, for n=3, there are 19 possible combinations.

 0 (0, 1, 2)  1 (0, 2, 1)  2 (1, 2, 0)  3 (1, 0, 2)  4 (2, 0, 1)  5 (2, 1, 0)  6 [0, 1, 2]  7 [0, (1, 2)]  8 [0, (2, 1)]  9 (0, [1, 2]) 10 ([1, 2], 0) 11 [1, (0, 2)] 12 [1, (2, 0)] 13 (1, [0, 2]) 14 ([0, 2], 1) 15 [2, (0, 1)] 16 [2, (1, 0)] 17 (2, [0, 1]) 18 ([0, 1], 2) 

In the notation above, a series combination is denoted by (..) and a parallel combination is denoted by [..]. Duplicates are removed, for example [0,1,2] is the same as [1,2,0] since all of them are happening in parallel so the order does not matter here.

Can you give me an algorithm for this, or if any such algorithm already exists, then point me to it?

(I tried googling for a solution, but did not hit any relevant answer, maybe I was entering the wrong keywords.)

Note: for a sequential-only solution, the answer is easy, it is n!, and the enumeration of the solutions is also easy. But when parallelism (especially non duplicates) is added to the problem, it gets very complex.

I can verify solutions to my problem in polynomial time, how would a non-deterministic algorithm arrive to a solution if it always takes $2^n$ bits?

Decision Problem: Given integers as inputs for $ K$ and $ M$ . Is the sum of $ 2^k$ + $ M$ a $ prime$ ?


m = int(input('Enter integer for M: ')) sum_of_2**K+M=int(input('enter the sum of 2^k+m: '))  if AKS.sum_of_2**K+M == True:    # Powers of 2 can be verified in O(N) time   # make sure there is all 0-bits after the 1st ONE-bit      # Use difference to verify problem    if sum_of_2**K+M - (M) is a power_of_2:     OUTPUT Solution Verified 

The powers of 2 have approximately $ 2^n$ digits. Consider $ 2^k$ where $ K$ = 100000. Compare the amount of digits in $ K$ to the amount of digits in it’s solution! Also take note that the powers of 2 have $ 2^n$ bits as its 0-bit Unary essentially for the exponent $ n$ .


How would a non-deterministic machine solve this problem in polynomial time?

What Trusted Execution Environment (TEE) solutions exist for mobile devices?

A trusted execution environment (TEE) provides a way for one to deploy tamper-proof programs on a device. The most prominent example of TEEs seem to be Intel SGX for PCs.

What I wonder is, if there exists an equivalent solution for mobile devices. For example, I want to deploy an arbitrary application on a smartphone that even a malicious OS can’t tamper with. Is there such a solution at the moment?

Why do people use “burner phones” rather Signal or similar solutions?

Why do people use burner phones rather than Signal or similar? I would imagine that if you are high value target the police or intelligence service would simply eavesdrop every phone call passing the base station nearest the location where you dwell. Doing that then it is easy to filter out all phone calls made between phone numbers that have been used more than hundred times or for more than three months (or something like that) in both ends. The amount of remaining phone calls should minuscule, and there you have your criminal, spy or whatever speaking in cleartext on a non-encrypted line.

if you instead of using a dumb phone used something more modern you can on the one hand be exposed through a trojan or a rootkit but is that really a doable attack vector, even for very valuable targets?

If you use something like OpenBSD or one of the hardened Android phones that are on the market and only install Signal on it and then only use it for Signal. Never browse the web, never use it for regular phone calls and texts etc and keep it updated (Maybe regular factory resets too?), can the authorities, even if they have a lot of resources, really manage to sneak in some malware on it? Malware that can’t be caught by another layer of security (E.g., your firewall could be setup to only allows device A to connect to internet to Signal destinations and ports using the Signal protocol – making it difficult to deliver whatever the malware manage to find to the people controlling it.).

What are the best practises for safe phone calls if you are a private citizen that some authorities are very interested in listening to?

finding solutions numerically of the equation

given the equation x^5 – y^5 = 1 ,x-2y=1 i need to find the numerical values of the solutions. Now as far as i know N is the command that we’ll be using to get numerical values , NSolve for solving the equation numerically and that it must contain in the output, numbers , not symbols, but i havent been specified either to solve for x or y, nor have i been given values for any of them . if i choose to solve for x , the output gives solution containing y and solving for y gives result in x, these arent numerical forms of solutions. the N command is only used to give a value numerically. how can i get that in this equation? or maybe i can use another command that can be helpful?

Is Windows Sandbox a viable alternative to conventional VM solutions considering its design?

The idea of having a fast, disposable VM at the palm of my hand appeals to me very much. It makes adding an extra layer of security to any thing I want to do so easy – just launch the sandbox application in a matter of seconds and you’re done. Of course, that is considering the VM actually does the job it’s supposed to do…

A little disclaimer beforehand – I’ve read the article Beware the perils of Windows Sandbox at Magnitude8, describing how the Windows Sandbox comes with a NAT pre-enabled and thus any malware running on the guest would still get a direct access to your intranet, which is already a large problem. But for the purpose of this question, let us just consider the host-guest scenarios.

Windows Sandbox claims to “achieve a combination of security, density, and performance that isn’t available in traditional VMs”, by leveraging a different approach to memory and disk management. If I understand things correctly, everything that in theory can be safely shared between the host and the guest, gets shared. According to the official documentation, the Sandbox shares both the host’s immutable system files, as well as the physical memory pages.

Despite that, Microsoft seems to remain confident that their solution is secure as implied by one of bullet points mentioned in the Sandbox overview:

Secure: Uses hardware-based virtualization for kernel isolation. It relies on the Microsoft hypervisor to run a separate kernel that isolates Windows Sandbox from the host.

This obviously raises a lot of questions, because at the first glance, all this resource sharing should increase the attack surface greatly, leaving more space for exploits to be found. Also, even the most sophisticated technology, which changes only the implementation and not the design, does ultimately make the discovery of an exploit only more time and resource consuming, but not less possible, doesn’t it?

So, my question is

Would you consider Windows Sandbox to be a viable alternative to conventional VM solutions in terms of security, or do the shortcuts used to achieve the performance undermine the VM’s core principles too much? Or am I just not understanding the technology and all of what the Sandbox is doing is technically safe?

An extra question: Does the situation change when we’re talking about a web-based attack, such as opening a malicious site in a browser from within the Sandbox, or does it come down to the same situation as running an infected executable? (disregarding the extra layer of sandboxing done in the browser itself)