Symbolic Algebra Compressed Trees in ANF Sum-of-Products Form

В роботі Опубліковано %project.relative_time Оплачується при отриманні
В роботі Оплачується при отриманні

Develop three Linux command line functions CTPrint, CTXOR, and CTAND

based on the three C functions described in the attached file.

While implementation is preferred in normal ANSI C, it can also be implemented in Python.

The tools will be used for solution of large constraint sets of a hundred or so product terms so fast compact coding is critical. Recursion might simplify the coding. Be aware that worst case ANF can expand to 2^N terms. A lower state management scheme is likely to be more successful and faster, than calling frames and stack allocation.

It would be useful to use switch/case to parse the compressed tree stream, and avoid if/elseif/elseif/else

ANF is Algebraic Normal Form ... a special AND/XOR boolean algebra form. See the wikipedia description.

the anfct.c file has one omission, and that is if the first character of a CT stream is '~' the expression is in complement form, IE is "1 ^ ctexpression", such that the string "A\nB\nC\n~12132333\n" represents "1 ^ A&C ^ A&B ^ A&B&C" and the string "A[3]\n~12132333\n" represents "1 ^ A0&A2 ^ A0&A1 ^ A0&A1&A2". The CTAND example in anfct.c is wrong, the result should be 000 or <null>

CTPrint <filename>, will print the CT file in symbolic form. Examples would be to print fiile1 or file2 below from the CTAND example.

CTAND <input 1> <input 2> <output>, will Symbolic AND (boolean OR binary) the two input CT files and create the output CT file with the product.

It would probably be useful to include '(' and ')' as white space in the CT stream.

If file1 is the expression "B&C ^ A ^ A&C ^ A&B" IE (011 ^ 100 ^ 101 ^ 110) it would contain:

A

B

C

211322333033

#4

If file2 is the expression "C ^ B ^ A" IE (001 ^ 010 ^ 100) it would contain:

A

B

C

2213033003

#3

then CTAND file1 file2 output, will create the output file:

A

B

C

1223332333

#4

The intermediate expressions for the above CTAND example are:

(B&C ^ A ^ A&C ^ A&B) & A -> (A&B&C ^ A ^ A&C ^ A&B)

(B&C ^ A ^ A&C ^ A&B) & B -> (B&C ^ A&B ^ A&B&C ^ A&B) -> (B&C ^ A&B&C)

(B&C ^ A ^ A&C ^ A&B) & C -> (B&C ^ A&C ^ A&C ^ A&B&C)-> (B&C ^ A&B&C)

(B&C ^ A&B&C) ^ (B&C ^ A&B&C) ^ (A&B&C ^ A ^ A&C ^ A&B) -> ( A ^ A&C ^ A&B ^ A&B&C)

( A ^ A&C ^ A&B ^ A&B&C) is (100 ^ 101 ^ 110 ^ 111) which encodes as 1223332333

To help understand the BRANCH-END-END pairings I'll add some parens to emphasize

the pairing for each layer of branches in the three file streams:

file1: (2113(2(233)303)3)

file2: (2(21303)3003)

outfile: 1(2(233)3(233)3)

Note there are two 3's for every 2 in these groupings, one for the left/0 side, and one for the right/1 side.

One simple solution to CTAND is to extract every possible product term, do the symbolic AND function, and then merge the updated product into the output tree in memory. This is less desirable, as it limits constraint sets to what can fit entirely in memory.

A better solution is to deal with the two cases that require action to be taken. The first is simple, and that is where a 1 is OR'd into the stream where a 0 is, simply replace 0 with a 1. The second is a bit more difficult, and that is where a 1 is OR'd into the stream where a BRANCH is, which requires merging the left/0 side into the right/1 side, and deleting any duplicate pairs that might exist, effectively removing the BRANCH. If the left/0 and right/1 sides can fit in memory this can be done quickly, otherwise it will require left/right file descriptors/pointers or copying the left/0 and right/1 sides into temporary files, for the merge operation. This will have to be done at each point in the stream where a 1 is OR'd with a BRANCH, replacing a BRANCH with a 1. I have a 120 cores and a terabyte of SDRAM in my compute server, so in memory is possible for most modest to large projects.

In memory the CT stream can be compressed into 2bit tokens, with a 4X compression of the CT stream.

CTXOR <input 1> <input 2> <output2>, will merge the two input CT files and create the output CT file.

CTXOR fiile1 file2 output2 will produce:

A

B

C

2213233332333

#5

C ^ B ^ B&C ^ A&C ^ A&B -> 001 ^ 010 ^ 011 ^ 101 ^ 110

(2(213(233)3)3(233)3)

Python Програмування на С Algorithm Analysis

ID Проекту: #36890515

Про проект

29 заявок(-ки) Дистанційний проект Остання активність 10 місяці(в) тому

Доручено:

rgarcia3934

Hello there, I think I could be done in C programming language, but if you prefer python, then I could in python. Anyway, when is the due date? Do you have additional requirements? Do you have more examples of compres Більше

$35 USD за 15 дні(-в)
(20 відгуків(-и))
4.7

29 фрілансерів(-и) готові виконати цю роботу у середньому за $128

gowthamsarathy

Hi there yes I am expert in C programming and I can help you out for sure Kindly send me a message we'll discuss further Looking forward to hear you Thank you

$50 USD за 1 день
(178 відгуків(и))
5.7
Quilance

Expert in C/C++ for Linux, Windows and embedded systems. I'm well experienced in data structures and algorithms. As for the most of my career I had to write optimized code.

$125 USD за 3 дні(-в)
(12 відгуків(и))
5.5
rashidamjad

Hi there, How are you? I can work with your project requirements mentioned. I can definitely pull it off once provided with detailed file of your requirements. Some points are needed to be discussed before starting so Більше

$250 USD за 8 дні(-в)
(7 відгуків(и))
5.2
Sendo77

❗❗❗Senior High Skilled(7+ years) Python developer ❗❗❗ Hi, Please check my profile. I am a skilled python developer and I have done similar project before. If you have any questions, let's chat! Sincerely, Alvaro

$200 USD за 7 дні(-в)
(7 відгуків(и))
5.0
dvcontact

if/elseif/elseif/elseif/elseif/elseif/elseif/elseif/elseif/elseif/elseif/elseif/elseif/elseif/elseif/elseif/elseif/elseif/elseif/elseif/elseif/elseif/elseif/elseif/elseif/elseif/elseif/elseif/elseif/elseif/elseif/elsei Більше

$140 USD за 7 дні(-в)
(6 відгуків(и))
4.8
Techalchemy

Hi i have read your project, i am interested in your project, but i have some doubts, please clear my doubts, i am ready to start the work from now.

$140 USD за 7 дні(-в)
(11 відгуків(и))
4.5
mobimubasir

Hello. I read your requirement and also check attachment i will do that. Please come on chat we will discuss more about this. I will waiting your reply

$100 USD за 1 день
(7 відгуків(и))
3.6
romasatrian

Hi, Thank you for considering my proposal. I'm really interested in your project Symbolic Algebra Compressed Trees in ANF Sum-of-Products Form. I would like to grab this opportunity and will work till you get 100% s Більше

$140 USD за 7 дні(-в)
(3 відгуків(и))
2.8
HemantManglani01

Hey there! I get what you're looking for and I completely understand your needs. With over Five years of experience in Python and web frameworks, specifically Django, Flask, Docker, and AWS services. I have gained valu Більше

$225 USD за 7 дні(-в)
(4 відгуків(и))
2.8
dohuutiepuct

Hi. Thanks for your posting. I have just read your proposal and I am sure I can complete the project on time. I am an expert in C/C++ who has many years of experiences. Please contact me to discuss about the project i Більше

$100 USD за 2 дні(-в)
(1 відгук)
2.7
manpreetkaur991

Hello there! My name is Manpreet and I am a senior web and mobile developer. I have extensive experience in programming languages like PHP, Python, C, JavaScript and more. I understand that you are looking for three L Більше

$250 USD за 7 дні(-в)
(1 відгук)
3.2
DataScinceFizer

I developed an intuitive feeling about python programming. I can write clean validated python code and make a device-supported py. File. https://www.freelancer.com/projects/python/Project-for32411503/reviews https://ww Більше

$100 USD за 3 дні(-в)
(4 відгуків(и))
2.1
rajeevnewnetlink

Hello John Lawrence B., Symbolic Algebra Compressed Trees in ANF Sum-of-Products FormJohn Lawrence B.C Programming, Python, Algorithm AnalysisC Programming, PythonUnited States We are an expert team which have many y Більше

$150 USD за 7 дні(-в)
(2 відгуків(и))
1.2
Hammad8475

Hello, my name is Hammad and I am a full stack developer and website designer with 4+ years of experience in the industry. I understand that you are looking for someone to develop three Linux command line functions bas Більше

$130 USD за 4 дні(-в)
(0 відгуків(и))
0.0
MunzaibHussain

Thanks for considering me for this project! I am a skilled Full Stack Developer/Designer with a passion for creating exceptional digital experiences. With [insert number] years of industry experience, I can provide the Більше

$150 USD за 5 дні(-в)
(0 відгуків(и))
0.0
IcsfIT789

Hi dear client, I am a Data Scientist and Computers and Systems Engineer (CSE) has great knowledge an enthusiasm in program Development. I can write clean, validated Chatbot code and make a device-supported . My top pr Більше

$40 USD за 2 дні(-в)
(0 відгуків(и))
0.0
mehmetdic745

Hi there! Please share more details over chat so I can start your work right away, Thanks for your attention.

$140 USD за 7 дні(-в)
(0 відгуків(и))
0.0
Sidrairfan078

Hi, how are you? I read your project details and really interested in this project. I am full stack developer having a 5+ year experience doing similar jobs regarding to these skills C Programming, Python and Algorithm Більше

$155 USD за 8 дні(-в)
(0 відгуків(и))
0.0
ashrafhamxa

Hi John Lawrence B., Good evening! we need to chat regarding your project "Symbolic Algebra Compressed Trees in ANF Sum-of-Products Form" I realized you need an experienced graphic designer with a strong track record Більше

$170 USD за 3 дні(-в)
(0 відгуків(и))
0.0
QinKebin

Dear sir, I am a senior software engineer who has vast experience with tech stacks below for 8 years. I have rich experience in Algorithm Analysis, Python and C Programming, so I can deliver the best result. - Python Більше

$30 USD за 5 дні(-в)
(0 відгуків(и))
0.0