algorithms – Create binary numbers with a described pattern

I am looking for an algorithm that can create numbers following certain patterns. Let’s say I have a binary number of size n and the patterns I would like to create is having 0s and 1s in equal numbers such that they are repeated with different spacings. The pattern of repetition and spacing will be clear from the example below:

If size is 4, set of numbers are: {0101, 0011}.
If size is 8, set of numbers are: {01010101, 00110011, 00001111}.
If size is 16, set of numbers are: {“01”(8), “0011”(4), “00001111”(2)}.
If size is n, set of numbers are: {“01”
(2^n-1), “0011”(2^n-2), “00001111”(2^n-3), …}
Note: Sorry for the bad notation!

For this problem, n will always be an integer power of 2 (e.g. 2, 4, 8, 16, 32 …). So the size of set will always be $log_2$(n). Is there an algorithm that can generate each of these numbers in the set with algorithm in the range of O(1) to O(n)?

Thanks.

mathematical optimization – Optimizing on a matrix of binary variables

I think I might just have a bug here, and I’ll delete the question if so, but what is causing this optimization to not terminate in a reasonable amount of time? (20+ minutes, no answer)

NMinimize({Total(W, 2), 
  W (Element) Matrices({15, 446}, Integers) && 
   And @@ Flatten(Table(0 <= W(i, j) <= 1, {i, 1, 15}, {j, 1, 446}))},
  W)

This is meant to be
$$
min_W sum_{i}^{15}sum_{j}^{446} W_{ij} \ text{s.t.}quad W in {0,1}^{15times 446}
$$

which should be a simple integer linear programming problem for Mathematica: return a matrix of zeros and done.

Would this run faster if I reformulated without the use of matrices?

I rooted my phone but my root is saying “binary reserved” as the app was uninstalled, causing me to be unable to reroot or unroot

I rooted my phone but my root is saying “binary reserved” as the app was uninstalled, causing me to be unable to reroot or unroot, I can’t do anything when it comes to rooting. My phone is rooted but the superuser was deleted by accident and i tried to reinstall it, it installed successfully but my phone is still not giving me the option to allow an app to run with su permissions. I tried flashing odin and odin is not working, twrp, and supersu. I’m scared to flash any other root methods because I rooted my phone and the only app that stopped working was Google Chrome. I don’t want to lose access to my apps, I was trying to back up but stupid ODIN won’t let me flash TWRP or CWM recovery to my phone. My phone is a Galaxy S4 (SGH-I337).

Binary Plus – Binaryplus.io

I Am Not Admin/Owner Of The Project! !!!

Reduced Size Image

Online Date : 2021-02-28

Investment Plans: 10%-20% daily profit forever

Min Spend : 20$

Referral Commission : 5-1%

Withdrawal Type Instant

Licensed Script

DDoS Protection by DDOS-Guard

Accpet Payment : Perfectmoney, Bitcoin, Litecoin, Ethereum, Bitcoin Cash, Dogecoin, Dash.
.
About Project :

QUOTE

Our company BinaryPlus.io, created by professional traders with years of experience, hard-working and accurately carrying out objectives, is an active participant of Forex trading. With our experience and safe approach to Forex trading investment, we can manage more capital and offer our investment platform to the public and at the same time guarantee you our continued credibility and success in the journey. Great efforts have been put in place to provide our clients with a user-friendly interface and an easily understandable profit making investment platform.

JOIN NOW

Refback : http://invest-analysis.org/?a=details&lid=2492

algorithms – Assign few binary variables to make all polynomials identically zero

I have 50 polynomials $f_i$ over binary variables $(x_1,ldots,x_{100})$. Also $f_i(0,0,ldots,0)=0$
for any $i in (1,50)$. I want to assign few variables so that all $f_i$ will be
identically zero. I want to assign number of variables as small as possible. Is there
any way for this like using SMT etc? Kindly give your idea.

binary – How can you represent a Huffman-tree in Hex?

I was trying to store a Huffman tree in a binary file recently. I thought it wouldn’t be a big problem since you actually have the binary codes already in front of you.

Well, the difference is that the file (in the hex editor) is logically coded in hex. So I tried to convert the “characters” from binary to hex. Without any success.

Let’s take this tree as an example:

Huffman-tree

My first attempt was to simply convert Binary to Hex. So for example 01 became 0x01. But there is a problem now: There are duplicates. So 01 as well as just 1 both became 0x01.

So I couldn’t use that. I also tried to just represent the zeros and ones in hex, for example: 10 1... (The equivalent of 1 01) but that wouldn’t be really efficient anymore.


So how could I now make a Huffman tree in Hex? Would I maybe even have to use a different encoding?

I hope I could describe my problem well enough.

reference request – A Hadamard product of binary (or ternary) matroids

I would like to know if anyone has studied the following “Hadamard product” of binary (or ternary) matroids. (There is a notion of Hadamard product of matroids studied e.g. here but I think that one is different.)

Let $M,N$ be simple binary matroids of rank $r$ and $s$, respectively, over the same ground set $E$ of size $n$. For binary representations $(x_1,dots, x_n)$ and $(y_1,dots, y_n)$ of $M$ and $N$, respectively, define the Hadamard product of $M circ N$ to be the binary matroid represented by $(x_1 otimes y_1, dots, x_n otimes y_n)$. One can easily show that this is a well-defined matroid product, using the fact all representations of binary matroids are projectively equivalent (Proposition 6.6.5, Matroid Theory, Oxley).

After a little work, one can derive the linearly independent sets in $M circ N$. Suppose WLOG that $(x_1,dots, x_r)$ form a basis for $M$. For each $i in {1,dots, r}$, let

$$text{Supp}(i)={a in {1,dots, n} | x_a(i) neq 0},$$

where $x_a(i)in mathbb{F}_2$ is the $i$-th coordinate of $x_a$ in the basis $(x_1,dots, x_r)$. Then $S subseteq (n)$ is linearly independent in $M circ N$ if and only if for all $T subseteq (n)$ of size $1 leq |{T}| leq n-1$, there exists $i in {1,dots, r}$ such that $sum_{a in T} x_a(i) y_a neq 0$. This inequality is equivalent (over $mathbb{F}_2$), to saying that the set

$$T cap text{Supp}(i)$$ is not Eulerian in $N$, i.e. it cannot be partitioned into circuits in $N$.

As a side note, I would also be very interested in any feedback on the following conjecture, which is the $mathbb{F}_2$-version of a conjecture I have been thinking about for some time (preprint here).

Conjecture: Let $M_1,dots, M_m$ be simple binary matroids of rank $r_1,dots, r_m$, respectively over the same ground set $E$ of size $n$. If $n leq sum_{j=1}^m (r_j-1)+1$, then $M_1 circ dots circ M_m$ does not form a circuit.

I have proven this conjecture when $m=2$; or $m=3$ and $r_3=2$; or $m$ is arbitrary, $r_1geq 1$ is arbitrary, and $r_2=dots=r_m=2$.

command line – Windows CLI comparing two binary files at different offsets, reporting offsets of first difference

I am looking for a Windows command line utility that would compare two files, starting from different offsets, and report the offsets corresponding to the first identified difference. For instance, file A has a size of 100MB, file B has a size of 500MB, it could be determined that the beginning of file B matches file A at offset 104857600, but (based on a checksum comparison between file B and a 100MB block of file A starting from 104857600) that file B is not entirely contained within file A. So now I need something that does a byte-by-byte comparison between file A starting from offset 104857600 and file B starting from offset 0, then reports the offset values of the first mismatched byte.

Apparently, Windows native CLI tools comp and fc do not allow to set start offsets for the comparison (comp doesn’t even allow to compare files with different sizes). Based on this thread I tested diffutils, which doesn’t seem to suit those requirements either. I know that this can be done with a hexadecimal editor like WinHex, or dedicated compare / merge GUI utilities like WinMerge, but here a command line utility is required to process hundreds of files at once with a script.


Goal : I made a complete data recovery from a 4TB HDD, both in filesystem analysis mode and in so-called “raw file carving” mode (through file signature search) ; most of the files recovered through the second method are actually duplicates or fragments from files which could be fully recovered through the first method. Full duplicates are easy to identify, there are many dedicated tools for that purpose. I had a harder time identifying file fragments which were entirely contained within another file ; I managed to do that with WinHex’s “simultaneous search” and a PowerShell script to calculate checksums. Now I’m left with files for which a match could be found, but which are not perfect matches, meaning that they contain parts of different original files (most likely because the source drive was fragmented). At the end should only remain file fragments which do not have any counterpart within the main recovery directory.

filesystems – How open binary file

I have a file called AndroidManifest.xml I’m studying about injecting the payload manually, and for that I need to open the file to look for another file, only when I open the characters it looks like this:

^ A @ ^ B @ ^ H  

And so on, I ran this command, it shows:

charset = binary 

that is in binary, but how can I open it and read it legibly?