Tag Info

9

Notice that the numbers $1, 2, 4, 8, 16, 32$ are all perfect powers of $2$. This means that from any sum of them, the individual components can always be retrieved because there is a unique way to express a number as a binary number. One way to retrieve the racial info is keep dividing by $2$ and getting the remainder. Every remainder of $1$ indicates a ...

7

Based on your example, I think the right SAS syntax to do it by bit manipulation would be something like if BAND(ethnicity, 32) ^= 0 then white = "Yes"; if BAND(ethnicity, 16) ^= 0 then pacific_islander = "Yes"; if BAND(ethnicity, 8) ^= 0 then black = "Yes"; if BAND(ethnicity, 4) ^= 0 then asian = "Yes"; if BAND(ethnicity, 2) ^= 0 then american_indian = ...

3

Both have their uses, and neither easier to convert to. DNF gives you the truth table of a formula: it shows you exactly which assignments of truth values to atomic formulas make the entire formula true. Converting a formula to CNF, and converting to DNF, are both NP-hard. One reason why CNF gets more attention: the method of resolution, used in automated ...

2

Here is how I would do it. First, note that as John Ma noted, it suffices to show continuity of $$F : \{0,1\}^\Bbb{N}\to [0,1], (x_n)_n \mapsto \sum_{n=1}^\infty x_n/2^n.$$ To see this, show that each of the maps $$F_N : \{0,1\}^\Bbb{N}\to [0,1], (x_n)_n \mapsto \sum_{n=1}^N x_n/2^n$$ is continuous (use that each projection on the individual components ...

2

What you do is look at your numbers in binary. For example, $$5_{10} = 101_{2},$$ so hispanic and asian would be true, all others -- false.

1

$$0\leq N\leq63$$ $$N=\sum_{k=0}^{5}a_k\cdot 2^k$$ $$a_5 = \left[\frac{N}{2^5}\right]$$ $$a_4 = \left[\frac{\mod (N,2^5)}{2^4}\right]$$ $$...$$ $$a_k = \left[\frac{\mod (N,2^{k+1})}{2^k}\right]$$ $$...$$ $$a_0 = \left[\frac{\mod (N,2)}{1}\right]$$ This can be done concurrently for all $k$. (No need to wait for remainder from the previous stage.)

1

Open MS Excel. Type $DEC2BIN(5)$, for example, if $5$ is the number of the person. Each $1$ or $0$ tells you whether the person belongs to the race or not.

1

I don't know about SAS, but most programming languages have a bitwise AND operator. This is usually the word AND or the symbol & (the symbol && behaves slightly differently as it compares only TRUE and FALSE.) Thus there is no need to actually convert into a human readable binary. Thus for a person identifying as american indian / white 100010 ...

1

Ok so I used Akiva's hint and the answers on How many length n binary numbers have no consecutive zeroes ?Why we get a Fibonacci pattern? (close to this but only two and not three $0$'s in a row) and came out with ____$n-3$____$100$ ____$n-2$____$10$ ____$n-1$____$1$ $n$ being the number of strings that do not contain $000$ and got $Z_n$ = ...

1

Two's compliment is just associating all numbers $\pmod {2^n}$ with the same bit pattern. So if you are on an $8$ bit machine, then $-5$ and $-5 + 2^8 = 251$ will have the same bit pattern. The bit swapping tricks are just a shortcut, but it's not too hard to work out what they would be. To work out the bit pattern for $-z$ (in your case $z=5$), you want ...

1

Take the 1-to-1 function $f$ of the open interval $]0,1[$ in $\mathbb R$ defined by $f(x)=$ representation of x in the numerical system of base $2$ This is enough.

1

If $n \in \Bbb{Z}_p$, then we have $$-n = \lim_{k\to\infty} (p^k - n) = \lim_{k\to\infty} \big( (p^k-1) - (n-1) \big).$$ If we write $n-1 = \sum_{k=0}^{\infty} a_k p^k$ with $a_k \in \{0, \cdots, p-1\}$, then this observation allows us to compute the $p$-adic representation of $-n$ as the (diminished) radix complement of $n-1$: $$-n = ... 1 This is definitely confusing language. What they intend to mean is whether there is ultimately a borrow from beyond the highest-order bit. The point is to tell whether the difference of two positive numbers is negative, and then paired with the skip instruction you can do conditional jumps ("if x < y { ... }"). One way to think about it is extend the ... 1 Hint: It suffices to check that$$F : \{ 0,1\}^{\mathbb N} \to [0,1],\ \ \ F(m_1, m_2, \cdots, ) = 0.m_1m_2\cdots $$is continuous. Let V\subset [0,1] be an open set. First of all, show that F^{-1}(V) is open when$$V = \left(\frac{m_1}{2} + \frac{m_2}{2^2} + \cdots + \frac{m_k}{2^k}, \frac{m_1}{2} + \frac{m_2}{2^2} + \cdots + \frac{m_k}{2^k} + ...

1

Hint: Work through the cases: if $0 \leq x < 1/2$ then $a_1 = 0$ and $$0 = \frac{a_1} 2 \leq x \leq \frac{a_1 + 1}2 = \frac 12$$ Similarly for $1/2 < x \leq 1$ where $a_1 = 1$. Check also the boundary case $x = 1/2$. Given that, can you now work through the next inequality, with $a_1, a_2$?

1

Work it through. $a_0$ equals either 0 or 1, so the inequality is either $0 \le x \le 1/2$ or $1/2 \le x \le 1$. In other words, "if $a_0/2 \le x \le (a_0 + 1)/2$, solve for a_0". Let's work this out with an example. Let $x = 0.578125$ 1/2 = .5 1/4 = .25 1/8 = .125 1/16 = .0625 1/32 = .03125 1/64 = .015625 $x = 0.578125 = .5 + .078125 = .5 + ... 1 any integer number c can be written uniquely in any base b representation. For simplicity let's look at non-negative numbers (to extend on negative n, just look at the corresponding -n positive number and put a minus sign up front):$c = \sum a_n b^n, $where$0 \leq a_n< b$for$n \in \mathbb{Z}+\$. It is easy to see that there is no alternative ...

Only top voted, non community-wiki answers of a minimum length are eligible