This document summarizes Charles Southerland's presentation on program derivation of operations in finite prime fields Fp. It begins with an introduction and thanks section. Then, it outlines the topics to be covered: finite fields, program derivation, and deriving a program to find the multiplicative inverse in Fp. It provides background on finite fields, Dijkstra's guarded command language, the weakest precondition predicate transformer, and the process of program derivation. It also discusses multiplicative inverses in finite fields, the greatest common divisor algorithm, exploring Bezout's identity, and deriving a program to find the multiplicative inverse using a loop invariant based on Bezout's identity and the gcd algorithm.
Symbolic Execution as DPLL Modulo TheoriesQuoc-Sang Phan
The document discusses symbolic execution, which is a program analysis technique that executes programs with symbolic inputs instead of concrete inputs. It describes symbolic execution as an approach for solving satisfiability modulo theories (SMT) problems, by viewing symbolic execution as an SMT solver. It presents an implementation of symbolic execution based on a Boolean executor that performs a depth-first search, combined with an SMT solver to check satisfiability of path conditions.
Cilk-M is a work-stealing runtime system that solves the cactus stack problem using thread-local memory mapping (TLMM). Each worker maintains its own deque of frames and manipulates the bottom of the deque like a stack. When a worker runs out of work, it steals frames from the top of a random victim's deque. This allows Cilk-M to achieve linear speedup and bounded stack space while maintaining serial-parallel reciprocity and interoperability with legacy code.
The document discusses procedure activations and lifetimes. It provides an example of an activation tree for a quicksort program, showing the nested calls to procedures like partition and quicksort. It describes how activation records are used to store state and pass parameters during procedure calls, including the use of control links and access links to manage nested procedures and nonlocal data.
The document discusses the Cilk programming language and its runtime system for parallel programming. Cilk extends C with keywords like spawn and sync to express parallelism. It provides performance guarantees and automatically manages scheduling across processors. The runtime system uses work-stealing to map Cilk threads to processors with near-optimal efficiency. Cilk allows expressing parallelism while hiding low-level details like load balancing.
This document describes a lab experiment on system response for different order systems. It provides theory on transient and steady state responses. Tasks involve calculating transfer functions for different systems, finding pole-zero locations, and plotting step responses. Simulink is used to plot multiple step responses on a single graph for comparison. The objectives are to study effects of natural frequency, damping ratio, and pole locations on peak response, settling time, and rise time.
The document discusses CILK and CILK++, parallel programming languages that allow spawning concurrent tasks. It covers the key language features like spawn and sync, provides examples of Fibonacci implementations, and describes the work stealing runtime system that dynamically schedules tasks across processors. The runtime uses a decentralized work stealing approach where idle processors steal tasks from other processors' task queues to balance workload.
The document discusses run-time environments and activation records. It explains that activation records are used to manage information for each procedure call and are allocated on the stack. Activation records contain fields for return values, parameters, local variables, and more. When a procedure is called, its activation record is pushed onto the stack and popped off when it returns. Activation records allow recursive calls by creating a new record each time a procedure is activated.
Implementation of Energy Efficient Scalar Point Multiplication Techniques for...idescitation
Elliptic curve cryptography (ECC) is mainly an
alternative to traditional public-key cryptosystems (PKCs),
such as RSA, due to its smaller key size with same security
level for resource-constrained networks. The computational
efficiency of ECC depends on the scalar point multiplication,
which consists of modular point addition and point doubling
operations. The paper emphasizes on point multiplication
techniques such as Binary, NAF, w-NAF and different
coordinate systems like Affine and Projective (Standard
Projective, Jacobian and Mixed) for point addition and doubling
operations. These operations are compared based on execution
time. The results given here are for general purpose processor
with 1:73 GH z frequency. The implementation is done over
NIST-recommended prime fields 192/224/256/384/521.
Symbolic Execution as DPLL Modulo TheoriesQuoc-Sang Phan
The document discusses symbolic execution, which is a program analysis technique that executes programs with symbolic inputs instead of concrete inputs. It describes symbolic execution as an approach for solving satisfiability modulo theories (SMT) problems, by viewing symbolic execution as an SMT solver. It presents an implementation of symbolic execution based on a Boolean executor that performs a depth-first search, combined with an SMT solver to check satisfiability of path conditions.
Cilk-M is a work-stealing runtime system that solves the cactus stack problem using thread-local memory mapping (TLMM). Each worker maintains its own deque of frames and manipulates the bottom of the deque like a stack. When a worker runs out of work, it steals frames from the top of a random victim's deque. This allows Cilk-M to achieve linear speedup and bounded stack space while maintaining serial-parallel reciprocity and interoperability with legacy code.
The document discusses procedure activations and lifetimes. It provides an example of an activation tree for a quicksort program, showing the nested calls to procedures like partition and quicksort. It describes how activation records are used to store state and pass parameters during procedure calls, including the use of control links and access links to manage nested procedures and nonlocal data.
The document discusses the Cilk programming language and its runtime system for parallel programming. Cilk extends C with keywords like spawn and sync to express parallelism. It provides performance guarantees and automatically manages scheduling across processors. The runtime system uses work-stealing to map Cilk threads to processors with near-optimal efficiency. Cilk allows expressing parallelism while hiding low-level details like load balancing.
This document describes a lab experiment on system response for different order systems. It provides theory on transient and steady state responses. Tasks involve calculating transfer functions for different systems, finding pole-zero locations, and plotting step responses. Simulink is used to plot multiple step responses on a single graph for comparison. The objectives are to study effects of natural frequency, damping ratio, and pole locations on peak response, settling time, and rise time.
The document discusses CILK and CILK++, parallel programming languages that allow spawning concurrent tasks. It covers the key language features like spawn and sync, provides examples of Fibonacci implementations, and describes the work stealing runtime system that dynamically schedules tasks across processors. The runtime uses a decentralized work stealing approach where idle processors steal tasks from other processors' task queues to balance workload.
The document discusses run-time environments and activation records. It explains that activation records are used to manage information for each procedure call and are allocated on the stack. Activation records contain fields for return values, parameters, local variables, and more. When a procedure is called, its activation record is pushed onto the stack and popped off when it returns. Activation records allow recursive calls by creating a new record each time a procedure is activated.
Implementation of Energy Efficient Scalar Point Multiplication Techniques for...idescitation
Elliptic curve cryptography (ECC) is mainly an
alternative to traditional public-key cryptosystems (PKCs),
such as RSA, due to its smaller key size with same security
level for resource-constrained networks. The computational
efficiency of ECC depends on the scalar point multiplication,
which consists of modular point addition and point doubling
operations. The paper emphasizes on point multiplication
techniques such as Binary, NAF, w-NAF and different
coordinate systems like Affine and Projective (Standard
Projective, Jacobian and Mixed) for point addition and doubling
operations. These operations are compared based on execution
time. The results given here are for general purpose processor
with 1:73 GH z frequency. The implementation is done over
NIST-recommended prime fields 192/224/256/384/521.
This document provides an overview of various algorithms and data structures including recursive functions, graph representations, depth-first search (DFS), breadth-first search (BFS), all-pairs shortest paths algorithms like Floyd-Warshall, single-source shortest paths algorithms like Dijkstra's, trees, binary search trees (BST), min-max heaps, greedy algorithms, backtracking, and hashing/hash tables. It includes pseudocode and source code examples for many of these algorithms.
The document provides an overview of sequential pattern mining. It discusses the challenges of mining sequential patterns from large databases due to the huge number of possible patterns. It then describes the Apriori algorithm as an example approach, showing the pseudocode. It works in multiple passes over the database, generating candidate itemsets in each pass and pruning those that don't meet the minimum support threshold. The document also summarizes the FP-Growth algorithm, which avoids candidate generation by building a compact FP-tree structure and mining it recursively to extract patterns. Applications mentioned include customer shopping sequences, medical treatments, and DNA sequences.
This slide first introduces the sequential pattern mining problem and also presents some required definitions in order to understand GSP algorithm. At then end there is a brief introduction of GSP algorithm and some practical constraints which it supports.
This document outlines a talk on using category theory concepts in functional programming. It begins by introducing the definition of a category from category theory and using Scala examples to demonstrate how types and functions in Scala satisfy this definition. It then defines functors, natural transformations, and monads from category theory and provides examples showing how options, lists, and functions in Scala form a monad. It proves that the category theory definition of a monad is equivalent to the definition used in functional programming. The document suggests category theory concepts help formalize design patterns and make code more refactorable.
The document describes sequential pattern mining and the Apriori algorithm for finding frequent sequential patterns. It discusses (1) defining the problem of finding all subsequences that occur at or above a minimum support threshold, (2) the Apriori algorithm which works in phases to generate candidate sequences, determine support counts, and find frequent sequences, and (3) techniques like AprioriSome and DynamicSome that aim to optimize the algorithm by avoiding counting non-maximal sequences. The goal is to efficiently mine databases to discover sequential patterns showing commonly occurring ordered events.
Stacks are commonly used data structures that follow the LIFO (last in, first out) principle. They can be implemented using arrays or linked lists. Operations like push add an element to the top of the stack and pop removes an element from the top. Stacks have many applications in computing including implementing function calls, parsing expressions, and undo operations.
Uncovering Performance Problems in Java Applications with Reference Propagati...Dacong (Tony) Yan
The document discusses reference propagation profiling, a technique for uncovering performance problems in Java applications. It is implemented in the Jikes RVM compiler by instrumenting code to track data dependencies and propagate references between memory locations. This allows analyzing applications to find inefficiencies like objects not being assigned to the heap or imbalance between operation costs and benefits. The profiling has high overhead but provides insights to assist with manual performance tuning.
Computational Techniques for the Statistical Analysis of Big Data in Rherbps10
The document describes techniques for improving the computational performance of statistical analysis of big data in R. It uses as a case study the rlme package for rank-based regression of nested effects models. The workflow involves identifying bottlenecks, rewriting algorithms, benchmarking versions, and testing. Examples include replacing sorting with a faster C++ selection algorithm for the Wilcoxon Tau estimator, vectorizing a pairwise function, and preallocating memory for a covariance matrix calculation. The document suggests future directions like parallelization using MPI and GPUs to further optimize R for big data applications.
Functional Reactive Programming by Gerold MeisingerGeroldMeisinger
This document discusses functional reactive programming (FRP), an approach to reactive programming using functions. It describes FRP as modeling time-varying values using behaviors and modeling both continuous time and discrete events. It then discusses different implementations of FRP, including classic FRP, push-pull FRP, and arrowized FRP as implemented in the Yampa library. Yampa uses arrows and signal functions to model interactive behaviors over time in a declarative way.
This document proposes techniques for automatically ranking the results of database queries. It introduces IDF Similarity, which adapts the TF-IDF concept from information retrieval to database attributes by calculating IDF scores based on attribute value frequencies. It also introduces QF Similarity, which determines attribute value importance based on frequency in a query workload log. An Index-based Threshold Algorithm is developed to efficiently retrieve the top-K results by exploiting these similarity functions. The algorithm performs sorted and random accesses to tuples to iteratively refine the top results until a stopping condition is met.
The document introduces data-flow analysis, which derives information about a program's dynamic behavior by examining its static code. It discusses liveness analysis, which determines whether a variable is live (will be used in the future) or dead at a given point. The concepts of control flow graphs, uses/defs, and solving the data-flow equations through iterative analysis are explained. An example liveness analysis is worked through to demonstrate the process.
The document summarizes the LabPQR color space model proposed by researchers at Rochester Institute of Technology. The model uses a transformation from tristimulus values and a set of basis vectors derived from principal component analysis to represent color spectra in a lower dimensional space. This representation allows spectral data to be compressed while maintaining accuracy for applications like multi-spectral color reproduction. The model builds on prior work using matrix algebra to decompose color stimuli into fundamental and residue components.
The document provides an overview and outline of the course "Optimization for Machine Learning". Key points:
- The course covers topics like convexity, gradient methods, constrained optimization, proximal algorithms, stochastic gradient descent, and more.
- Mathematical modeling and computational optimization for machine learning are discussed. Optimization algorithms like gradient descent and stochastic gradient descent are important for learning model parameters.
- Convex optimization problems have desirable properties like every local minimum being a global minimum. Gradient descent and related algorithms are guaranteed to converge for convex problems.
- Convex sets and functions are introduced, including characterizations using epigraphs and subgradients. Convex functions have useful properties like continuity and satisfying Jensen's inequality.
This document provides a summary of online algorithms and introduces various tools for analyzing online algorithms, including potential functions, work functions, linear programming, and the classify and randomly select technique. It begins with an example of the ski rental problem and how it can be solved optimally using different online algorithms. It then outlines the main topics covered and provides examples to illustrate each technique. Potential functions are introduced using a list reorganization problem. Work functions are explained using a file migration problem on a graph. Linear programming is demonstrated for a fractional set cover problem. Finally, classify and randomly select is presented as the last technique for analyzing online algorithms.
Stochastic Frank-Wolfe for Constrained Finite Sum Minimization @ Montreal Opt...Geoffrey Négiar
We propose a novel Stochastic Frank-Wolfe (a.k.a. conditional gradient) algorithm for constrained smooth finite-sum minimization with a generalized linear prediction/structure. This class of problems includes empirical risk minimization with sparse, low-rank, or other structured constraints. The proposed method is simple to implement, does not require step-size tuning, and has a constant per-iteration cost that is independent of the dataset size. Furthermore, as a byproduct of the method we obtain a stochastic estimator of the Frank-Wolfe gap that can be used as a stopping criterion. Depending on the setting, the proposed method matches or improves on the best computational guarantees for Stochastic Frank-Wolfe algorithms. Benchmarks on several datasets highlight different regimes in which the proposed method exhibits a faster empirical convergence than related methods. Finally, we provide an implementation of all considered methods in an open-source package.
The document discusses two contexts of subtle asynchrony. First, how to bring asynchronous task parallelism to Fortran without relying on threads. Second, it describes how NWChem achieves asynchronous task parallelism through overdecomposition of work, without programmers explicitly using tasks. This demonstrates that asynchronous many-task execution principles can be achieved without specialized runtime systems or programming abstractions. Quantum chemistry algorithms are provided as an example where overdecomposition leads to implicit asynchronous parallelism through dynamic scheduling of irregularly distributed tasks.
This document discusses the TMS320C6713 digital signal processor (DSP) development kit (DSK). The DSK features the high-performance TMS320C6713 floating-point DSP chip capable of 1350 million floating point operations per second. The DSK allows for efficient development and testing of applications for the C6713 DSP. It includes onboard memory, an analog interface circuit for data conversion, I/O ports, and JTAG emulation support. The DSK also includes a stereo codec for analog audio input/output.
Functional Programming Concepts for Imperative ProgrammersChris
The document discusses functional programming concepts including the origins of the λ-calculus and Lisp. It covers functions as data, lambda expressions, closures, function composition, and higher-order functions. Examples are provided in JavaScript and Scala of implementing functions like fold to operate on lists. While many functional concepts are covered, topics like currying, monads, and lazy evaluation are noted but not discussed in detail.
This document discusses nonlinear programming (NLP) problems. NLP problems involve objective functions and/or constraints that contain nonlinear terms, making them more difficult to solve than linear programs. While exact solutions cannot always be found, algorithms can typically find approximate solutions within an acceptable error range of the optimum. However, for some NLP problems there is no reliable way to find the global maximum, as algorithms may stop at a local maximum instead. The document describes different types of NLP problems and techniques for solving them, including using Excel Solver with multiple starting values to attempt finding the global rather than just local optima.
Big Data Day LA 2016/ Hadoop/ Spark/ Kafka track - Iterative Spark Developmen...Data Con LA
This presentation will explore how Bloomberg uses Spark, with its formidable computational model for distributed, high-performance analytics, to take this process to the next level, and look into one of the innovative practices the team is currently developing to increase efficiency: the introduction of a logical signature for datasets.
This document provides an overview of various algorithms and data structures including recursive functions, graph representations, depth-first search (DFS), breadth-first search (BFS), all-pairs shortest paths algorithms like Floyd-Warshall, single-source shortest paths algorithms like Dijkstra's, trees, binary search trees (BST), min-max heaps, greedy algorithms, backtracking, and hashing/hash tables. It includes pseudocode and source code examples for many of these algorithms.
The document provides an overview of sequential pattern mining. It discusses the challenges of mining sequential patterns from large databases due to the huge number of possible patterns. It then describes the Apriori algorithm as an example approach, showing the pseudocode. It works in multiple passes over the database, generating candidate itemsets in each pass and pruning those that don't meet the minimum support threshold. The document also summarizes the FP-Growth algorithm, which avoids candidate generation by building a compact FP-tree structure and mining it recursively to extract patterns. Applications mentioned include customer shopping sequences, medical treatments, and DNA sequences.
This slide first introduces the sequential pattern mining problem and also presents some required definitions in order to understand GSP algorithm. At then end there is a brief introduction of GSP algorithm and some practical constraints which it supports.
This document outlines a talk on using category theory concepts in functional programming. It begins by introducing the definition of a category from category theory and using Scala examples to demonstrate how types and functions in Scala satisfy this definition. It then defines functors, natural transformations, and monads from category theory and provides examples showing how options, lists, and functions in Scala form a monad. It proves that the category theory definition of a monad is equivalent to the definition used in functional programming. The document suggests category theory concepts help formalize design patterns and make code more refactorable.
The document describes sequential pattern mining and the Apriori algorithm for finding frequent sequential patterns. It discusses (1) defining the problem of finding all subsequences that occur at or above a minimum support threshold, (2) the Apriori algorithm which works in phases to generate candidate sequences, determine support counts, and find frequent sequences, and (3) techniques like AprioriSome and DynamicSome that aim to optimize the algorithm by avoiding counting non-maximal sequences. The goal is to efficiently mine databases to discover sequential patterns showing commonly occurring ordered events.
Stacks are commonly used data structures that follow the LIFO (last in, first out) principle. They can be implemented using arrays or linked lists. Operations like push add an element to the top of the stack and pop removes an element from the top. Stacks have many applications in computing including implementing function calls, parsing expressions, and undo operations.
Uncovering Performance Problems in Java Applications with Reference Propagati...Dacong (Tony) Yan
The document discusses reference propagation profiling, a technique for uncovering performance problems in Java applications. It is implemented in the Jikes RVM compiler by instrumenting code to track data dependencies and propagate references between memory locations. This allows analyzing applications to find inefficiencies like objects not being assigned to the heap or imbalance between operation costs and benefits. The profiling has high overhead but provides insights to assist with manual performance tuning.
Computational Techniques for the Statistical Analysis of Big Data in Rherbps10
The document describes techniques for improving the computational performance of statistical analysis of big data in R. It uses as a case study the rlme package for rank-based regression of nested effects models. The workflow involves identifying bottlenecks, rewriting algorithms, benchmarking versions, and testing. Examples include replacing sorting with a faster C++ selection algorithm for the Wilcoxon Tau estimator, vectorizing a pairwise function, and preallocating memory for a covariance matrix calculation. The document suggests future directions like parallelization using MPI and GPUs to further optimize R for big data applications.
Functional Reactive Programming by Gerold MeisingerGeroldMeisinger
This document discusses functional reactive programming (FRP), an approach to reactive programming using functions. It describes FRP as modeling time-varying values using behaviors and modeling both continuous time and discrete events. It then discusses different implementations of FRP, including classic FRP, push-pull FRP, and arrowized FRP as implemented in the Yampa library. Yampa uses arrows and signal functions to model interactive behaviors over time in a declarative way.
This document proposes techniques for automatically ranking the results of database queries. It introduces IDF Similarity, which adapts the TF-IDF concept from information retrieval to database attributes by calculating IDF scores based on attribute value frequencies. It also introduces QF Similarity, which determines attribute value importance based on frequency in a query workload log. An Index-based Threshold Algorithm is developed to efficiently retrieve the top-K results by exploiting these similarity functions. The algorithm performs sorted and random accesses to tuples to iteratively refine the top results until a stopping condition is met.
The document introduces data-flow analysis, which derives information about a program's dynamic behavior by examining its static code. It discusses liveness analysis, which determines whether a variable is live (will be used in the future) or dead at a given point. The concepts of control flow graphs, uses/defs, and solving the data-flow equations through iterative analysis are explained. An example liveness analysis is worked through to demonstrate the process.
The document summarizes the LabPQR color space model proposed by researchers at Rochester Institute of Technology. The model uses a transformation from tristimulus values and a set of basis vectors derived from principal component analysis to represent color spectra in a lower dimensional space. This representation allows spectral data to be compressed while maintaining accuracy for applications like multi-spectral color reproduction. The model builds on prior work using matrix algebra to decompose color stimuli into fundamental and residue components.
The document provides an overview and outline of the course "Optimization for Machine Learning". Key points:
- The course covers topics like convexity, gradient methods, constrained optimization, proximal algorithms, stochastic gradient descent, and more.
- Mathematical modeling and computational optimization for machine learning are discussed. Optimization algorithms like gradient descent and stochastic gradient descent are important for learning model parameters.
- Convex optimization problems have desirable properties like every local minimum being a global minimum. Gradient descent and related algorithms are guaranteed to converge for convex problems.
- Convex sets and functions are introduced, including characterizations using epigraphs and subgradients. Convex functions have useful properties like continuity and satisfying Jensen's inequality.
This document provides a summary of online algorithms and introduces various tools for analyzing online algorithms, including potential functions, work functions, linear programming, and the classify and randomly select technique. It begins with an example of the ski rental problem and how it can be solved optimally using different online algorithms. It then outlines the main topics covered and provides examples to illustrate each technique. Potential functions are introduced using a list reorganization problem. Work functions are explained using a file migration problem on a graph. Linear programming is demonstrated for a fractional set cover problem. Finally, classify and randomly select is presented as the last technique for analyzing online algorithms.
Stochastic Frank-Wolfe for Constrained Finite Sum Minimization @ Montreal Opt...Geoffrey Négiar
We propose a novel Stochastic Frank-Wolfe (a.k.a. conditional gradient) algorithm for constrained smooth finite-sum minimization with a generalized linear prediction/structure. This class of problems includes empirical risk minimization with sparse, low-rank, or other structured constraints. The proposed method is simple to implement, does not require step-size tuning, and has a constant per-iteration cost that is independent of the dataset size. Furthermore, as a byproduct of the method we obtain a stochastic estimator of the Frank-Wolfe gap that can be used as a stopping criterion. Depending on the setting, the proposed method matches or improves on the best computational guarantees for Stochastic Frank-Wolfe algorithms. Benchmarks on several datasets highlight different regimes in which the proposed method exhibits a faster empirical convergence than related methods. Finally, we provide an implementation of all considered methods in an open-source package.
The document discusses two contexts of subtle asynchrony. First, how to bring asynchronous task parallelism to Fortran without relying on threads. Second, it describes how NWChem achieves asynchronous task parallelism through overdecomposition of work, without programmers explicitly using tasks. This demonstrates that asynchronous many-task execution principles can be achieved without specialized runtime systems or programming abstractions. Quantum chemistry algorithms are provided as an example where overdecomposition leads to implicit asynchronous parallelism through dynamic scheduling of irregularly distributed tasks.
This document discusses the TMS320C6713 digital signal processor (DSP) development kit (DSK). The DSK features the high-performance TMS320C6713 floating-point DSP chip capable of 1350 million floating point operations per second. The DSK allows for efficient development and testing of applications for the C6713 DSP. It includes onboard memory, an analog interface circuit for data conversion, I/O ports, and JTAG emulation support. The DSK also includes a stereo codec for analog audio input/output.
Functional Programming Concepts for Imperative ProgrammersChris
The document discusses functional programming concepts including the origins of the λ-calculus and Lisp. It covers functions as data, lambda expressions, closures, function composition, and higher-order functions. Examples are provided in JavaScript and Scala of implementing functions like fold to operate on lists. While many functional concepts are covered, topics like currying, monads, and lazy evaluation are noted but not discussed in detail.
This document discusses nonlinear programming (NLP) problems. NLP problems involve objective functions and/or constraints that contain nonlinear terms, making them more difficult to solve than linear programs. While exact solutions cannot always be found, algorithms can typically find approximate solutions within an acceptable error range of the optimum. However, for some NLP problems there is no reliable way to find the global maximum, as algorithms may stop at a local maximum instead. The document describes different types of NLP problems and techniques for solving them, including using Excel Solver with multiple starting values to attempt finding the global rather than just local optima.
Big Data Day LA 2016/ Hadoop/ Spark/ Kafka track - Iterative Spark Developmen...Data Con LA
This presentation will explore how Bloomberg uses Spark, with its formidable computational model for distributed, high-performance analytics, to take this process to the next level, and look into one of the innovative practices the team is currently developing to increase efficiency: the introduction of a logical signature for datasets.
Properties of Functions
Odd and Even Functions
Periodic Functions
Monotonic Functions
Bounded Functions
Maxima and Minima of Functions
Inverse Function
Sequence and Series
CodeFest 2014. Axel Rauschmayer — JavaScript’s variables: scopes, environment...CodeFest
The document discusses JavaScript variables, scopes, environments, and closures. It defines variable scope as where a variable is accessible and distinguishes between static scoping based on source code and dynamic scoping based on runtime. It explains that environments are data structures for storing variables and mapping names to values, and support both fresh variables per function call and nested scopes. Closures are defined as functions that maintain a reference to outer scope variables even after outer functions have returned.
Distributed solution of stochastic optimal control problem on GPUsPantelis Sopasakis
Stochastic optimal control problems arise in many
applications and are, in principle,
large-scale involving up to millions of decision variables. Their
applicability in control applications is often limited by the
availability of algorithms that can solve them efficiently and within
the sampling time of the controlled system.
In this paper we propose a dual accelerated proximal
gradient algorithm which is amenable to parallelization and
demonstrate that its GPU implementation affords high speed-up
values (with respect to a CPU implementation) and greatly outperforms
well-established commercial optimizers such as Gurobi.
Alpine Data Labs presents a deep dive into our implementation of Multinomial Logistic Regression with Apache Spark. Machine Learning Engineer DB Tsai takes us through the technical implementation details step by step. First, he explains how the state of the art Machine Learning on Hadoop is not doing fulfilling the promise of Big Data. Next, he explains how Spark is a perfect match for machine learning through their in-memory cache-ing capability demonstrating 100x performance improvement. Third, he takes us through each aspect of a multinomial logistic regression and how this is developed with Spark APIs. Fourth, he demonstrates an extension of MLOR and training parameters. Finally, he benchmarks MLOR with 11M rows, 123 features, 11% non-zero elements with a 5 node Hadoop cluster. Finally, he shows Alpine's unique visual environment with Spark and verifies the performance with the job tracker. In conclusion, Alpine supports the state of the art Cloudera and Pivotal Hadoop clusters and performances at a level that far exceeds its next nearest competitor.
Multinomial Logistic Regression with Apache SparkDB Tsai
Logistic Regression can not only be used for modeling binary outcomes but also multinomial outcome with some extension. In this talk, DB will talk about basic idea of binary logistic regression step by step, and then extend to multinomial one. He will show how easy it's with Spark to parallelize this iterative algorithm by utilizing the in-memory RDD cache to scale horizontally (the numbers of training data.) However, there is mathematical limitation on scaling vertically (the numbers of training features) while many recent applications from document classification and computational linguistics are of this type. He will talk about how to address this problem by L-BFGS optimizer instead of Newton optimizer.
Bio:
DB Tsai is a machine learning engineer working at Alpine Data Labs. He is recently working with Spark MLlib team to add support of L-BFGS optimizer and multinomial logistic regression in the upstream. He also led the Apache Spark development at Alpine Data Labs. Before joining Alpine Data labs, he was working on large-scale optimization of optical quantum circuits at Stanford as a PhD student.
In this talk I introduced Yampa, the AFRP framework in Haskell, and the Quake-like game made by it. The content convers the basic of Functional Reactive Programming, Haskell Arrow, Yampa itself, time-space leak, etc.
2014-06-20 Multinomial Logistic Regression with Apache SparkDB Tsai
Logistic Regression can not only be used for modeling binary outcomes but also multinomial outcome with some extension. In this talk, DB will talk about basic idea of binary logistic regression step by step, and then extend to multinomial one. He will show how easy it's with Spark to parallelize this iterative algorithm by utilizing the in-memory RDD cache to scale horizontally (the numbers of training data.) However, there is mathematical limitation on scaling vertically (the numbers of training features) while many recent applications from document classification and computational linguistics are of this type. He will talk about how to address this problem by L-BFGS optimizer instead of Newton optimizer.
Bio:
DB Tsai is a machine learning engineer working at Alpine Data Labs. He is recently working with Spark MLlib team to add support of L-BFGS optimizer and multinomial logistic regression in the upstream. He also led the Apache Spark development at Alpine Data Labs. Before joining Alpine Data labs, he was working on large-scale optimization of optical quantum circuits at Stanford as a PhD student.
Elliptic curve cryptography (ECC) uses elliptic curves over finite fields to provide public-key encryption and digital signatures. ECC requires significantly smaller key sizes than other cryptosystems like RSA to provide equivalent security. This allows for faster computations and less storage requirements, making ECC ideal for constrained environments like smartphones. ECC relies on the difficulty of solving the elliptic curve discrete logarithm problem to provide security.
Regret Minimization in Multi-objective Submodular Function MaximizationTasuku Soma
This document presents algorithms for minimizing regret ratio in multi-objective submodular function maximization. It introduces the concept of regret ratio for evaluating the quality of a solution set for multiple objectives. It then proposes two algorithms, Coordinate and Polytope, that provide upper bounds on regret ratio by leveraging approximation algorithms for single objective problems. Experimental results on a movie recommendation dataset show the proposed algorithms achieve significantly lower regret ratios than a random baseline.
Surrogate models emulate expensive computer simulations. The objective is to approximate a function, $f$, of $d$ variables to a given tolerance, $\varepsilon$, using as few function values as possible, preferably $O(d)$. We explain how tractability theory provides lower bounds on the number of function values required for any possible method. We also propose method for sampling $f$ and approximating $f$ that achieves this objective and the kind of underlying structure that $f$ must have for success.
study Streaming Multigrid For Gradient Domain Operations On Large ImagesChiamin Hsu
The document describes a streaming multigrid solver for solving Poisson's equation on large images. It develops a multigrid method using a B-spline finite element basis that can efficiently process images in a streaming fashion using only a small window of image rows in memory at a time. The method achieves accurate solutions to Poisson's equation on gigapixel images in only 2 V-cycles by leveraging the temporal locality of the multigrid algorithm.
Fractional programming (A tool for optimization)VARUN KUMAR
The document discusses fractional programming problems (FPP), which involve optimizing an objective function that is the ratio of two other functions. It outlines three common transforms used to convert FPPs into more tractable forms: 1) Charnes-Cooper transform decouples the numerator and denominator, 2) Dinkelbach's transform iteratively updates an auxiliary variable, and 3) quadratic transform ensures the transformed objective function is concave to allow convex optimization techniques to be applied. The document provides detailed mathematical derivations of the quadratic transform to justify its formulation.
Similar to Program Derivation of Operations in Finite Fields of Prime Order (20)
Charles Southerland discusses issues with traditional time measurement systems and proposes adopting a hexadecimal system of measuring time. Some key problems with current systems include the complexity of sexagesimal counting and inconsistencies between time zones. Measuring time is important for keeping schedules, communication, and coding applications. While relativity complicates time measurement, standards organizations have worked to address these issues. Southerland suggests replacing traditional time systems with one based on hexadecimal to parallel how computers represent information internally.
This document contains the names of various photographers and their photos without any additional context. It lists over 20 photographers but does not provide any information about the photos themselves or what they depict.
Authentication is among the most important concepts in security, but most people take a fatally simplistic approach to the matter. We will explore some of the concepts of authentication, including an idea for a more advanced view of authentication that violates common wisdom regarding a related topic.
RSA is a popular public key cryptography algorithm invented by Rivest, Shamir, and Adleman in 1978. It uses two large prime numbers to generate a public and private key pair. The public key is used to encrypt messages, and the private key is used to decrypt them. RSA works by converting the plaintext into numbers, encrypting it using modular arithmetic and the public key, then decrypting the ciphertext with the private key. It relies on the difficulty of factoring large numbers.
The document discusses best practices for password security, including using unique, long passwords for each account; avoiding reusing passwords; storing password hashes instead of plaintext passwords; using HTTPS for login and sensitive pages; and considering two-factor authentication. It recommends passwords be at least 12 characters with a mix of uppercase, lowercase, numbers and symbols; not changing passwords regularly; and using a password manager to generate secure, unique passwords for each site.
The original version of my undergraduate research presentation that I was graded on (I got an A, but this version is certainly inferior to the later version of the presentation, by which time I also had better insight into my results).
An idea for a log and backup policy that reduces the possibility of and potential damage from insider threats. Presented at Information Warfare Summit 2013.
C is not a dead programming language, and it should seriously be considered a prime candidate for a new programming language to lean by any who do not already know it. This was my presentation for SpringBeta 2013.
One-Time Pad (OTP) encryption uses truly random keys that are only used once to encrypt plaintext. If the keys are random, only used once, and securely transferred and destroyed, then OTP provides perfect secrecy since the ciphertext reveals no information about the plaintext. However, achieving these strict conditions is difficult in practice, requiring solutions for secure key generation, transfer, storage and destruction. While OTP provides unbreakable encryption theoretically, more practical algorithms are needed to address its limitations.
How to Get CNIC Information System with Paksim Ga.pptxdanishmna97
Pakdata Cf is a groundbreaking system designed to streamline and facilitate access to CNIC information. This innovative platform leverages advanced technology to provide users with efficient and secure access to their CNIC details.
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?Speck&Tech
ABSTRACT: A prima vista, un mattoncino Lego e la backdoor XZ potrebbero avere in comune il fatto di essere entrambi blocchi di costruzione, o dipendenze di progetti creativi e software. La realtà è che un mattoncino Lego e il caso della backdoor XZ hanno molto di più di tutto ciò in comune.
Partecipate alla presentazione per immergervi in una storia di interoperabilità, standard e formati aperti, per poi discutere del ruolo importante che i contributori hanno in una comunità open source sostenibile.
BIO: Sostenitrice del software libero e dei formati standard e aperti. È stata un membro attivo dei progetti Fedora e openSUSE e ha co-fondato l'Associazione LibreItalia dove è stata coinvolta in diversi eventi, migrazioni e formazione relativi a LibreOffice. In precedenza ha lavorato a migrazioni e corsi di formazione su LibreOffice per diverse amministrazioni pubbliche e privati. Da gennaio 2020 lavora in SUSE come Software Release Engineer per Uyuni e SUSE Manager e quando non segue la sua passione per i computer e per Geeko coltiva la sua curiosità per l'astronomia (da cui deriva il suo nickname deneb_alpha).
Threats to mobile devices are more prevalent and increasing in scope and complexity. Users of mobile devices desire to take full advantage of the features
available on those devices, but many of the features provide convenience and capability but sacrifice security. This best practices guide outlines steps the users can take to better protect personal devices and information.
HCL Notes and Domino License Cost Reduction in the World of DLAUpanagenda
Webinar Recording: https://www.panagenda.com/webinars/hcl-notes-and-domino-license-cost-reduction-in-the-world-of-dlau/
The introduction of DLAU and the CCB & CCX licensing model caused quite a stir in the HCL community. As a Notes and Domino customer, you may have faced challenges with unexpected user counts and license costs. You probably have questions on how this new licensing approach works and how to benefit from it. Most importantly, you likely have budget constraints and want to save money where possible. Don’t worry, we can help with all of this!
We’ll show you how to fix common misconfigurations that cause higher-than-expected user counts, and how to identify accounts which you can deactivate to save money. There are also frequent patterns that can cause unnecessary cost, like using a person document instead of a mail-in for shared mailboxes. We’ll provide examples and solutions for those as well. And naturally we’ll explain the new licensing model.
Join HCL Ambassador Marc Thomas in this webinar with a special guest appearance from Franz Walder. It will give you the tools and know-how to stay on top of what is going on with Domino licensing. You will be able lower your cost through an optimized configuration and keep it low going forward.
These topics will be covered
- Reducing license cost by finding and fixing misconfigurations and superfluous accounts
- How do CCB and CCX licenses really work?
- Understanding the DLAU tool and how to best utilize it
- Tips for common problem areas, like team mailboxes, functional/test users, etc
- Practical examples and best practices to implement right away
Your One-Stop Shop for Python Success: Top 10 US Python Development Providersakankshawande
Simplify your search for a reliable Python development partner! This list presents the top 10 trusted US providers offering comprehensive Python development services, ensuring your project's success from conception to completion.
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAUpanagenda
Webinar Recording: https://www.panagenda.com/webinars/hcl-notes-und-domino-lizenzkostenreduzierung-in-der-welt-von-dlau/
DLAU und die Lizenzen nach dem CCB- und CCX-Modell sind für viele in der HCL-Community seit letztem Jahr ein heißes Thema. Als Notes- oder Domino-Kunde haben Sie vielleicht mit unerwartet hohen Benutzerzahlen und Lizenzgebühren zu kämpfen. Sie fragen sich vielleicht, wie diese neue Art der Lizenzierung funktioniert und welchen Nutzen sie Ihnen bringt. Vor allem wollen Sie sicherlich Ihr Budget einhalten und Kosten sparen, wo immer möglich. Das verstehen wir und wir möchten Ihnen dabei helfen!
Wir erklären Ihnen, wie Sie häufige Konfigurationsprobleme lösen können, die dazu führen können, dass mehr Benutzer gezählt werden als nötig, und wie Sie überflüssige oder ungenutzte Konten identifizieren und entfernen können, um Geld zu sparen. Es gibt auch einige Ansätze, die zu unnötigen Ausgaben führen können, z. B. wenn ein Personendokument anstelle eines Mail-Ins für geteilte Mailboxen verwendet wird. Wir zeigen Ihnen solche Fälle und deren Lösungen. Und natürlich erklären wir Ihnen das neue Lizenzmodell.
Nehmen Sie an diesem Webinar teil, bei dem HCL-Ambassador Marc Thomas und Gastredner Franz Walder Ihnen diese neue Welt näherbringen. Es vermittelt Ihnen die Tools und das Know-how, um den Überblick zu bewahren. Sie werden in der Lage sein, Ihre Kosten durch eine optimierte Domino-Konfiguration zu reduzieren und auch in Zukunft gering zu halten.
Diese Themen werden behandelt
- Reduzierung der Lizenzkosten durch Auffinden und Beheben von Fehlkonfigurationen und überflüssigen Konten
- Wie funktionieren CCB- und CCX-Lizenzen wirklich?
- Verstehen des DLAU-Tools und wie man es am besten nutzt
- Tipps für häufige Problembereiche, wie z. B. Team-Postfächer, Funktions-/Testbenutzer usw.
- Praxisbeispiele und Best Practices zum sofortigen Umsetzen
Monitoring and Managing Anomaly Detection on OpenShift.pdfTosin Akinosho
Monitoring and Managing Anomaly Detection on OpenShift
Overview
Dive into the world of anomaly detection on edge devices with our comprehensive hands-on tutorial. This SlideShare presentation will guide you through the entire process, from data collection and model training to edge deployment and real-time monitoring. Perfect for those looking to implement robust anomaly detection systems on resource-constrained IoT/edge devices.
Key Topics Covered
1. Introduction to Anomaly Detection
- Understand the fundamentals of anomaly detection and its importance in identifying unusual behavior or failures in systems.
2. Understanding Edge (IoT)
- Learn about edge computing and IoT, and how they enable real-time data processing and decision-making at the source.
3. What is ArgoCD?
- Discover ArgoCD, a declarative, GitOps continuous delivery tool for Kubernetes, and its role in deploying applications on edge devices.
4. Deployment Using ArgoCD for Edge Devices
- Step-by-step guide on deploying anomaly detection models on edge devices using ArgoCD.
5. Introduction to Apache Kafka and S3
- Explore Apache Kafka for real-time data streaming and Amazon S3 for scalable storage solutions.
6. Viewing Kafka Messages in the Data Lake
- Learn how to view and analyze Kafka messages stored in a data lake for better insights.
7. What is Prometheus?
- Get to know Prometheus, an open-source monitoring and alerting toolkit, and its application in monitoring edge devices.
8. Monitoring Application Metrics with Prometheus
- Detailed instructions on setting up Prometheus to monitor the performance and health of your anomaly detection system.
9. What is Camel K?
- Introduction to Camel K, a lightweight integration framework built on Apache Camel, designed for Kubernetes.
10. Configuring Camel K Integrations for Data Pipelines
- Learn how to configure Camel K for seamless data pipeline integrations in your anomaly detection workflow.
11. What is a Jupyter Notebook?
- Overview of Jupyter Notebooks, an open-source web application for creating and sharing documents with live code, equations, visualizations, and narrative text.
12. Jupyter Notebooks with Code Examples
- Hands-on examples and code snippets in Jupyter Notebooks to help you implement and test anomaly detection models.
Generating privacy-protected synthetic data using Secludy and MilvusZilliz
During this demo, the founders of Secludy will demonstrate how their system utilizes Milvus to store and manipulate embeddings for generating privacy-protected synthetic data. Their approach not only maintains the confidentiality of the original data but also enhances the utility and scalability of LLMs under privacy constraints. Attendees, including machine learning engineers, data scientists, and data managers, will witness first-hand how Secludy's integration with Milvus empowers organizations to harness the power of LLMs securely and efficiently.
Infrastructure Challenges in Scaling RAG with Custom AI modelsZilliz
Building Retrieval-Augmented Generation (RAG) systems with open-source and custom AI models is a complex task. This talk explores the challenges in productionizing RAG systems, including retrieval performance, response synthesis, and evaluation. We’ll discuss how to leverage open-source models like text embeddings, language models, and custom fine-tuned models to enhance RAG performance. Additionally, we’ll cover how BentoML can help orchestrate and scale these AI components efficiently, ensuring seamless deployment and management of RAG systems in the cloud.
Ocean lotus Threat actors project by John Sitima 2024 (1).pptxSitimaJohn
Ocean Lotus cyber threat actors represent a sophisticated, persistent, and politically motivated group that poses a significant risk to organizations and individuals in the Southeast Asian region. Their continuous evolution and adaptability underscore the need for robust cybersecurity measures and international cooperation to identify and mitigate the threats posed by such advanced persistent threat groups.
CAKE: Sharing Slices of Confidential Data on BlockchainClaudio Di Ciccio
Presented at the CAiSE 2024 Forum, Intelligent Information Systems, June 6th, Limassol, Cyprus.
Synopsis: Cooperative information systems typically involve various entities in a collaborative process within a distributed environment. Blockchain technology offers a mechanism for automating such processes, even when only partial trust exists among participants. The data stored on the blockchain is replicated across all nodes in the network, ensuring accessibility to all participants. While this aspect facilitates traceability, integrity, and persistence, it poses challenges for adopting public blockchains in enterprise settings due to confidentiality issues. In this paper, we present a software tool named Control Access via Key Encryption (CAKE), designed to ensure data confidentiality in scenarios involving public blockchains. After outlining its core components and functionalities, we showcase the application of CAKE in the context of a real-world cyber-security project within the logistics domain.
Paper: https://doi.org/10.1007/978-3-031-61000-4_16
Full-RAG: A modern architecture for hyper-personalizationZilliz
Mike Del Balso, CEO & Co-Founder at Tecton, presents "Full RAG," a novel approach to AI recommendation systems, aiming to push beyond the limitations of traditional models through a deep integration of contextual insights and real-time data, leveraging the Retrieval-Augmented Generation architecture. This talk will outline Full RAG's potential to significantly enhance personalization, address engineering challenges such as data management and model training, and introduce data enrichment with reranking as a key solution. Attendees will gain crucial insights into the importance of hyperpersonalization in AI, the capabilities of Full RAG for advanced personalization, and strategies for managing complex data integrations for deploying cutting-edge AI solutions.
Removing Uninteresting Bytes in Software FuzzingAftab Hussain
Imagine a world where software fuzzing, the process of mutating bytes in test seeds to uncover hidden and erroneous program behaviors, becomes faster and more effective. A lot depends on the initial seeds, which can significantly dictate the trajectory of a fuzzing campaign, particularly in terms of how long it takes to uncover interesting behaviour in your code. We introduce DIAR, a technique designed to speedup fuzzing campaigns by pinpointing and eliminating those uninteresting bytes in the seeds. Picture this: instead of wasting valuable resources on meaningless mutations in large, bloated seeds, DIAR removes the unnecessary bytes, streamlining the entire process.
In this work, we equipped AFL, a popular fuzzer, with DIAR and examined two critical Linux libraries -- Libxml's xmllint, a tool for parsing xml documents, and Binutil's readelf, an essential debugging and security analysis command-line tool used to display detailed information about ELF (Executable and Linkable Format). Our preliminary results show that AFL+DIAR does not only discover new paths more quickly but also achieves higher coverage overall. This work thus showcases how starting with lean and optimized seeds can lead to faster, more comprehensive fuzzing campaigns -- and DIAR helps you find such seeds.
- These are slides of the talk given at IEEE International Conference on Software Testing Verification and Validation Workshop, ICSTW 2022.
UiPath Test Automation using UiPath Test Suite series, part 6DianaGray10
Welcome to UiPath Test Automation using UiPath Test Suite series part 6. In this session, we will cover Test Automation with generative AI and Open AI.
UiPath Test Automation with generative AI and Open AI webinar offers an in-depth exploration of leveraging cutting-edge technologies for test automation within the UiPath platform. Attendees will delve into the integration of generative AI, a test automation solution, with Open AI advanced natural language processing capabilities.
Throughout the session, participants will discover how this synergy empowers testers to automate repetitive tasks, enhance testing accuracy, and expedite the software testing life cycle. Topics covered include the seamless integration process, practical use cases, and the benefits of harnessing AI-driven automation for UiPath testing initiatives. By attending this webinar, testers, and automation professionals can gain valuable insights into harnessing the power of AI to optimize their test automation workflows within the UiPath ecosystem, ultimately driving efficiency and quality in software development processes.
What will you get from this session?
1. Insights into integrating generative AI.
2. Understanding how this integration enhances test automation within the UiPath platform
3. Practical demonstrations
4. Exploration of real-world use cases illustrating the benefits of AI-driven test automation for UiPath
Topics covered:
What is generative AI
Test Automation with generative AI and Open AI.
UiPath integration with generative AI
Speaker:
Deepak Rai, Automation Practice Lead, Boundaryless Group and UiPath MVP
Driving Business Innovation: Latest Generative AI Advancements & Success StorySafe Software
Are you ready to revolutionize how you handle data? Join us for a webinar where we’ll bring you up to speed with the latest advancements in Generative AI technology and discover how leveraging FME with tools from giants like Google Gemini, Amazon, and Microsoft OpenAI can supercharge your workflow efficiency.
During the hour, we’ll take you through:
Guest Speaker Segment with Hannah Barrington: Dive into the world of dynamic real estate marketing with Hannah, the Marketing Manager at Workspace Group. Hear firsthand how their team generates engaging descriptions for thousands of office units by integrating diverse data sources—from PDF floorplans to web pages—using FME transformers, like OpenAIVisionConnector and AnthropicVisionConnector. This use case will show you how GenAI can streamline content creation for marketing across the board.
Ollama Use Case: Learn how Scenario Specialist Dmitri Bagh has utilized Ollama within FME to input data, create custom models, and enhance security protocols. This segment will include demos to illustrate the full capabilities of FME in AI-driven processes.
Custom AI Models: Discover how to leverage FME to build personalized AI models using your data. Whether it’s populating a model with local data for added security or integrating public AI tools, find out how FME facilitates a versatile and secure approach to AI.
We’ll wrap up with a live Q&A session where you can engage with our experts on your specific use cases, and learn more about optimizing your data workflows with AI.
This webinar is ideal for professionals seeking to harness the power of AI within their data management systems while ensuring high levels of customization and security. Whether you're a novice or an expert, gain actionable insights and strategies to elevate your data processes. Join us to see how FME and AI can revolutionize how you work with data!
GraphRAG for Life Science to increase LLM accuracyTomaz Bratanic
GraphRAG for life science domain, where you retriever information from biomedical knowledge graphs using LLMs to increase the accuracy and performance of generated answers
GraphRAG for Life Science to increase LLM accuracy
Program Derivation of Operations in Finite Fields of Prime Order
1. Introduction Title
Program Derivation of Operations in Fp
Charles Southerland Dr. Anita Walker
Department of Mathematics & Computer Science
East Central University
Oklahoma Computing Consortium Conference 2011
Southerland, Walker Program Derivation of Operations in Fp
2. Introduction Thanks
Special Thanks
I would like to say a special thank you to:
Dr. Anita Walker for working closely with me throughout
this project, and for introducing me to abstract algebra
Dr. Bill Walker for introducing me to program derivation
Prof. Clay Carley for working with me on cryptology, which
first lead me to this particular problem
The creators of Beamer for allowing LATEX to save me from
the abyss of WYSIWYG presentation software
Southerland, Walker Program Derivation of Operations in Fp
3. Finite Fields Outline
Outline
1 Finite Fields
Definition
Field Order
A Well-Known Finite Field
2 Program Derivation
3 Multiplicative Inverse in Fp
Southerland, Walker Program Derivation of Operations in Fp
4. Finite Fields Definition
The Definition of a Field
Definition
A field is a 3-tuple of a set F and two operations (called addition
and multiplication) for which certain properties hold:
Closure of F under both operations
Associativity of both operations
Distinct identities in F for the operations
Additive inverses for all items in F
Multiplicative inverses for all but the additive identity
Commutativity of both operations
Distributivity of multiplication over addition
Southerland, Walker Program Derivation of Operations in Fp
5. Finite Fields Definition
The Galois Field
A finite field is a field in which the contained set has finite
cardinality (e.g., the field has a finite order).
All finite fields of the same order are isomorphic (so they are,
for all practical purposes, the same).
Another name for a finite field is a Galois field.
Generalized fields are often denoted as F, but finite fields in
particular are usually denoted either with GF, GF(q), or Fq,
where q is the order of the field.
Southerland, Walker Program Derivation of Operations in Fp
6. Finite Fields Field Order
The Order of a Finite Field
There exists a finite field of order q iff q = pn, where p is
prime and n ∈ N..
When n = 1, Fp is isomorphic to (Zp, ⊕, ⊗) (the integers
modulo p with modular addition and modular multiplication).
When n > 1, Fpn is isomorphic to the splitting field of
f (x) = xpn
− x over Fp.
This project focuses on fields of prime order, so I’m afraid
there will be no more discussion of Fpn .
Southerland, Walker Program Derivation of Operations in Fp
7. Finite Fields A Well-Known Finite Field
A Well-Known Finite Field of Prime Order: F2
Since 2 is prime, there is a finite field F2, and it has the form
(Z2, ⊕, ⊗).
The operations are defined as:
Addition
⊕ 0 1
0 0 1
1 1 0
Multiplication
⊗ 0 1
0 0 0
1 0 1
As you can see, F2 is binary with XOR as addition and AND
as multiplication.
Southerland, Walker Program Derivation of Operations in Fp
8. Program Derivation Outline
Outline
1 Finite Fields
2 Program Derivation
History
Dijkstra’s Guarded Command Language
Weakest Precondition Predicate Transformer
The Program Derivation Process
3 Multiplicative Inverse in Fp
Southerland, Walker Program Derivation of Operations in Fp
9. Program Derivation History
The History of Program Derivation
Hoare’s 1969 paper An Axiomatic Basis for Computer
Programming effectively launched the Formal Methods
subfield of CS.
Dijkstra’s paper Guarded Commands, Nondeterminacy and
Formal Derivation of Programs introduced many of the ideas
presented in this paper.
Gries’ book The Science of Programming brings Dijkstra’s
paper to a level undergrad CS and Math majors can
understand.
Southerland, Walker Program Derivation of Operations in Fp
10. Program Derivation Dijkstra’s Guarded Command Language
Some Familiar Parts of Dijkstra’s Language
Variable Assignment
x := 1
Addition
x := x + y
Command Concatenation
b := b − a; x := x + y
Procedure Call
c := gcd(a, b)
Subtraction
b := b − a
Skip, then Abort
skip; abort
Southerland, Walker Program Derivation of Operations in Fp
11. Program Derivation Dijkstra’s Guarded Command Language
Dijkstra’s Guarded Commands
Guarded if-Block
if a > 0 → c := 2
b > 0 → c := 3; a := 5
c > 0 → c := 1
c = 6 → c := 4
fi
Guarded do-Block
do b = 0 → c := 1
a > 0 → a := a − 1
b < 4 → b := b + 1
c = 1 → a := a − 1
od
Southerland, Walker Program Derivation of Operations in Fp
12. Program Derivation Dijkstra’s Guarded Command Language
A Famous Example
Greatest Common Divisor
proc gcd(a, b) ≡
do a > b → a := a − b
b > a → b := b − a
od
return a.
Southerland, Walker Program Derivation of Operations in Fp
13. Program Derivation Weakest Precondition Predicate Transformer
The Weakest Precondition Predicate Transformer
Definition
The Weakest Precondition Predicate Transformer (wp) is
defined as follows:
wp : P × L → L
P is the set of all finite-length programs
L is the set of all statements about the state of a computer
wp(s, r) = q
q is the weakest precondition (the initial state)
s is the program to be executed (which changes the state)
r is the postcondition (the resulting state)
Southerland, Walker Program Derivation of Operations in Fp
14. Program Derivation Weakest Precondition Predicate Transformer
wp and Dijkstra’s Language
Skip
wp(”skip”, r) = r
Command Concatenation
wp(”b := a; x := y”, r)
= wp(”b := a”, wp(”x := y”, r))
Abort
wp(”abort”, r) = F
Variable Assignment
wp(”x := y”, r)
= defined(y) ∧ rx
y
Southerland, Walker Program Derivation of Operations in Fp
15. Program Derivation Weakest Precondition Predicate Transformer
wp and Dijkstra’s if-Block
Dijkstra’s if-Block
wp(”if a > 0 → c := 2
b > 0 → c := 3; a := 5
c > 0 → c := 1
c = 6 → c := 4 fi”, r)
= (a > 0 ∨ b > 0 ∨ c > 0 ∨ c = 6)
∧(a > 0 =⇒ wp(”c := 2”, r))
∧(b > 0 =⇒ wp(”c := 3; a := 5”, r))
∧(c > 0 =⇒ wp(”c := 1”, r))
∧(c = 6 =⇒ wp(”c := 4”, r))
Southerland, Walker Program Derivation of Operations in Fp
16. Program Derivation Weakest Precondition Predicate Transformer
wp and Dijkstra’s do-Block, Part I
Let’s call this ”DO”:
do b = 0 → c := 1
a > 0 → a := a − 1
b < 4 → b := b + 1
c = 1 → a := a − 1
od
Also, let’s call this ”IF”:
do b = 0 → c := 1
a > 0 → a := a − 1
b < 4 → b := b + 1
c = 1 → a := a − 1
od
Southerland, Walker Program Derivation of Operations in Fp
17. Program Derivation Weakest Precondition Predicate Transformer
wp and Dijkstra’s do-Block, Part II
We define Hn(r) for n ∈ N and r ∈ L as:
For n = 1
H1(r) = (b = 0 ∧ a ≤ 0 ∧ b ≥ 4 ∧ c = 1) ∧ r
For n > 1
Hn(r) = H1(r) ∨ wp(”IF”, Hn−1(r))
Southerland, Walker Program Derivation of Operations in Fp
18. Program Derivation Weakest Precondition Predicate Transformer
wp and Dijkstra’s do-Block, Part III
Dijkstra’s Guarded do-Block
wp(”do b = 0 → c := 1
a > 0 → a := a − 1
b < 4 → b := b + 1
c = 1 → a := a − 1 od”, r)
= (∃n ∈ N)Hn(r)
Southerland, Walker Program Derivation of Operations in Fp
19. Program Derivation The Program Derivation Process
Program Derivation
Program Derivation
Given a precondition q ∈ L and a postcondition r ∈ L,
derive a program s ∈ P that satisfies q = wp(s, r).
Southerland, Walker Program Derivation of Operations in Fp
20. Program Derivation The Program Derivation Process
Program Derivation Tips
Gather as much information as possible about the
precondition and postcondition.
Reduce the problem to previously solved ones whenever
possible.
Look for a loop invariant that gives clues on how to
implement the program.
If you are stuck, consider alternative representations of the
data.
Southerland, Walker Program Derivation of Operations in Fp
21. Multiplicative Inverse in Fp Outline
Outline
1 Finite Fields
2 Program Derivation
3 Multiplicative Inverse in Fp
Multiplicative Inverses
The Greatest Common Divisor
Exploring Bezout’s Identity
Program to Find the Multiplicative Inverse in Fp
Southerland, Walker Program Derivation of Operations in Fp
22. Multiplicative Inverse in Fp Multiplicative Inverses
Multiplicative Inverses in Fields of Infinite and Finite Order
Finding multiplicative inverses in a field of infinite order is
typically not a problem.
Example
In (Q, +, ×), multiplicative inverses are reciprocals (e.g., a−1 = 1
a ).
Finding multiplicative inverses in fields of finite order can get
tricky.
Example
In (Zp, ⊕, ⊗), multiplicative inverses are found using Bezout’s
Identity (i.e., ax + py = 1), which has two unknown values.
Southerland, Walker Program Derivation of Operations in Fp
23. Multiplicative Inverse in Fp Multiplicative Inverses
Obtaining the Multiplicative Inverse from Bezout’s Identity
Noting that a and b are coprime (since b = p, and p is prime),
gcd(a, b) = 1. So:
ax + by = gcd(a, b)
ax + by = 1
ax = by + 1
ax = py + 1
ax = 1
By the definition of multiplicative inverses, x = a−1.
Southerland, Walker Program Derivation of Operations in Fp
24. Multiplicative Inverse in Fp The Greatest Common Divisor
The Greatest Common Divisor
Recall the greatest common divisor program:
Greatest Common Divisor
proc gcd(a, b) ≡
do a > b → a := a − b
b > a → b := b − a
od
return a.
This implementation was discovered by exploring the property:
gcd(a, b) = gcd(a − b, b) = gcd(a, b − a)
Southerland, Walker Program Derivation of Operations in Fp
25. Multiplicative Inverse in Fp The Greatest Common Divisor
The Loop Invariant of gcd
The loop invariant used in the primary loop of this program is
gcd(a, b) = gcd(A, B).
The loop will exit when a = b, which occurs when
a = b = gcd(a, b).
Since every iteration decreases the value of either a or b, the
loop will progress toward termination (the loop is bound by
(a − gcd(a, b)) + (b − gcd(a, b))).
Southerland, Walker Program Derivation of Operations in Fp
26. Multiplicative Inverse in Fp Exploring Bezout’s Identity
Bezout’s Identity and the gcd Property
Combining Bezout’s Identity with the gcd property, we get:
ax + by = gcd(a, b)
= gcd(a, b − a)
= au + (b − a)v
= au + bv − av
= a(u − v) + bv
So x ≡ u − v (mod b) and y ≡ v (mod a).
As gcd is commutative, we derive a corresponding result if we
explored gcd(a − b, b) instead of gcd(a, b − a).
Southerland, Walker Program Derivation of Operations in Fp
27. Multiplicative Inverse in Fp Exploring Bezout’s Identity
Reassigning x and y as Linear Combinations: Part I
Each time the arguments of gcd get closer to their final value, it is
shown that x is equivalent (mod b) and y is equivalent (mod a)
to a linear combination of their corresponding values from Bezout’s
Identity after a and b have been modified as described in the gcd
program.
Southerland, Walker Program Derivation of Operations in Fp
28. Multiplicative Inverse in Fp Exploring Bezout’s Identity
Reassigning x and y as Linear Combinations: Part II
Specifically, it can be seen that x always has a positive coefficient
of following corresponding values of x and a negative coefficient of
corresponding values of y. Likewise, y always has a negative
coefficient of corresponding values of x and a positive coefficient of
corresponding values of y.
Southerland, Walker Program Derivation of Operations in Fp
29. Multiplicative Inverse in Fp Exploring Bezout’s Identity
Reassigning x and y as Linear Combinations: Part III
Once the arguments to gcd are equal to each other (and equal to
the result of gcd), we can find the original values of x and y by
multiplying the coefficients that have been stored by the final
corresponding values of x and y. However, since we are looking for
a multiplicative inverse in Fp, we know gcd(a, p) = 1 as p is prime.
Since this will give us x = 1 by simplification after using the gcd
property one last time, we see that the y components are
inconsequential.
Southerland, Walker Program Derivation of Operations in Fp
30. Multiplicative Inverse in Fp Exploring Bezout’s Identity
Reassigning x and y as Linear Combinations: Part IV
Finally, we see that only the x coefficients are of any consequence
to the final result. Specifically, once the gcd algorithm is complete,
since the initial (and desired) value of x can be found by
multiplying the final corresponding value of x by the proper
coefficient of x, and since the final corresponding value of x = 1,
we get that the desired value of x is equal to the coefficient of the
corresponding final value of x.
Southerland, Walker Program Derivation of Operations in Fp
31. Multiplicative Inverse in Fp Program to Find the Multiplicative Inverse in Fp
Finding the Loop Invariant
Based on the long-winded previous slides, we can describe a loop
invariant:
Axl + Byl = gcd(a, b)
where xl is is the linear combination that the initial value of x is
equal to, and yl is the linear combination that the initial value of y.
This loop invariant is nice, as it is fully compatible with the loop
invariant of gcd, and so it also progresses toward termination and
has a bound function that differs from that of gcd linearly.
Southerland, Walker Program Derivation of Operations in Fp
32. Multiplicative Inverse in Fp Program to Find the Multiplicative Inverse in Fp
A Last Look at gcd for Reference...
Greatest Common Divisor
proc gcd(a, b) ≡
do a > b → a := a − b
b > a → b := b − a
od
return a.
Southerland, Walker Program Derivation of Operations in Fp
33. Multiplicative Inverse in Fp Program to Find the Multiplicative Inverse in Fp
Multiplicative Inverse Program
Multiplicative Inverse
proc multinv(a, b) ≡
xx := 1; yx := 0
do a > b → a := a − b; yx := yx + xx
b > a → b := b − a; xx := xx + yx
od
return xx .
Southerland, Walker Program Derivation of Operations in Fp
34. Conclusion Summary
Summary
Finite fields are very useful mathematical constructs that can
behave very differently from fields of infinite order.
Program derivation is performed by using the rules of the
weakest precondition predicate transformer to determine what
sequence of conditions (and thus what program statements)
must have occured between a given precondition and
postcondition.
While the process of deriving my multiplicative inverse
program was time-consuming and complicated, the results
were well worth the effort.
Southerland, Walker Program Derivation of Operations in Fp
35. Conclusion Future Work
Future Work
Program Derivation of Exponentiation in Fp
Extend scope to include Fpn
Explore factorization techniques
Finish library and create graphical front end
Southerland, Walker Program Derivation of Operations in Fp
36. Conclusion Contact Me
Contact Information
You can email me at charlie@stuphlabs.com if you have any
further questions or comments.
Southerland, Walker Program Derivation of Operations in Fp