Transforming a QP Problem to an SOCP Problem

A Quadratic Programming problem (QP) in the form of where , can be transformed to a Second-Order Cone Programming (SOCP) problem in the form of Consider , and As is non-negative, minimizing is equivalent to minimizing , and hence is equivalent to minimizing . If we have  and , then the objective function in QP  can be written as . We can thus minimize . Thus, the QP problem can now be written as As , by definition of QP, is symmetric, a symmetric can be found such that . If the QP is assumed to be a convex QP, is positive semidefinite, applying Cholesky factorization gives (or ). In this case, (or ). Next, as is always non-negative, the equality constraint can be written as Finally, each row in the inequality constraint can be written as where is the i-th row of , and is the i-th element of . Therefore, a QP problem can be transformed to an equivalent SOCP problem in the following way. We need to introduce a few variables first. The sub-vector with the first elements in the solution of the transformed SOCP problem is the solution of the original QP...

Fastest Java Matrix Multiplication

Introduction Matrix multiplication occupies a central role in scientific computing with an extremely wide range of applications. Many numerical procedures in linear algebra (e.g. solving linear systems, matrix inversion, factorizations, determinants) can essentially be reduced to matrix multiplication [5, 3]. Hence, there is great interest in investigating fast matrix multiplication algorithms, to accelerate matrix multiplication (and other numerical procedures in turn). SuanShu was already the fastest in matrix multiplication and hence linear algebra per our benchmark. SuanShu v3.0.0 benchmark Starting version 3.3.0, SuanShu has implemented an advanced algorithm for even faster matrix multiplication. It makes some operations 100x times faster those of our competitors! The new benchmark can be found here: SuanShu v3.3.0 benchmark In this article, we briefly describe our implementation of a matrix multiplication algorithm that dramatically accelerates dense matrix-matrix multiplication compared to the classical IJK algorithm. Parallel IJK We first describe the method against which our new algorithm is compared against, IJK. Here is the algorithm performing multiplication for is ,  is , and  is : for (i = 1; i < = m; i ++){ for (j = 1; j <= p; j ++){ for (k = 1; k <= n; k ++){ C[i,k] += A[i,j] * B[j,k]; } } } 1234567 for (i = 1; i < = m; i ++){    for (j = 1; j <= p; j ++){        for (k = 1; k <= n; k ++){            C[i,k] += A[i,j] * B[j,k];        }    }} In Suanshu, this is implemented in parallel; the outermost loop is passed to a  ParallelExecutor . As there are often more rows than threads available, the time complexity of this parallelized IJK is still roughly the same as IJK: ,...

FREE .NET/C# Numerical/Math library

On this Christmas Day, we are happy to announce that SuanShu.net is FREE for all! SuanShu.net has all the features as its Java sibling as well as has undergone the same many thousands of test cases daily. There are a tutorial and examples that show you how to build a SuanShu application in Visual Studio. One major advantage of using SuanShu.net over the Java version is that it integrates seamlessly with Microsoft Excel. By incorporating SuanShu library in your spreadsheet, you literally have access to hundreds of numerical algorithms when manipulating and analyzing your data, significantly enhancing Excel’s productivity. We hope that you enjoy using SuanShu.net in your work. If you have any interesting story, comments or feedback, we’d love to hear from you. Starting downloading SuanShu.net...

SuanShu 2.0

We are proud to announce the release of SuanShu 2.0! This release is the accumulation of customer feedbacks and our experience learnt in the last three years coding numerical computation algorithms. SuanShu 2.0 is a redesign of the software architecture, a rewrite of many modules, additions of new modules and functionalities driven by user demands and applications, numerous bug fixes as well as performance tuning. We believe that SuanShu 2.0 is the best numerical and statistical library ever available in Java, if not all, platform. Here are highlights of the new features available since 2.0. –          ordinary and partial differential equation solvers –          Optimization: Quadratic Programming,  Sequential Quadratic Programming, (Mixed) Integer Linear Programming, Semi-Definite Programming –          ARIMA fit –          LASSO and LARS –          Gaussian quadrature/integration –          Interpolation methods –          Trigonometric functions and physical constants –          Extreme Value Theory Continuing our tradition, we will still provide trial license and academic license for eligible schools and research institutes. Moreover, we now provide another way to get a FREE SuanShu license – the contribution license. If you are able to contribute code to the SuanShu library, you can get a permanent license. For more information, see: http://numericalmethod.com/suanshu/ We hope that you will find the new release of SuanShu more helpful than ever in your work. If you have any comments to help us improve, please do let us know. Happy birthday to TianTians and Merry Christmas to all!...

Using SuanShu on Amazon EC2

Cloud computing is very popular nowadays. Delegating your CPU-intensive computation (or simulation) to the cloud seems to be a smart choice. Many of our users asked if SuanShu can be run on Amazon’s Elastic Compute Cloud (EC2), because SuanShu license requires a MAC address and they have no control on which machine being used when they launch an EC2 instance. Here comes a good news! Amazon Web Service (AWS) now supports Elastic Network Interface (ENI), by which you can bind your EC2 instance to a specified network interface. Therefore, you can license your SuanShu against the MAC address of the ENI, and launch an instance with the same ENI and MAC address. For details, please visit the blog here. User guide for ENI can also be found...