When does knowing the number of solutions help (improve the running time)?

Combinatorics equips one with methods to find the number of solutions to discrete problems. While this is obviously an important tool for accurate gauges on the average running of an algorithm, I’m interested in whether, and if, how, one can use the knowledge of the number of solutions to improve an algorithm.

More specifically, I’m looking for examples, where having knowledge of the exact count of solutions allows one to improve the running time of the algorithm (significantly, i.e. it should show in $ \mathcal O$ -notation)

An idea of how such an algorithm might look like, might be this:
For a problem of the kind “Find all possible solutions”, we iteratively calculate the next solution using (one/all) previous solutions, but with the catch that every such step has an enormous increase in cost.

For such an algorithm, knowing the number of solutions would allow us to skip the last (and most expensive) step.

What would be an actual algorithm that, when knowing of the number solutions, can be significantly improved?

Add additional rounds on existing SHA-512 salted hashes without knowing clear text password?

Assuming you have a salted SHA-512 password hash with 5000 rounds. For example:

{CRYPT}$  6$  rounds=5000$  6835c5dcf0bb7310$  hVod/jy7uONMSa.FVpLHb/2OrWpAj3lB/.RWdvgd3YaQAnzN3rorGhaziswwGsHfOWZYkLwXhHKnCy5By2CKr0 
  • Could one add more rounds (e.g. another 5000 rounds) to this hashed password without knowing the cleartext password such that the hash value still would be valid if a user’s cleartext password is verified?

  • If this is possible as I think it should be, are there existing tools or code to “add more rounds” to this hash value?

Btw. the cleartext password for the above hash is “password” but assume would not know this.

When knowing an individual’s plaintext password history, how much information is expected to be gained with a new password? Do we know this?

The premise: Knowing a persons password history should provide information to help when guessing a new password of theirs.

At an extreme end, with a password history of wildcats, wildcats1, then wildcats2, I’d guess there is less than 1 bit of entropy in their next answer.

At the other extreme end, someone with randomly generated passwords would lose no information in their history. From an information-theoretic point of view, I imagine this is something we can estimate using the large amounts of password history data available in the world.

Somewhere in the middle, a history of “wildcats!Reddit”, “crazydogs!Facebook”, “locobirds!Stackexchange” would give me some good ideas for a Twitter password, and would greatly reduce the entropy of their hash. Of course, this would be related to the concept of password strength.

I’m not so well-read on security, but I assume my idea is not unique. Is there a name for this concept? Do we know any real-world values for the amount of information gained / entropy lost?

Print out an number without knowing its length firstly in LC-3 Assembly language

enter image description here

The picture above is my homework. I just don’t know how to solve the problem when printing out a number when it contains a vary of numbers which can lead to 5,6 or 7 characters per number. I think we must have a general solution for that case, if there’re only 2 characters then I can do it, but when I has a random number, I can’t do it. Here is my uncompleted answer. The blank line between AND R0,R0,#0 and OUT is that’s where I stuck

       .ORIG x3100        LD R1,ASCII        LD R2,BEGIN        AND R5,R5,#0        LDR R5,R2,#0        NOT R5,R5        ADD R5,R5,#1        AND R3,R3,#0        ADD R3,R3,#15        ADD R3,R3,#7 LOOP   ADD R3,R3,#-1        BRz DONE        ADD R2,R2,#1        LDR R6,R2,#0        ADD R4,R6,R5        BRn LOOP        ADD R5,R6,#0        NOT R5,R5        ADD R5,R5,#1        BRnzp LOOP DONE   LEA R0, P_OUT        PUTS        AND R0,R0,#0         OUT        HALT ASCII  .FILL x30 BEGIN  .FILL x3150 P_OUT  .STRINGZ "THE MAXIMUM IS: "        .END ``` 

Conclude $X^n_t\to X_t$ weakly from knowing that $X^n_0\to X_0$ weakly and convergence of the corresponding generators


  • $ E$ be a locally compact separable metric space
  • $ (T(t))_{t\ge0}$ be a strongly continuous contraction semigroup on $ C_0(E)$ with generator $ (\mathcal D(A),A)$
  • $ (T_n(t))_{t\ge0}$ be a uniformly continuous contraction semigroup on $ B(E)$ (bounded Borel measurable functions $ E\to\mathbb R$ equipped with the supremum norm) for $ n\in\mathbb N$
  • $ (\Omega,\mathcal A,\operatorname P)$ be a probability space
  • $ (X_t)_{t\ge0}$ be an $ E$ -valued càdlàg process on $ (\Omega,\mathcal A,\operatorname P)$ with $ $ \operatorname E\left[f(X_t)\mid(X_r)_{r\le s}\right]=(T(t-s)f)(X_s)\;\;\;\text{almost surely}\tag1$ $ for all $ f\in C_0(E)$ and $ t\ge s\ge0$
  • $ (X^n_t)_{t\ge0}$ be an $ E$ -valued càdlàg process on $ (\Omega,\mathcal A,\operatorname P)$ with $ $ \operatorname E\left[f(X^n_t)\mid(X^n_r)_{r\le s}\right]=(T_n(t-s)f)(X_s)\;\;\;\text{almost surely}\tag2$ $ for all $ f\in C_b(E)$ and $ t\ge s\ge 0$

Assume $ $ X^n_0\xrightarrow{n\to\infty}X_0\tag3$ $ weakly and that for all $ f\in\mathcal D(A)$ and $ t\ge0$ , there is a $ (B_n)_{n\in\mathbb N}\subseteq\mathcal B(E)$ and a $ (f_n)_{n\in\mathbb N}\subseteq B(E)$ with $ $ \operatorname P\left[\forall s\in[0,t]:X^n_s\in B_n\right]\xrightarrow{n\to\infty}1\tag4,$ $ $ $ \sup_{n\in\mathbb N}\left\|f_n\right\|_\infty<\infty\tag5$ $ and $ $ \left\|f_n-f\right\|_{B_n}+\left\|A_nf_n-Af\right\|_{B_n}\xrightarrow{n\to\infty}0\tag6$ $ (where $ \left\|g\right\|_{B_n}:=\sup_{x\in B_n}|g(x)|$ ).

Fix $ f\in\mathcal D(A)$ and $ t\ge 0$ . Are we able to conclude $ \operatorname E\left[f(X^n_t)\right]\xrightarrow{n\to\infty}\operatorname E\left[f(X_t)\right]$ ?

The claim would follow from $ $ \operatorname E\left[f(X^n_t)-(T(t)f)(X^n_0)\right]\xrightarrow{n\to\infty}0.\tag7$ $ We know that there are $ B_n$ and $ f_n$ as above. Let $ U^n:=f_n(X^n)$ and $ V^n:=(A_nf_n)(X^n)$ . Then we may somehow use that $ U^n-\int_0^{\;\cdot\;}V^n_s\:{\rm d}s$ is a martingale. Maybe we need to stop this martingale at $ $ \tau_n:=\inf\left\{t>0:\left(\int_0^t\left|(A_nf_n)(X^n_s)\right|^2\:{\rm d}s\right)^2>\sqrt t(\left\|Af\right\|_\infty+1)\right\},$ $ noting that $ \operatorname P\left[\tau_n\le t\right]\xrightarrow{n\to\infty}0$ . The idea is that we may insert this martingale in $ (7)$ and somehow show the convergence.

Remark: There is a superior result in section 8 of chapter 4 in the book of Ethier and Kurtz, but I would like to find a direct proof in this special situation.

Can we recover the metric by knowing volume and area?

Does someone know that what is the definition of area of a manifold? and then

Question: Can we recover the metric by knowing its volume and area?

In the simplest case ($ n=1$ ) I don’t know whether two simple closed curve of the same area and circumference are congruent or not!! Any explanation, proof, reference or counterexample would be very appreciated.