what is data and dictionary in huffman encoding [closed] - data-structures

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about programming within the scope defined in the help center.
Closed 8 years ago.
Improve this question
I have a basic question on the terminologies used in Huffman encoding. I tried searching on Google but no definition is available(some define them using another terms to represent them), so bit confusing for me.
My question is :
I have symbols and freq and encode like this (these are hypothetical, please don't try solving it to check the encode), my motive is just to know the meaning clear of some technical terms used for huffman:
symbol freq encode
s1 12 110
s2 5 10
s3 6 01
could some one please tell me what is data among these 3 and what is dictionary ? Please give a bit detailed explanation. Thanks

A dictionary here would be a mapping of symbols to a code
Actual data is the set of symbols and their frequencies
In your case,
DATA
symbol freq
s1 12
s2 5
s3 6
Dictionary
symbol encoding
s1 110
s2 10
s3 01

Related

The largest tile in the 2048, groups of 3 variant? [moved to SE.Math] [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about programming within the scope defined in the help center.
Closed 7 years ago.
Improve this question
Question moved to: https://math.stackexchange.com/questions/1391780/the-largest-tile-with-2048-with-groups-of-3
A sentence to use up characters.
Dropping 3 and 6 doesn't create the same type of game. It would need to be 3 and 9 (3*3). Or you end up with two completely separate sets to merge, one with base 3 the other with base 6 (2*3).
In case you drop 3 and 9 then any 3^(2^min_moves) would be an acceptable objective just like 2048 = 2^16 = 2^(2^4)
EDIT:
Looks like I missed the part about merging 3 elements. That may need to have 3 and 27 (3^3) drop in. Also the objective would end up being 3^(3^min_moves) as merging 3 tiles is a move

What format does Windows make screenshots in? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 8 years ago.
Improve this question
So here I am in quite a pickle.
If you make a screenshot in Windows 7, it is presented to you in .png format. The question is, does Windows first create a bitmap screenshot and then without your explicit consent convert it to .png? Or is it made in .png from the start?
Question no. 2:
Why it uses 24-bit format for the image? And is it 1-byte per colour or do those 24 bits include some kind of transparency?
1: It makes .png right away, and even if it didn't I don't see what difference would it make. Format .png is a raster format(bitmap) itself, very similar to .bmp, the only difference is that is can be compressed, but that doesn't erase any usable data in it.
2: Each color takes 1 byte = 8 bits, one byte for each channel, R(ed), G(reen) and B(lue). That sums up into 3 x 8 = 24 bits(not bytes). You can also add one more channel for transparency, usually called Alpha, which would be the 4th byte and then one pixel will have 32 bits.

How many permutations of an alphanumeric string of length 32 [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about programming within the scope defined in the help center.
Closed 9 years ago.
Improve this question
Considering using the characters (elements) a-z and 0-9 how many different permutations are there when using a string of length 32?
The elements can be used more than once, but the results have to be unique (as is the case with a permutation).
I've looked at WolframAlpha however that doesn't state how many 'elements' that would be used, it only considers the length.
You have 32 positions for either 10 different digits or 26 characters. In each position either goes a character or a digit so you have 36 possibilities. This leave us with:
36*36*36...*36 (32 times)
= 36^32
= 63340286662973277706162286946811886609896461828096 # (thanks Python ;) )
The answer is (26+10)^32 = 6.3340287e+49
Well, it depends on if you're allowed to have replacement or not.
If you are allowed replacement, you have 36 possibilities for each character position = 36^32.
If you're not allowed replacement, you have 36 for the first, 35 for the second, etc, until you run out of character positions. That's 36! / 4!, also written as 36 P 32.

How to lock cells [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed 8 years ago.
This question appears to be off-topic because it lacks sufficient information to diagnose the problem. Describe your problem in more detail or include a minimal example in the question itself.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Improve this question
say i have 7 groups of 2 columns (14 columns in total) & many rows like "ab" "cd" "ef" ect... but i want to lock one the cells in that column say "a1" has a value then "b1" should be lock or if "b1" has a value then "a1" should be lock automatic like the otherones "cd" "ef" ... But not to change any other cells only the ones in their group ab cd ef ect..
more exp:: if c20 have a value or number then d20 should be lock
my sheet is base on profit or lose so i dont want 1 profit or 1 lose to be entered in the same group "ab" "cd" "ef"
You can prevent data entry with Data Validation (offered as an alternative to locking cells) and a Custom formula such as =B1="" in A1 and =A1="" in B1. For each such pair only the first entered value will be accepted.

Linear Probing in Hashing [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
A hash table with 10 buckets with one slot per bucket is depicted .The Symbol S1 to S7 are initially entered using a hashing function with linear probing . The maximum no. of comparisons needed in searching an item that is not present??
I am unable to solve this question. Please explain me how it can be computed in simple language for a learner
Consider what happens when all symbols hash to the same number (say zero for simplicity). How many comparisons are required to insert S1, then S2, etc?

Resources