## Solving trigonometric equations with two variables in fixed range?

I am trying to use ‘Solve’ function to solve two trigonometric equations with two variables a1 and a2 (with range 0,2Pi). I wrote the code in the following:

Vets={Cos[2a1](I+Cos[2a2])+Sin[2a1]Sin[2a2], (I-Cos[2a2])Sin[2a1]+Cos[2a1]Sin[2a2]};   Solve[Vets[[1]] == 1 && Vets[[2]] == 0 && 0<=a1<=2Pi && 0<=a2<=2Pi, {a1,a2}]

but it gives errors:

Solve::nsmet: This system cannot be solved with the methods available to Solve.

I looked up the documents for Solve function and it should be no problem with the above code. But it doesn’t do anything and give errors, I don’t understand why?

It will be super cool if anyone could answer this question, thank you very much in advance!

## Fixed physics time step and input lag

Everywhere I read says I should fix the time step of my physics simulation, and interpolate the result to the actual frame rate of my graphics. This helps with simplicity, networking, reproducibility, numerical stability, etc.

But as I understand it, fixed time step guarantees between 1 and 2 Δt of input lag, because you have to calculate one step ahead in order to interpolate. If I use 90 Hz physics, it gives me an input lag of about 17 ms, on average.

Since I often see gaming enthusiasts talking about 1 ms input lag, 1 ms delay, and how that makes a difference, I wonder how fast-action games does it, and how they reduce the input lag using fixed time step.

Or they don’t, and 1 ms delay is just marketing mumbo jumbo?

## How to List All Permissions for SQL Server Fixed Database and Server Roles

I am trying to list all current permissions for db_owner and sysadmin for SQL Server 2012. I found these SPs:

EXEC sp_srvrolepermission 'securityadmin' EXEC sp_dbfixedrolepermission 'db_owner'

However, these are deprecated and only accurate as of SQL Server 2000. Is there an equivalent mechanism to accomplish the same thing today?

## Finding a valid equation for fixed point problem

I currently am working on learning more about fixed point method. Finding equations that satisfy the constraints of a g function can sometimes require a bit of engineering. I have come across one that many would consider simple. Yet, I have been stuck on it for some time now.

Here it is $$f(x) = x^2 – x – 2 = 0$$ on $$[1.5,3]$$.

I have tried many things; however, I have yet to successfully discover one that maps domain to range for both $$g$$ and $$g^\prime$$.

Would anyone be able to give me a guiding hand?

## building NFA for { a^p; p is a prime number, m is a fixed number and m >p >0 }

$$\{a^p; p$$ is a prime number, $$m$$ is a fixed number and $$m\geq p \geq 0 \}$$

I know this is regular since it is finite, but I don’t understand how to build an NFA for this if we do not know what $$m$$ is. Is there a way to draw the NFA regardless?

## Encoding a arbitrary stack trace into a fixed length value

Background

I would like to store the nodes of a Calling Context Tree using in a key value store. I need to be able to directly access a node by it’s method name and complete stack trace. In addition in need to access all nodes of a method by only it’s name (the key value store supports a loading based on prefix).

Problem

The first idea is to use the method name + an encoded stack trace as key, e.g. the concatenated string representations. Unfortunately this can get quite large and I cannot use keys of arbitrary length. So the second idea was to encode the stack trace in a deterministic and reversible way. So my next idea was to encode the stack trace in a 64 bit integer, by adding the 32 bit hash representations of the methods in the stack. Unfortunately this is not collision free as the traces A -> B -> C and B -> A -> C compute to the same values even though the traces are different. So my current idea is to encode the traces by:

encodeStacktrace(stack_trace) 1. 64bit current = 0 2. For every method m in stack_trace 3.   current = rotateLeft(current) + hash(m) 4. return current

They key is then method name concatenated with the encoded stack trace value.

Question

Is this implementation collision safe? I think not 100% however I don’t know how to compute the probability under the assumption that the method hash computation is a perfect hashing algorithm.

If it is not safe, are there other implementations/directions I can look into?

## Rice’s Theorem for Turing machine with fixed output

So I was supposed to prove with the help of Rice’s Theorem whether the language: $$L_{5} = \{w \in \{0,1\}^{*}|\forall x \in \{0,1\}^{*}, M_{w}(w) =x\}$$ is decidable.

First of all: I don’t understand, why we can use Rice’s Theorem in the first place: If I would chose two Turingmachines $$M_{w}$$ and $$M_{w’}$$ with $$w \neq w’$$ then I would get $$M_{w}(w) = M_{w’}(w) = x$$. But this would lead to $$w’$$ not being in $$L_{5}$$ and $$w \in L_{5}$$. Or am I misunderstanding something?

Second: The solution says, that the Language $$L_{5}$$ is decidable as $$L_{5} = \emptyset$$ because the output is clearly determined with a fixed input. But why is that so? I thought that $$L_{5}$$ is not empty because there are TM which output x on their own input and there are some which do not.

## $NP$ is not in $P(n^k)$ for any fixed $k \geq 1$

I encountered this problem which asks to show that for any fixed $$k \geq 1$$, $$NP$$ is not contained in $$P(n^k)$$

As an attempt, I thought of using the time hierarchy theorem which says that there exists a language in $$P(n^{k+1})$$ which is not decided in $$P(n^k)$$ given that $$n^k \in o(n^{k+1})$$… Since the space of polynomial verifiers in $$NP$$ is the union of all polynomials of $$n$$, using the time hierarchy theorem, this means that there exists a problem in $$NP$$ that accepts instances if the accepting branch operates in time $$P(n^{k+1})$$, and so $$NP$$ could not be contained in $$P(n^k)$$

But is this correct ? I only assumed that such a problem exists in $$NP$$ (i.e. which accepts in nondeterministic time $$P(n^{k+1})$$ due to the time hierarchy theorem, but I have not really been able to construct a concrete problem…

## Intersection of line segments induced by point sets from fixed geometry

I am reading up on algorithms and at the moment looking at the below problem from Jeff Erickson’s book Algorithms.

I solved (a) by seeing a relationship to the previous problem on computing the number of array inversions. However, I am struggling with problem (b) as I cannot see how to reduce the circle point arrangement to an arrangement of points and lines that would be an input to the problem posed in (a). Assuming I have something for (b), I also cannot see how one might resolve (c).

For part (b), clearly every point $$p = (x, y)$$ satisfies $$x^2 + y^2 = 1$$ but I do not see how I might be able to use this fact to do the reduction. The runtime I am shooting for of $$O(n \log^2 n)$$ also seems to tell me the reduction is going to cost something non-trivial to do.

Can anyone have some further hints/insights that might help with part (b) and potentially even part (c)?

## Are there any known attacks (technical or social) against enterprises where password resets are scheduled on fixed (known) intervals?

A company I know of has a password policy that requires employees to change passwords (on AD server) every 90 days. The vast majority of its new hires start on the 1st of the month. Thus, several hundred password resets happen on a predictable schedule. My intuition tells me that this is tactically valuable information to an attacker (I am an infosec noob).

An attacker could enhance the standard "reply to this with your password" phish with a "reply to this with your password because it is time to change your password" phish. The latter seems less suspicious because the person who wrote the message knows about the password reset policy.

Are there any other attacks enhanced or made possible by a predictable password reset schedule?

I realize that (by the pigeonhole principle) every sufficiently large enterprise with a forced password change policy will have a lot of same-day password changes.