Graph theory 10-Hamiltonian circuit and Hamiltonian path + state compression + memory search

Article directory 1 Hamiltonian circuit 2 Implementation of Hamiltonian cycle algorithm 2.1 Conventional backtracking algorithm 2.2 Introduce variables to record the number of remaining unvisited nodes 3 Hamiltonian path problem 4 state compression 4.1 Check whether the i-th bit is 1 4.2 Set the i-th bit to 1 or 0 4.3 Summary 4.4 Application of […]

Image compression based on SVD, PCA feature dimensionality reduction

Table of Contents I. Introduction 2. Feature decomposition 3. Image compression based on SVD 4. Feature dimensionality reduction based on SVD 1. Foreword In fact, EVD (eigendecomposition) is a special case of SVD; inverse is a special case of pseudo-inverse, which has applications in least squares. There will be SVD decomposition in the “8-point method” […]

[Java Object] Understand the true face of Java objects and pointer compression in one article

Article directory Version and tool introduction Java object structure Object header mark word mark word mark word mark word analysis Lock Record class point class metadata pointer Instance data Align padding Why alignment padding is needed Common Java data type object analysis ArrayList Long String Byte Boolean other pointer compression Prerequisite knowledge: Why 32-bit operating […]

Dynamic Programming: State Compression DP

Mondrian’s dream: Mondrian’s dream under pressure from DP: To find the number of plans, first of all, because there are only two ways to place them, and they have to be filled up, it is actually the same as the dyeing problem (black and white). For a certain plan, once the horizontal placement is determined, […]

[Basic operations] Bit operations: binary state compression, pairwise transformation, lowbit operation

1. Binary state compression Binary state compression refers to compressing a file with a length of m m The bool array of m uses a m m A method of representing and storing m-bit binary integers. The following bit operations can be used to access the corresponding subscript elements in the original bool array. Operation […]

Windows Tip 02: Automatically mount the vhdx (supports bitlocker encryption) virtual disk with one click after booting and unlock bitlocker directly on the command line, automatically escalate the rights and run the bat script&&vhdx virtual disk file compression code as administrator

Take the script code below. It is recommended to use the third or fifth version of the code. Copy it into Notepad. Change the suffix of Notepad to bat file. Put this file in the same directory as the vhdx file and double-click to run it. Why should I use a virtual disk: 1. Used […]

Java file viewing size, compression, file download tools

import cn.hutool.core.io.IoUtil; import lombok.extern.slf4j.Slf4j; import org.apache.commons.io.FileUtils; import org.springframework.http.HttpStatus; import org.springframework.web.multipart.MultipartFile; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import java.io.*; import java.math.BigDecimal; import java.math.RoundingMode; import java.net.URLEncoder; import java.util.zip.ZipEntry; import java.util.zip.ZipOutputStream; /** * @ClassName: FileSpaceUtil * @Description: * @Author: * @Date: **/ @Slf4j public class FileSpaceUtil {<!– –> //View the total disk space size public static double getTotalSpace(){<!– –> File […]

Huffman tree and compression using Huffman coding

Huffman tree Huffman Tree is a tree structure used to encode characters. Its characteristic is that the higher the frequency of characters, the closer they are to the root node, that is, the shorter the encoding length. This feature makes Huffman trees widely used in the field of data compression. The process of constructing a […]