473,811 Members | 3,811 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Is there any algorithm which can shorten a certain very large big integer?

2 New Member
Hi Everybody,
This is the first time I have ever posted a question so I may not be familiar with the pattern to adopt. Hereunder my problem goes.


I have a function which generates a very large Integer (I do this by using Biginteger from vjslib.dll and I am able to operate all kind of arithmetic operators on such a biginteger.)

But, My goal is to shorten this biginteger into a small integer. Is there any algorithm? or a mathematical Formula which I can use to represent it in a small integer and use some reverse formula to get the original Biginteger?

The big integer my function creates goes like this:
987612101123134 893759879561574 623648648234587 945723457348568 346586823456861 312374908137793 245792345793475 897836587236458 678234568234658 362458762347895 689324568923465 786361238467153 761234757457236 456663824768734 612834681236481 236481634138461 238467834576341 236412783461278 346781236481263 489126348971238 411346812734678 12364789

I do not want to represent my bigInteger in a higher base as it will not be possible to do conversion into higher bases with such a large integer.

Anyone who can help me out with this question, I shall be very thankful to him.
Dec 8 '10 #1
2 3448
Stewart Ross
2,545 Recognized Expert Moderator Specialist
Hi. As far as I know it is not possible to transfer your very large number to an equivalent smaller whole-number container of some kind unless you change the number's base, which you've already said you cannot do.

It may well be possible to compress your large number using a compression algorithm to shorten and replace combinations of digits, but the end result would not be a smaller integer as such, but a coded representation of the larger value. This encoded value would not be a numeric value as such, but a compressed representation of a numeric value whose components will depend on the compression algorithm used. As this is not what you have asked for in your question I'd have to answer that it is not possible to create a 'smaller' true numeric representation of your large number without loss of information unless you go the base-change route that you've already ruled out.

If your big integer value is generated as a text string then you can of course parse this down and extract the individual components into a long-integer array or similar, but as your question relates to converting whole number to whole number I'll leave this one as a possibility for you to consider in due course.

-Stewart
Dec 8 '10 #2
Atiq ur Rehman
2 New Member
Mr. Stewart. Thank you so much for putting your efforts on elaborating my concern.

Stewart, I think the only possibility in achieving small whole number or array of small whole numbers out of a large string of numbers is to use combinations algorithm. These days I am studying the Fibonacci Number series and trying to incorporate it's logic somewhere in my algorithm.

Stewart, i am also interested to parse this down to extract individual components into a long-integer array or similar. Can you provide me some coding pastern/examples to start with?

Again I am so thankful to you for your kind advises on this matter.
Dec 27 '10 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

0
1164
by: Scott Seidman | last post by:
I have a data file structure that I am consistently confined by. I'm considering alternatives, and a self-defining markup is one of them. The problem is that this file consists of some header strings and floats (which I would gladly represent as strings), but the huge bulk of the data is large blocks of integers. Is there a standard, or one forming, for storing integer blocks withing XML files? Thanks
4
2005
by: LBX | last post by:
I am looking for C++ libraries that handle very large integers. The purpose of the large integers are to handle RSA algorithms. So I need to be able to multiply, power, and modulus. Having one that is fast will really help. Please provide links to libraries or to places that can assist in programming the library. ----== Posted via Newsfeeds.Com - Unlimited-Uncensored-Secure Usenet News==----
2
2639
by: Matthew Holton | last post by:
Hello All, I am looking to convert a currency data type to a large_integer. Thanks in advance
42
3383
by: yong | last post by:
Hi all I have an large integer in this format x1*256^5 + x2*256^4 + x3*256^3 + x4*256^2 + x5*256 + x6 now I must convert it to this format y1*900^4 + y2*900^3 + y3*900^2 + y4*900 + y5 x1-x5 is given.I must get y1-y4 from it. How can I do this on my 32bit PC?
0
9724
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10379
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10394
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10127
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7665
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6882
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5552
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4336
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
3015
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.