GRAPH EQUATION MODELING FOR MATHEMATICAL EQUATION DECOMPOSITION AND AUTOMATED CODE GENERATION
20210174233 · 2021-06-10
Assignee
Inventors
Cpc classification
G06F17/11
PHYSICS
G06N10/00
PHYSICS
G06F17/15
PHYSICS
G06N5/01
PHYSICS
G06F40/111
PHYSICS
G06F40/154
PHYSICS
International classification
G06N7/00
PHYSICS
Abstract
A method of performing graph equation modeling. The method includes receiving an input of a mathematical equation from a user via a user interface. The method also includes using a processor, performing processing on the input of the mathematical equation to decompose the mathematical equation into a plurality of tokens to generate an equation graph corresponding to the mathematical equation. The method also includes automatically generating computer code for a user-specified computing language based on the equation graph. The method also includes causing the automatically generated computer code to be presented to the user via the user interface, the automatically generated computer code corresponding to the inputted mathematical equation defined in a computing environment.
Claims
1. A method of performing graph equation modeling, the method comprising: receiving an input of a mathematical equation from a user via a user interface; using a processor, performing processing on the input of the mathematical equation to decompose the mathematical equation into a plurality of tokens to generate an equation graph corresponding to the mathematical equation; generating computer code in a user-specified computing language based on the equation graph; and causing the computer code to be presented to the user via the user interface, the computer code corresponding to the inputted mathematical equation defined in a computing environment.
2. The method of claim 1, further comprising: sending the computer code to a computing device configured to be a problem solver; receiving a solution to the mathematical equation from the problem solver based on the computer code; and causing the solution to the mathematical equation to be presented to the user via the user interface.
3. The method of claim 2, wherein the problem solver is a Digital Annealer, a Digital Annealer Simulator, a Quantum Annealer, or a D-Wave Solver.
4. The method of claim 1, wherein the user input is received in a natural language format in the user interface.
5. The method of claim 1, wherein the user input is received as an equation input in the user interface and the method further comprises converting the input into a LaTex format.
6. The method of claim 1, wherein the equation graph comprises a chain of tokens where each token is a node and vertexes of the equation graph correlate with a connection between tokens.
7. The method of claim 1, further comprising: requesting required user input from the user via the user interface; receiving the required user input from the user via the user interface; generating an abstract model of the mathematical equation based on the equation graph, the abstract model including a plurality of the required user input; and performing additional processing on the required user input and updating the equation graph based on the required user input.
8. The method of claim 7, further comprising: sending the computer code to a computing device configured to be a problem solver; receiving a solution to the mathematical equation from the problem solver based on the computer code; and causing the solution to the mathematical equation code to be presented to the user via the user interface.
9. A non-transitory computer-readable medium having encoded therein programming code executable by a processor to perform or control performance of operations comprising: receiving an input of a mathematical equation from a user via a user interface; using a processor, performing processing on the input of the mathematical equation to decompose the mathematical equation into a plurality of tokens to generate an equation graph corresponding to the mathematical equation; generating computer code in a user-specified computing language based on the equation graph; and causing the generated computer code to be presented to the user via the user interface, the computer code corresponding to the inputted mathematical equation defined in a computing environment.
10. The non-transitory computer-readable medium of claim 9, the operations further comprising: sending the computer code to a computing device configured to be a problem solver; receiving a solution to the mathematical equation from the problem solver based on the computer code; and causing the solution to the mathematical equation to be presented to the user via the user interface.
12. The non-transitory computer-readable medium of claim 11, wherein the problem solver is a Digital Annealer, a Digital Annealer Simulator, a Quantum Annealer, or a D-Wave Solver.
13. The non-transitory computer-readable medium of claim 9, wherein the user input is received in a natural language input format in the user interface.
14. The non-transitory computer-readable medium of claim 9, wherein the user input is received as an equation input in the user interface and the method further comprises converting the input into a LaTex format.
15. The non-transitory computer-readable medium of claim 9, wherein the equation graph comprises a chain of tokens where each token is a node and vertexes of the equation graph correlate with the connection between tokens.
16. The non-transitory computer-readable medium of claim 9, the operations further comprising: generating an abstract model of the mathematical equation based on the equation graph, the abstract model including a plurality of required user input; requesting the required user input from the user via the user interface; receiving required user input from the user via the user interface; and performing additional processing on the required user input and updating the equation graph based on the received required user input.
17. A system of performing graph equation modeling, the system comprising: one or more processors configured to: receive an input of a mathematical equation from a user via a user interface; perform processing on the input of the mathematical equation to decompose the mathematical equation into a plurality of tokens to generate an equation graph corresponding to the mathematical equation; generate computer code in a user-specified computing language based on the equation graph; and cause the computer code to be presented to the user via the user interface, the computer code corresponding to the inputted mathematical equation defined in a computing environment.
18. The system of claim 17, the one or more processors being further configured to: send the automatically generated computer code to a computing device configured to be a problem solver; receive a solution to the mathematical equation from the problem solver based on the automatically generated computer code; and cause the solution to the mathematical equation to be presented to the user via the user interface.
19. The system of claim 18, wherein the problem solver is a Digital Annealer, a Digital Annealer Simulator, a Quantum Annealer, or a D-Wave Solver.
20. The system of claim 17, wherein the processor is further configured to: receive an input of a mathematical equation from a user via a user interface; use a processor, performing processing on the input of the mathematical equation to decompose the mathematical equation into a plurality of tokens to generate an equation graph corresponding to the mathematical equation; generate computer code in a user-specified computing language based on the equation graph; and cause the computer code to be presented to the user via the user interface, the computer code corresponding to the inputted mathematical equation defined in a computing environment.
Description
BRIEF DESCRIPTION OF THE DRAWINGS
[0008] Example embodiments will be described and explained with additional specificity and detail through the use of the accompanying drawings in which:
[0009]
[0010]
[0011]
[0012]
[0013]
[0014]
[0015]
[0016]
[0017]
[0018]
[0019]
[0020]
[0021]
[0022]
[0023]
[0024]
[0025]
[0026]
[0027]
DESCRIPTION OF EMBODIMENTS
[0028] The embodiments discussed in the present disclosure are related to methods and systems for performing graph equation modeling for mathematical equation decomposition and an automated code generation in a computing device. More specifically, embodiments described herein are directed to systems and methods for decomposing a mathematical equation that is input. The equation is decomposed into a graph structure, which may then be used for mathematical modeling, and in some instances, may then be used by different computer solvers to find solutions to the given input equation. As may be understood, using graph modeling, it is possible to model various features of the equation efficiently and effectively. In addition, the systems described herein provide a platform to interpret and describe a variety of different mathematical equations.
[0029] The proposed systems herein aim to provide a solution to various mathematical problems based on a relatively simplified user input, such as text, mathematical equation, or other data. Using this user input, the system and methods described herein are able to automatically produce a source-code corresponding to the user's input definition, which is then capable of being utilized by a computer solver, such as a digital annealer, to find a solution. Hence, in at least one embodiment described herein, an embedded hardware device is provided which is capable of automatically generating source code based on a mathematical equation input. In other embodiments, this automatically generated source code is then used by a computing device to find a solution to the mathematical equation which was input.
[0030]
[0031] The network 150 may be configured to communicatively couple the user device 110, an equation processor 180, and a problem solver 170. In some embodiments, network 150 may be any network or configuration of networks configured to send and receive communications between devices. In some embodiments, network 150 may include a conventional type network, a wired or wireless network, and may have numerous different configurations. Furthermore, network 150 may include a local area network (LAN), a wide area network (WAN) (e.g., the Internet), or other interconnected data paths across which multiple devices and/or entities may communicate. In some embodiments, network 150 may include a peer-to-peer network. Network 150 may also be coupled to or may include portions of a telecommunications network for sending data in a variety of different communication protocols. In some embodiments, network 150 may include Bluetooth® communication networks or cellular communication networks for sending and receiving communications and/or data including via short message service (SMS), multimedia messaging service (MMS), hypertext transfer protocol (HTTP), direct data connection, wireless application protocol (WAP), e-mail, etc. Network 150 may also include a mobile data network that may include third-generation (3G), fourth-generation (4G), long-term evolution (LTE), long-term evolution advanced (LTE-A), Voice-over-LTE (“VoLTE”) or any other mobile data network or combination of mobile data networks. Further, network 150 may include one or more IEEE 802.11 wireless networks.
[0032] The system also includes an equation processor 180 comprising a computing device which is also connected to the network 150 and which is configured to send and receive communications with other computing devices connected to the network 150, including the user device 110 and the problem solver 170. The equation processor 180 is configured to receive the mathematical equation input by the user via the user interface 105 and, as described below, perform a variety of processes on the mathematical equation in order to make the mathematical equation more suitable for solving by a computing device, such as, for example, the problem solver 170. In this example, the equation processor 180 is shown as including an equation autodetection module 120, a problem modeling module 130, and an autonomous code generation module 130, although it should be understood that the equation processor 180 may include additional components or that the modules 120, 130, and 140 described therein may be combined and performed by a single processor specifically configured to perform the various processes described herein. Furthermore, although the equation processor 180 is shown as a separate component than the problem solver 170 in
[0033] The problem solver 170 may be any number of computing devices which are specifically designed to have the processing power and general capacity to solve problems. Examples of problem solvers 170 which may be used in association with the present invention include, for example, a digital annealer simulator, a Fujitsu® Digital Annealer, a D-Wave Solver, or any other solvers including cloud computing-based solvers.
[0034] In some embodiments, any one of the user device 110, problem solver 170, and equation processor 180, may include any configuration of hardware, such as servers and databases that are networked together and configured to perform a task. For example, the estimation system 110 may include multiple computing systems, such as multiple servers, that are networked together and configured to perform operations as described in this disclosure and may include computer-readable-instructions that are configured to be executed by one or more devices to perform operations described in this disclosure.
[0035] Additionally, modifications, additions, or omissions may be made to
[0036]
[0037] The method 200 may begin at block 210, where a user input of a mathematical equation is received. As is described more fully below, at block 220, the mathematical equation is converted into an equation graph. At block 230, the equation graph is used to automatically generate computer code corresponding to the inputted mathematical equation 230. In some embodiments, the automatically generated computer code may then be sent at block 240 to a problem solver. At block 250, a solution to the mathematical equation may then be received by the problem solver, and at block 260, the solution may be forwarded to the user via the user interface.
[0038] Modifications, additions, or omissions may be made to the method 200 without departing from the scope of the present disclosure. For example, the operations of method 200 may be implemented in differing order. Additionally or alternatively, two or more operations may be performed at the same time. Furthermore, the outlined operations and actions are only provided as examples, and some of the operations and actions may be optional, combined into fewer operations and actions, or expanded into additional operations and actions without detracting from the essence of the disclosed embodiments.
[0039]
[0040] As is described more fully below, the equation processor 180 is then able to receive the mathematical equation input by the user and perform a variety of automatic operations. In the example shown in
[0041] Upon the user selection of a “run” button 320, the equation processor 180 may perform autonomous code generation to output the computer code 400 shown in
[0042] Some embodiments described herein utilize a LaTex® interface. As may be understood, one advantage of such configurations is that it provides a system and method which is capable of processing a large number of mathematical problems. For example, a large process download or dump of different problems may be obtained from a website such as Wikipedia®, scientific journals, or the like. Then, using the automated computer-code generation processes described herein, powerful computer solvers may then be used to solve the various problems. As may be understood, this provides efficient and accurate solutions to an extensive array of problems, benefiting users of said websites and also better utilizing the computer solvers.
[0043] Embodiments described herein provide a simple interface which may be used both by novice users and more advanced users so as to enable them to more efficiently obtain computer code which corresponds to an inputted mathematical equation, but also which assists them in obtaining more efficient and accurate solutions to those equations. Although in the example described above a LaTex® interface is described, it should be understood that other inputting formats may be used such as natural language based descriptions (i.e., English description or Japanese description). Some advantages of the LaTex® interface is that it proves a simple input and output interface that is generally known and understood by those of skill in the art, along with enabling a user to define both objective and constraints along with given data. It should be understood, however, that additional options for user input may be used in association with the LaTex® interface or other interfaces. For example, natural language understanding (NLU) may be utilized and or other complex input means may be used, such as Pyomo®, A Mathematical Programming Language (AMPL), or the like, which enable a user to define a problem according to their unique requirements.
[0044] Further, the user interface 110 may include a variety of different inputting mechanisms, including an editor, integrated development environments, a notebook, and a visualization tool. In order to interpret the inputted mathematical equations, it should be noted that a variety of different tools may be used as a component of or in association with the problem solver 170, including a source-code generator, complex language model understanding, a LaTex® interpreter, a NLU module, Software mapping from Software as a Service (SaaS) to a Digital Annealer or other solving computer, and a means for performing high-speed file transfer. The problem solver 170 may include an AMPL, Pyomo, PyQUBO, and/or D-Wave Ocean. The problem solver 170 may also include a PyQUBO Connector, a D-Wave connector, and in some instances the problem solver 170 may include a Digital Annealer Simulation, a Digital Annealer Solver, and/or a D-Wave Solver or any cloud computing based solver.
[0045] Returning now to the user interface 110, embodiments described herein allow a user to define a mathematical problem using mixed natural language, such as, for example, English, and a known formation such as LaTex®. Conversely, a user who is more savvy may elect to use a LaTex® only notation. Also, a user may upload their own equation using a Tex file or using MPS or in an LP format.
[0046] Returning to
[0047]
[0048] The method 500 may begin at block 510, where a user input of a mathematical equation is received. In some instances, an equation language input may be used to obtain user input so that a user can interactively enter an equation. In one embodiment, the user input experience may be similar to inputting the mathematical equation into a Microsoft Word Equation building tool which is configured to assist in a user in entering a mathematical equation. The equation language input may then be treated as a LaTex® input and in some instances a visual definition of the inputted mathematical equation may be displayed to the user. In some instances, the inputted mathematical equation may be displayed using Javascript. Also, the mathematical equation may be inputted as a text string value comprising LaTex® input which defines the equation.
[0049] In some instances, a list of template equations may be provided to a user so as to enable the user to customize the input of the equation.
[0050] Returning to
[0051] At block 520, the mathematical equation is tokenized. In some instances, the string values are tokenized by splitting lines and segmenting each line. During this process, each token may be considered as one segment of given input. In this instance, the output of the tokenizer is a chain of tokens where each token is a node and vertexes which form a connection between tokens.
[0052]
[0053] At block 610, a line tokenizing process is performed. During this process, the line tokenizer may consider terms ‘\n,’ \t\n,’ ‘//’ as separators to split the input into an array of tokens where each item is a single line of input. At block 620, a token combining process may be performed. In this instance, split lines of the inputted mathematical equation may be needed to be connected to previous tokens in order for proper notation to be achieved. For example, a user may have incorrectly or inadvertently pressed enter and consequently create split tokens. Alternatively, in some instances a mathematical equation inputted using LaTex®, which has erroneously added additional lines.
[0054] At block 630, a parenthesis tokenizing process is performed. In this process, each segment is decomposed according to identified parenthesis. For example,
[0055] Modifications, additions, or omissions may be made to the methods 500 and 600 without departing from the scope of the present disclosure. For example, the operations of methods 500 and 600 may be implemented in differing order. Additionally or alternatively, two or more operations may be performed at the same time. Furthermore, the outlined operations and actions are only provided as examples, and some of the operations and actions may be optional, combined into fewer operations and actions, or expanded into additional operations and actions without detracting from the essence of the disclosed embodiments.
[0056] Returning to
[0057]
[0058]
[0059]
[0060]
[0061] It may be necessary to process a vector. In such instances, terms may be used to represent vector representation as is shown in
[0062] Returning to
[0063] In some instances, the problems modeling module 130 may also perform an input symbol extraction process. During this process, an input may be analyzed to produce a list of variables (V.sub.S) from summation Σ.sub.I.sup.FT that includes a finite set (F) and a term (T). In addition, the symbols are extracted from constants and variables to produce (V.sub.C). The symbols from constraints may be extracted to produce (V.sub.L). Consequently, the final list of input symbols which require input from the user can be listed as follows:
V=V.sub.S−V.sub.C−V.sub.L,
wherein V represents symbols which have been extracted from summation forms but which do not appear in the definition, and which are required to be given by the user.
[0064] As may be understood, in order to create a model in a specific computer language, such as Pyomo, a user may either produce a concrete module by providing the system with all the data it would require to produce the model, or conversely, an abstract model may be created by first developing the model and then supplying data after the abstract model has been generated. One benefit of generating the abstract model is that there is no requirement to provide all the required data during the development of the model. Further, since the model is decoupled from the data, it is possible to find a similar abstract model so that a database of existing template abstracts may be generated, stored, and easily retrieved for future uses.
[0065] Once a model in a specific language is generated based on a specific computer language, it may be necessary to ensure that models which are generated in other computer languages produce equivalent structures and solutions. For example, once the equation graph is generated, it is important to ensure that the automatically generated computer code corresponding in a first language, PyQUBO for example, specifically designed for use in a Digital Annealing Solver, corresponds to and would result in the same solution which would be generated using another solver, such as, for example Pyomo, which may be used with other solvers, such as CPLEX, GUROBI, and the like. In order to ensure the appropriate continuity, each time an object of the inputted equation is modified or a necessary input is modified, the model and equation graph is updated so as to correspond with the current structure.
[0066]
[0067] As was previously described, in some instances the equation graph may be used to generate an abstract model, which requires further input to define variables in order to obtain a solution.
[0068] As was previously described, one advantage of the embodiments described herein is the ability to generate codes from updated equation, which allows a user to customize the code. The technology can be described as low-code environment when it allows a citizen developer to design and develop different application without writing a code. Therefore, users such as non-technical developers are able to define a problem and the automation code generator produce source-code that can be executed on different solvers including quantum annealing computers and other similar solver machines.
[0069]
[0070] Generally, processor 1910 may include any suitable special-purpose or general-purpose computer, computing entity, or processing device including various computer hardware or software modules and may be configured to execute instructions stored on any applicable computer-readable storage media. For example, processor 1910 may include a microprocessor, a microcontroller, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a Field-Programmable Gate Array (FPGA), or any other digital or analog circuitry configured to interpret and/or to execute program instructions and/or to process data.
[0071] Although illustrated as a single processor in
[0072] After the program instructions are loaded into memory 1920, processor 1910 may execute the program instructions, such as instructions to perform flow 200, flow 500, flow 600, method 200, method 500, and method 600 as described herein. For example, processor 1910 may retrieve or receive the mathematical equation as user input and automatically generate computer code corresponding to the mathematical equation. Processor 1910 may also execute the computer code to find a solution to the mathematical equation and to cause the solution to be presented to the user via a user interface.
[0073] Memory 1920 and data storage 1930 may include computer-readable storage media or one or more computer-readable storage mediums for carrying or having computer-executable instructions or data structures stored thereon. Such computer-readable storage media may be any available media that may be accessed by a general-purpose or special-purpose computer, such as processor 1910.
[0074] By way of example, and not limitation, such computer-readable storage media may include non-transitory computer-readable storage media including Random Access Memory (RAM), Read-Only Memory (ROM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Compact Disc Read-Only Memory (CD-ROM) or other optical disk storage, magnetic disk storage or other magnetic storage devices, flash memory devices (e.g., solid state memory devices), or any other storage medium which may be used to carry or store desired program code in the form of computer-executable instructions or data structures and which may be accessed by a general-purpose or special-purpose computer. Combinations of the above may also be included within the scope of computer-readable storage media. Computer-executable instructions may include, for example, instructions and data configured to cause processor 1910 to perform a certain operation or group of operations.
[0075] Communication unit 1940 may include any component, device, system, or combination thereof that is configured to transmit or receive information over a network. In some embodiments, communication unit 1940 may communicate with other devices at other locations, the same location, or even other components within the same system. For example, communication unit 1940 may include a modem, a network card (wireless or wired), an infrared communication device, a wireless communication device (such as an antenna), and/or chipset (such as a Bluetooth device, an 802.6 device (e.g., Metropolitan Area Network (MAN)), a WiFi device, a WiMax device, cellular communication facilities, etc.), and/or the like. The communication unit 1940 may permit data to be exchanged with a network and/or any other devices or systems described in the present disclosure. For example, the communication unit 1940 may allow system 1900 to communicate with other systems, such as the problem solver 170 and the user device 110 of
[0076] Modifications, additions, or omissions may be made to system 1900 without departing from the scope of the present disclosure. For example, the data storage 1930 may be multiple different storage mediums located in multiple locations and accessed by processor 1910 through a network.
[0077] As indicated above, the embodiments described herein may include the use of a special purpose or general purpose computer (e.g., processor 1910 of
[0078] As used in the present disclosure, the terms “module” or “component” may refer to specific hardware implementations configured to perform the actions of the module or component and/or software objects or software routines that may be stored on and/or executed by general purpose hardware (e.g., computer-readable media, processing devices, etc.) of the computing system. In some embodiments, the different components, modules, engines, and services described in the present disclosure may be implemented as objects or processes that execute on the computing system (e.g., as separate threads). While some of the system and methods described in the present disclosure are generally described as being implemented in software (stored on and/or executed by general purpose hardware), specific hardware implementations or a combination of software and specific hardware implementations are also possible and contemplated. In the present disclosure, a “computing entity” may be any computing system as previously defined in the present disclosure, or any module or combination of modulates running on a computing system.
[0079] Terms used in the present disclosure and especially in the appended claims (e.g., bodies of the appended claims) are generally intended as “open” terms (e.g., the term “including” should be interpreted as “including, but not limited to,” the term “having” should be interpreted as “having at least,” the term “includes” should be interpreted as “includes, but is not limited to,” etc.).
[0080] Additionally, if a specific number of an introduced claim recitation is intended, such an intent will be explicitly recited in the claim, and in the absence of such recitation no such intent is present. For example, as an aid to understanding, the following appended claims may contain usage of the introductory phrases “at least one” and “one or more” to introduce claim recitations. However, the use of such phrases should not be construed to imply that the introduction of a claim recitation by the indefinite articles “a” or “an” limits any particular claim containing such introduced claim recitation to embodiments containing only one such recitation, even when the same claim includes the introductory phrases “one or more” or “at least one” and indefinite articles such as “a” or “an” (e.g., “a” and/or “an” should be interpreted to mean “at least one” or “one or more”); the same holds true for the use of definite articles used to introduce claim recitations.
[0081] In addition, even if a specific number of an introduced claim recitation is explicitly recited, those skilled in the art will recognize that such recitation should be interpreted to mean at least the recited number (e.g., the bare recitation of “two recitations,” without other modifiers, means at least two recitations, or two or more recitations). Furthermore, in those instances where a convention analogous to “at least one of A, B, and C, etc.” or “one or more of A, B, and C, etc.” is used, in general such a construction is intended to include A alone, B alone, C alone, A and B together, A and C together, B and C together, or A, B, and C together, etc.
[0082] Further, any disjunctive word or phrase presenting two or more alternative terms, whether in the description, claims, or drawings, should be understood to contemplate the possibilities of including one of the terms, either of the terms, or both terms. For example, the phrase “A or B” should be understood to include the possibilities of “A” or “B” or “A and B.”
[0083] All examples and conditional language recited in the present disclosure are intended for pedagogical objects to aid the reader in understanding the invention and the concepts contributed by the inventor to furthering the art, and are to be construed as being without limitation to such specifically recited examples and conditions. Although embodiments of the present disclosure have been described in detail, various changes, substitutions, and alterations could be made hereto without departing from the spirit and scope of the present disclosure.