Write the following set using the condition: The set of integers which are odd multiples of 5

Is this correct I got the following { n E Z: n = 10k-5 for some k E Z}

differential equations – NDsolve Initial Condition is a Function of the Solution

So this may be a terribly no good bad thing to ask of NDSolve, but it is physically relevant. I am trying to solve something like Fick’s Law:
$$frac{partial varphi}{partial t}=frac{partial^2 varphi}{partial r^2}+F(r,t)$$
Subject to a boundary condition which looks something like:
$$varphi (R,t)=varphi_0-int_0^R varphi(r,t)dr$$
Which is an attempt to simulate the case where whatever is diffusing into the medium of interest is limited in quantity. I assume simply plugging a recursive boundary condition is going to go poorly (Edit: it did go poorly), is there any option here other than writing my own solver?

finite automata – Sufficient condition for $xy^*z subseteq L$ for a DFA with $n$ states

In chapter 2 of the New Turing Omnibus, the author considers an unknown finite automata with 6 states. Through trial and error, it is deduced that the words 0101, 0100101, 0100100101 are accepted. It is then stated that using the pumping lemma, it can be shown that if 01(001)^n01 is accepted for n=0,1,2,3,4,5 then all strings of the form 01(001)*01 must also be accepted.

I know of the pumping lemma but do not see how the next leap has been made. Why is it sufficient to only test n up (number of states) – 1?

differential equations – Shooting Method with extra Unknown Condition

I’ve been trying to solve a system of 3 coupled 2nd order ODEs, for a real variable $x$, $0geq xleq infty$. The equations are the following:
begin{align}
&x^{2},h”(x) – x,h'(x) + x^{2},g^{2}(x)left(1-h(x)right) = 0,,\
&x^{2},f”(x) + x,f'(x) – lambda, x^{2},f(x)left(f^{2}(x) + g^{2}(x) – 2right) = 0,,\
&x^{2},g”(x) + x,g'(x) – frac{1}{2},g(x)left(1-h(x)right)^{2} – lambda, x^{2}g(x)left(f^{2}(x) + g^{2}(x) – 2right) = 0,.
end{align}

In addition, the BCs are (where my problem starts):
$$h(0)=0=g(0),, quad f(0)=Omega$$
and
$$h(xtoinfty)=f(xtoinfty)=g(xtoinfty)=1,.$$

First of all, I decided to solve to some finite $x$ such as $x_{max}$ and then try to increase this domain. Then, my problem consists of how I should “tell” NDSolve that I don’t know the value $Omega$ is going to have. I know that, somehow, the numerical solution must find an appropriate value for $Omega$ that agrees with the whole solution. But I cannot understand how I can do this. My starting code is the following:

lambda = 0.5; 
eps = 0.001;
xmax = 5;
eq1=x^2*h''(x) - x*h'(x) + x^2*(g(x)^2) (1 - h(x));
eq2= x^2*f''(x) + x*f'(x) - lambda*x^2*f(x) ((f(x)^2) + (g(x)^2) - 2);
eq3= x^2*g''(x) + x*g'(x) -  1/2*g(x) (1 - h(x))^2 - lambda*x^2*g(x) ((f(x)^2) + (g(x)^2) - 
2);
    
sols=First(NDSolve({eq1==0,eq2==0, eq3== 0,h(eps) == 0,f(eps) == Omega, g(eps)==0}, {f(x), 
g(x), h(x)}, {x, eps, xmax},Method -> {"Shooting","StartingInitialConditions" -> {h(eps) == 
0,f(eps) == Omega, g(eps) == 0}}, WorkingPrecision -> 5));

As you can see, my code is incomplete. The shooting method would need 6 initial conditions for the (converted) IVP -> 3 from the BC at $x=0$ and the shooting for the 3 first-order derivatives. However, since I don’t know (a priori) the value of $Omega$, I’m stuck 🙁

Ps.: From my problem, I know I can put by hand that all the first-order derivatives go to zero when $xtoinfty$… But this would add too many conditions for Mathematica, right?

Could you, please, provide any advice on how I can tackle the problem?

complex analysis – Prove that this function is constant if it satisfies this condition on boundary

The following question is part of an assignment which I am trying to solve.

Question: Let $f in C(bar U) cap H(U) $and f is real valued on T=dU then f must be constant.

Condition of Maximum modulus principle are satisfied and it implies that max |f| is real. On the contrary, if I assume that f is not constant then the condition derived using maximum principle seems not to give any contradiction.

algorithms – Why does case 3 regularity condition of master theorem always hold when f(n)=$n^k$ and f(n)=$Omega(n^{lg_b^{a+epsilon}})$

In case of $f(n)=Omega(n^{log_b^{a+epsilon}})$, we need to find $c<1$ such that for sufficiently large n

$a*Omega((frac{n}{b})^{log_b^{a+epsilon}})leq c*Omega(n^{log_b^{a+epsilon}})$

By slightly modifying the left part we obtain the following inequality

$frac{a}{a+epsilon}*Omega(n^{log_b^{a+epsilon}})leq c*Omega(n^{log_b^{a+epsilon}})$

Thus we can take $c=frac{a}{a+epsilon}$ and here $c<1$ as $epsilon>0$ according to case 3 of master theorem.

Replace Condition in Replacement Rules

In finding an answer to my other question, I’m finding myself needing to manipulate the conditions imposed on replacement rules, but this is proving to be a little difficult. In particular, how should I go about removing instances of Condition and PatternTest?

Using the code from my other answer (slightly adjusted):

f(x_?InexactNumberQ) := x^2;
g(x_) /; FooQ(x) := x^3;

Attributes(ExpandValues) = {HoldAll};
ExpandValues(symbol_) := Join @@ Through(
  {OwnValues, DownValues, UpValues, SubValues, DefaultValues, NValues}(symbol)
);
ExpandValues(symbol_, symbols__) := Join(ExpandValues(symbol), ExpandValues(symbols));

then the replacement rules that need to be modified are:

{
  HoldPattern(f((x_)?InexactNumberQ)) :> x^2,
  HoldPattern(g(x_) /; FooQ(x)) :> x^3
}

I would like these to be modified to not have any conditions on the arguments, but trying to replace the condition and pattern test is proving difficult. This for example does not work:

{
  HoldPattern(Condition(p_, q_)) :> p,
  HoldPattern(PatternTest(p_, q_)) :> p
}

I’ve also tried using Verbatim which the documentation suggests is useful to transform other transformation rules, but I have not gotten them to work. I’m also thinking that the use of Verbatim won’t work generally because it is too literal.

I’ve had partial success with

{
  Condition -> (#1 &),
  Patterntest -> (#1 &)
}

but when the replacement appears within a HoldPattern, the resulting rule after replacement does not work.

game design – How can players randomly – and secretly – choose 5 cards out of 25 that match a specific condition

So this is a less a coding question and more a ‘there’s gotta be a way’…

I have a Clue-like logic/deduction board game that has 25 cards – 5 of each color and 5 of each taste. Each card is unique, and has a unique combination of color and taste.

Just like in Clue, I want to have players randomly choose some cards that make up the answer they’re trying to discover through logic and deduction. In previous versions, one side of the cards (the back side) had the taste of the card, and the correct answer would have exactly one of each taste. After some playtesting, a suggestion was made to have the correct answer have 5 cards, including exactly one card of each color and taste…

So that’s what I’m trying to do. Players need to secretly determine this for themselves by using just some playing cards. One side needs to have the actual combination of color and taste on it, but anything can be on the back to make it work. I’ve tinkered with numbers and bar-code-like graphics, but anything’s possible here (numbers shouldn’t be easily memorized, naturally, and the backs of the cards should be able to remain visible without this system giving away what’s on the other side…

Happy to answer questions – all help appreciated =)

at.algebraic topology – unlinking when relaxing the homeomorphism condition

Say that we have two knots $K_1$ and $K_2$ in $S^3$ linked together in $S^3$ and forming the Hopf link. Usually, we can prove that we cannot unlink them by using a link invariant that shows that the “two-component unlink” that consists of two separate circles in $S^3$ have a different value (with respect to the invariant) in comparison to its value on the Hopf link. This effectively shows that there is no homomorphism from $S^3$ to itself that separates the two links. I want to relax the condition of homomorphism a little bit and ask: is there a continuous function that separates the images of the two links? in other words, is there a continuous function $f:S^3to S^3$ such that $f(K_1)$ is contained in an closed disk $D_1$ and $f(K_2)$ is contained in another closed disk $D_2$ and $D_1$ and $D_2$ are disjoint? it seems that the answer is no but I am not sure how to show something like this. Any pointer is appreciated.

algorithms – Longest common sub sequences with a condition

Consider a sequences if called good if it contains at least one pair one adjacent numbers which are equal.A good sub-sequence of a array is a sub sequence of that array which is good and has its length is highest.Now you are given two array $S$ and $T$ with integers,you need to find sub sequences with is common to both arrays and has maximum length and is a good sub sequence.

This is a pure dynamic programming problem,in which states are $dp(i)(j)$ is answer for $S(1:i)$ and $T(1:j)$ ($A(1:i)$ means subarray of $A$ from $1$ to $i$). But i could not find transition between states,could anyone help me.