Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 521769
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T08:17:04+00:00 2026-05-13T08:17:04+00:00

There are these 19 bytes (I am looking for combinations not the number of

  • 0

There are these 19 bytes (I am looking for combinations not the number of combinations)

17 00 00 00 A4 EA DB 13 02 00 00 00 00 00 00 A3 D3 02 CC

I need any possible unique combination which matches these “rules”:

  • at least 4 bytes long

  • the order of the bytes can’t change(so 17 A3 D3 02 CC is ok but A3 D3 02 CC 17 isn’t, because
    in the original string 17 was at the being but A3 D3 02 CC was at the end)

Let me try giving you examples of possible combinations:

17 00 00 00 A4 EA DB 13 02 00 00 00 00 00 00 A3 D3 02

17 00 00 00 A4 EA DB 13 02 00 00 00 00 00 00 A3 D3

17 00 00 00 A4 EA DB 13 02 00 00 00 00 00 00 A3

all the way to
17 00 00 00

17 A3 D3 02 CC

17 00 A3 D3 02 CC

00 A3 D3 02 CC

17 A4 02 CC

See the bytes stay in the same order for example the first byte 17 can only in the first byte’s place

I don’t want combination like

A4 17 02 CC

Because now 17 has changed order compared to A4

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T08:17:04+00:00Added an answer on May 13, 2026 at 8:17 am

    I think this is what you are looking for:

    Module Module1
    
        Sub Main()
            Dim bytes() As Byte = {&H17, &H0, &H0, &H0, &HA4, &HEA, &HDB, &H13, &H2, &H0, &H0, &H0, &H0, &H0, &H0, &HA3, &HD3, &H2, &HCC}
    
            Combine(New Byte() {}, bytes)
        End Sub
    
        Sub Combine(ByVal sequence() As Byte, ByVal pool() As Byte)
            '   test current sequence
            If Test(sequence) Then
                Console.Write("Found sequence: ")
                For Each b As Byte In sequence
                    Console.Write("{0:X2} ", b)
                Next
                Console.WriteLine()
            End If
    
            '   done if pool is empty
            If pool.Length = 0 Then
                Return
            End If
    
            '   recurse adding next byte from the pool
            Dim newSequence(sequence.Length) As Byte
            Array.Copy(sequence, newSequence, sequence.Length)
            newSequence(sequence.Length) = pool(0)
            Dim newPool(pool.Length - 2) As Byte
            Array.Copy(pool, 1, newPool, 0, pool.Length - 1)
            Combine(newSequence, newPool)
    
            '   recurse without adding next byte from the pool
            Combine(sequence, newPool)
        End Sub
    
        Function Test(ByVal sequence() As Byte) As Boolean
            '   the test function that you haven't provided goes here
    
            '   this example returns True if the sequence is 4 bytes or more, causing every combination of at least 4 bytes to be printed
            If (sequence.Length >= 4) Then
                Test = True
            Else
                Test = False
            End If
        End Function
    
    End Module
    

    I leave the implementation of the Test function to you as you didn’t provide that in the original question. My implementation basically treats all sequences of 4 bytes or more as passing the test, so it prints all combinations.

    I used a recursive algorithm that starts with an empty sequence and all 19 of your bytes in a “pool” of bytes. I then recurse both by moving the first byte of the pool into the sequence I’m building, then by ignoring the first byte of the pool altogether.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there a Windows command that will output the size in bytes of a
I have writtent some Oracle storedprocedures in these there are more then 20 input
Is there a common formula that could provide a unique value for a 512
Is there any way to perform private key encryption in C#? I know about
I'm looking to calculate entropy and mutual information a huge number of times in
Is there a 4 byte unsigned int data type in MS SQL Server? Am
Is there a standards-complaint method to represent a byte in ANSI (C89/90) C? I
Is there a way to change the encoding used by the String(byte[]) constructor ?
We get these ~50GB data files consisting of 16 byte codes, and I want
Hi is there away to detect the length of a byte before I get

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.